Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(324)

Unified Diff: gm/copyTo4444.cpp

Issue 1791583002: Remove uses of SkImageDecoder from gms (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/cmykjpeg.cpp ('k') | gm/downsamplebitmap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/copyTo4444.cpp
diff --git a/gm/copyTo4444.cpp b/gm/copyTo4444.cpp
index 635cc7b8344a6d789a0e5d85985cec72dd2e130d..64f2c607467b276f6a99daf859a754889caea892 100644
--- a/gm/copyTo4444.cpp
+++ b/gm/copyTo4444.cpp
@@ -9,7 +9,6 @@
#include "Resources.h"
#include "SkCanvas.h"
-#include "SkImageDecoder.h"
#include "SkOSFile.h"
namespace skiagm {
@@ -32,9 +31,7 @@ protected:
virtual void onDraw(SkCanvas* canvas) {
SkBitmap bm, bm4444;
- SkString pngFilename = GetResourcePath("mandrill_512.png");
- if (!SkImageDecoder::DecodeFile(pngFilename.c_str(), &bm, kN32_SkColorType,
- SkImageDecoder::kDecodePixels_Mode)) {
+ if (!GetResourceAsBitmap("mandrill_512.png", &bm)) {
SkDebugf("Could not decode the file. Did you forget to set the "
"resourcePath?\n");
return;
« no previous file with comments | « gm/cmykjpeg.cpp ('k') | gm/downsamplebitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698