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

Unified Diff: gm/etc1bitmap.cpp

Issue 351133003: Cleanup usage of GetResourcePath() after commit bcbc1788b478b1e54079318ad073e8490aa66fae. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 e0a59b0c4f5314a2ba9787750a4c84cbe2925a9c..2241c848c3ee990aa9bf2658d0364fcd61e14ccd 100644
--- a/gm/etc1bitmap.cpp
+++ b/gm/etc1bitmap.cpp
@@ -95,10 +95,8 @@ protected:
virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
SkBitmap bm;
- SkString resourcePath = GetResourcePath();
- SkString filename = SkOSPath::SkPathJoin(resourcePath.c_str(), "mandrill_128.");
+ SkString filename = GetResourcePath("mandrill_128.");
filename.append(this->fileExtension());
-
SkAutoTUnref<SkData> fileData(SkData::NewFromFileName(filename.c_str()));
if (NULL == fileData) {
SkDebugf("Could not open the file. Did you forget to set the resourcePath?\n");
@@ -170,10 +168,8 @@ protected:
virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
SkBitmap bm;
- SkString resourcePath = GetResourcePath();
- SkString filename = SkOSPath::SkPathJoin(resourcePath.c_str(), "mandrill_128.pkm");
-
- SkAutoDataUnref fileData(SkData::NewFromFileName(filename.c_str()));
+ SkString pkmFilename = GetResourcePath("mandrill_128.pkm");
+ SkAutoDataUnref fileData(SkData::NewFromFileName(pkmFilename.c_str()));
if (NULL == fileData) {
SkDebugf("Could not open the file. Did you forget to set the resourcePath?\n");
return;
« 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