Index: gm/avoidxfermode.cpp |
diff --git a/gm/avoidxfermode.cpp b/gm/avoidxfermode.cpp |
index a015b6bbe7085e8c01fcf3719ce06523dfe29bb2..d224b4e2d05d56808b76e9e2d2e700e970215fea 100644 |
--- a/gm/avoidxfermode.cpp |
+++ b/gm/avoidxfermode.cpp |
@@ -8,7 +8,6 @@ |
#include "gm.h" |
#include "Resources.h" |
-#include "SkImageDecoder.h" |
#include "SkAvoidXfermode.h" |
#include "SkStream.h" |
@@ -24,17 +23,7 @@ protected: |
SkISize onISize() override { return SkISize::Make(128, 128); } |
void onOnceBeforeDraw() override { |
- SkImageDecoder* codec = nullptr; |
- SkString resourcePath = GetResourcePath("color_wheel.png"); |
- SkFILEStream stream(resourcePath.c_str()); |
- if (stream.isValid()) { |
- codec = SkImageDecoder::Factory(&stream); |
- } |
- if (codec) { |
- stream.rewind(); |
- codec->decode(&stream, &fBM, kN32_SkColorType, SkImageDecoder::kDecodePixels_Mode); |
- delete codec; |
- } else { |
+ if (!GetResourceAsBitmap("color_wheel.png", &fBM)) { |
fBM.allocN32Pixels(1, 1); |
fBM.eraseARGB(255, 255, 0 , 0); // red == bad |
} |