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

Unified Diff: gm/etc1bitmap.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/downsamplebitmap.cpp ('k') | gm/factory.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/etc1bitmap.cpp
diff --git a/gm/etc1bitmap.cpp b/gm/etc1bitmap.cpp
index 42c152f88718af5a1deeb39e36a624c0cea75d33..e0a59b0c4f5314a2ba9787750a4c84cbe2925a9c 100644
--- a/gm/etc1bitmap.cpp
+++ b/gm/etc1bitmap.cpp
@@ -6,6 +6,8 @@
*/
#include "gm.h"
+
+#include "Resources.h"
#include "SkCanvas.h"
#include "SkData.h"
#include "SkDecodingImageGenerator.h"
@@ -93,7 +95,8 @@ protected:
virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
SkBitmap bm;
- SkString filename = SkOSPath::SkPathJoin(INHERITED::gResourcePath, "mandrill_128.");
+ SkString resourcePath = GetResourcePath();
+ SkString filename = SkOSPath::SkPathJoin(resourcePath.c_str(), "mandrill_128.");
filename.append(this->fileExtension());
SkAutoTUnref<SkData> fileData(SkData::NewFromFileName(filename.c_str()));
@@ -166,9 +169,9 @@ protected:
}
virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
-
SkBitmap bm;
- SkString filename = SkOSPath::SkPathJoin(INHERITED::gResourcePath, "mandrill_128.pkm");
+ SkString resourcePath = GetResourcePath();
+ SkString filename = SkOSPath::SkPathJoin(resourcePath.c_str(), "mandrill_128.pkm");
SkAutoDataUnref fileData(SkData::NewFromFileName(filename.c_str()));
if (NULL == fileData) {
« no previous file with comments | « gm/downsamplebitmap.cpp ('k') | gm/factory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698