Index: gm/grayscalejpg.cpp |
diff --git a/gm/grayscalejpg.cpp b/gm/grayscalejpg.cpp |
index 0c617bf2ebacfca70b550c06677d6cbea2b1f017..70ea72e9bd3b94c42a8e4368ad1cdec73379b2b6 100644 |
--- a/gm/grayscalejpg.cpp |
+++ b/gm/grayscalejpg.cpp |
@@ -6,7 +6,7 @@ |
*/ |
#include "Resources.h" |
-#include "SkCanvas.h" |
+#include "SkImage.h" |
#include "gm.h" |
/* |
@@ -15,9 +15,9 @@ |
*/ |
DEF_SIMPLE_GM(grayscalejpg, canvas, 128, 128) { |
const char kResource[] = "grayscale.jpg"; |
- SkBitmap bitmap; |
- if (GetResourceAsBitmap(kResource, &bitmap)) { |
- canvas->drawBitmap(bitmap, 0.0f, 0.0f); |
+ SkAutoTUnref<SkImage> image(GetResourceAsImage(kResource)); |
+ if (image) { |
+ canvas->drawImage(image, 0.0f, 0.0f); |
} else { |
SkDebugf("\nCould not decode file '%s'. Did you forget" |
" to set the resourcePath?\n", kResource); |