diff options
author | tfarina <tfarina@chromium.org> | 2014-07-01 12:35:49 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-07-01 12:35:49 -0700 |
commit | c846f4a96bcde1ffeaf17afc1469db6f2cbd1ad3 (patch) | |
tree | 0fcf98e7bc8c1ed90a9d9a61b685d998d362768b /gm/copyTo4444.cpp | |
parent | 696d3611760b0465caaebf6243824960034c3592 (diff) |
Cleanup usage of GetResourcePath() after commit bcbc1788b478b1e54079318ad073e8490aa66fae.
There was a clean up opportunity left over after
https://skia.googlesource.com/skia/+/bcbc1788b478b1e54079318ad073e8490aa66fae, that could make use of the default parameter of GetResourcePath() function to make some call sites cleaner.
We decided to make it in a separate CL to make reviewer's and author's life easier, so we could catch errors and/or mistakes easily.
BUG=None
TEST=make all && out/Debug/dm && out/Debug/SampleApp
R=mtklein@google.com
Author: tfarina@chromium.org
Review URL: https://codereview.chromium.org/351133003
Diffstat (limited to 'gm/copyTo4444.cpp')
-rw-r--r-- | gm/copyTo4444.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gm/copyTo4444.cpp b/gm/copyTo4444.cpp index 6465d00212..635cc7b834 100644 --- a/gm/copyTo4444.cpp +++ b/gm/copyTo4444.cpp @@ -32,9 +32,8 @@ protected: virtual void onDraw(SkCanvas* canvas) { SkBitmap bm, bm4444; - SkString resourcePath = GetResourcePath(); - SkString filename = SkOSPath::SkPathJoin(resourcePath.c_str(), "mandrill_512.png"); - if (!SkImageDecoder::DecodeFile(filename.c_str(), &bm, kN32_SkColorType, + SkString pngFilename = GetResourcePath("mandrill_512.png"); + if (!SkImageDecoder::DecodeFile(pngFilename.c_str(), &bm, kN32_SkColorType, SkImageDecoder::kDecodePixels_Mode)) { SkDebugf("Could not decode the file. Did you forget to set the " "resourcePath?\n"); |