Index: gm/image.cpp |
diff --git a/gm/image.cpp b/gm/image.cpp |
index 8578e510bad28478a911ef2606d04d96037df010..55b4cdbc8a7df5a576bbaa8d9fe4ecb338a5e135 100644 |
--- a/gm/image.cpp |
+++ b/gm/image.cpp |
@@ -8,8 +8,9 @@ |
#include "gm.h" |
#include "SkSurface.h" |
#include "SkCanvas.h" |
-#include "SkStream.h" |
#include "SkData.h" |
+#include "SkOSFile.h" |
+#include "SkStream.h" |
#if SK_SUPPORT_GPU |
#include "GrContext.h" |
@@ -30,8 +31,8 @@ static SkData* fileToData(const char path[]) { |
return SkData::NewFromMalloc(mem, size); |
} |
-static void drawJpeg(SkCanvas* canvas, const SkISize& size) { |
- SkAutoDataUnref data(fileToData("/Users/mike/Downloads/skia.google.jpeg")); |
+static void drawJpeg(SkString filename, SkCanvas* canvas, const SkISize& size) { |
+ SkAutoDataUnref data(fileToData(filename.c_str())); |
SkImage* image = SkImage::NewEncodedData(data); |
if (image) { |
SkAutoCanvasRestore acr(canvas, true); |
@@ -123,7 +124,9 @@ protected: |
} |
virtual void onDraw(SkCanvas* canvas) { |
- drawJpeg(canvas, this->getISize()); |
+ SkString filename = SkOSPathUtils::SkPathJoin( |
+ INHERITED::gResourcePath.c_str(), "CMYK.jpg"); |
scroggo
2013/05/24 16:23:37
Changing this file will require a rebaseline (assu
epoger
2013/05/24 16:42:55
I think your best bet is to leave this change out
scroggo
2013/05/24 17:36:05
Done.
|
+ drawJpeg(filename, canvas, this->getISize()); |
canvas->scale(2, 2); |