gm: image-surface: stop looking for nonexistant file

Change-Id: Iaac032f96b47901effb303cd99be15145c66fae1
Reviewed-on: https://skia-review.googlesource.com/84500
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
This commit is contained in:
Hal Canary 2017-12-13 10:28:00 -05:00 committed by Skia Commit-Bot
parent 7c83b24a15
commit 15bd9249de

View File

@ -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<SkData> data(SkData::MakeFromFileName("/Users/mike/Downloads/skia.google.jpeg"));
if (nullptr == data) {
return;
}
sk_sp<SkImage> 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";