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

Unified Diff: gm/copyTo4444.cpp

Issue 346453002: Refactor how we handle resources path in Tests. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix rebase conflict Created 6 years, 6 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/coloremoji.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 76dc66ca7cfed3f808436bdab152bbb713202899..6465d002124a1ec453deee621ed01159cbda3c1c 100644
--- a/gm/copyTo4444.cpp
+++ b/gm/copyTo4444.cpp
@@ -6,6 +6,8 @@
*/
#include "gm.h"
+
+#include "Resources.h"
#include "SkCanvas.h"
#include "SkImageDecoder.h"
#include "SkOSFile.h"
@@ -30,7 +32,8 @@ protected:
virtual void onDraw(SkCanvas* canvas) {
SkBitmap bm, bm4444;
- SkString filename = SkOSPath::SkPathJoin(INHERITED::gResourcePath, "mandrill_512.png");
+ SkString resourcePath = GetResourcePath();
+ SkString filename = SkOSPath::SkPathJoin(resourcePath.c_str(), "mandrill_512.png");
if (!SkImageDecoder::DecodeFile(filename.c_str(), &bm, kN32_SkColorType,
SkImageDecoder::kDecodePixels_Mode)) {
SkDebugf("Could not decode the file. Did you forget to set the "
« no previous file with comments | « gm/coloremoji.cpp ('k') | gm/downsamplebitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698