From 15bd9249def5eef281c5eb84b2d5acec03194c6d Mon Sep 17 00:00:00 2001 From: Hal Canary Date: Wed, 13 Dec 2017 10:28:00 -0500 Subject: [PATCH] gm: image-surface: stop looking for nonexistant file Change-Id: Iaac032f96b47901effb303cd99be15145c66fae1 Reviewed-on: https://skia-review.googlesource.com/84500 Reviewed-by: Hal Canary Commit-Queue: Hal Canary --- gm/image.cpp | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/gm/image.cpp b/gm/image.cpp index 576d7e8f98..e98daef42d 100644 --- a/gm/image.cpp +++ b/gm/image.cpp @@ -19,23 +19,6 @@ #include "GrContext.h" #endif -static void drawJpeg(SkCanvas* canvas, const SkISize& size) { - // TODO: Make this draw a file that is checked in, so it can - // be exercised on machines other than mike's. Will require a - // rebaseline. - sk_sp data(SkData::MakeFromFileName("/Users/mike/Downloads/skia.google.jpeg")); - if (nullptr == data) { - return; - } - sk_sp image = SkImage::MakeFromEncoded(std::move(data)); - if (image) { - SkAutoCanvasRestore acr(canvas, true); - canvas->scale(size.width() * 1.0f / image->width(), - size.height() * 1.0f / image->height()); - canvas->drawImage(image, 0, 0, nullptr); - } -} - static void drawContents(SkSurface* surface, SkColor fillC) { SkSize size = SkSize::Make(SkIntToScalar(surface->width()), SkIntToScalar(surface->height())); @@ -129,8 +112,6 @@ protected: } void onDraw(SkCanvas* canvas) override { - drawJpeg(canvas, this->getISize()); - canvas->scale(2, 2); const char* kLabel1 = "Original Img";