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

Unified Diff: samplecode/SampleSubpixelTranslate.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 | « samplecode/SamplePicture.cpp ('k') | tests/ImageDecodingTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleSubpixelTranslate.cpp
diff --git a/samplecode/SampleSubpixelTranslate.cpp b/samplecode/SampleSubpixelTranslate.cpp
index 41a0f156c15c258bd6845bb457bd2c2809dc64e5..4652bc37adde15890e281183f3da0bbc2eea869f 100644
--- a/samplecode/SampleSubpixelTranslate.cpp
+++ b/samplecode/SampleSubpixelTranslate.cpp
@@ -24,13 +24,9 @@ public:
SubpixelTranslateView(const char imageFilename[],
float horizontalVelocity,
float verticalVelocity)
- : fFilename(imageFilename),
- fHorizontalVelocity(horizontalVelocity),
+ : fHorizontalVelocity(horizontalVelocity),
fVerticalVelocity(verticalVelocity) {
- SkString resourcePath = GetResourcePath();
- resourcePath.append("/");
- resourcePath.append(fFilename);
-
+ SkString resourcePath = GetResourcePath(imageFilename);
SkImageDecoder* codec = NULL;
SkFILEStream stream(resourcePath.c_str());
if (stream.isValid()) {
@@ -50,7 +46,6 @@ public:
protected:
SkBitmap fBM;
- SkString fFilename;
SkScalar fSize;
float fHorizontalVelocity, fVerticalVelocity;
« no previous file with comments | « samplecode/SamplePicture.cpp ('k') | tests/ImageDecodingTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698