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

Unified Diff: samplecode/SamplePicture.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 | « samplecode/SampleApp.cpp ('k') | samplecode/SampleSubpixelTranslate.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SamplePicture.cpp
diff --git a/samplecode/SamplePicture.cpp b/samplecode/SamplePicture.cpp
index 9c965e43085e0f2a1f2b74d2e5a8b8cc48cb441f..ecc59415a0b54254c5248625390fa085b48a5e03 100644
--- a/samplecode/SamplePicture.cpp
+++ b/samplecode/SamplePicture.cpp
@@ -5,12 +5,16 @@
* found in the LICENSE file.
*/
+#include "gm.h"
+
+#include "Resources.h"
#include "SampleCode.h"
+#include "SkCanvas.h"
+#include "SkColorFilter.h"
+#include "SkColorPriv.h"
#include "SkData.h"
#include "SkDecodingImageGenerator.h"
#include "SkDumpCanvas.h"
-#include "SkView.h"
-#include "SkCanvas.h"
#include "SkGradientShader.h"
#include "SkGraphics.h"
#include "SkImageDecoder.h"
@@ -21,23 +25,20 @@
#include "SkRandom.h"
#include "SkRegion.h"
#include "SkShader.h"
-#include "SkUtils.h"
-#include "SkColorPriv.h"
-#include "SkColorFilter.h"
+#include "SkStream.h"
#include "SkTime.h"
#include "SkTypeface.h"
-#include "SkXfermode.h"
-#include "SkStream.h"
+#include "SkUtils.h"
+#include "SkView.h"
#include "SkXMLParser.h"
-
-#include "gm.h"
+#include "SkXfermode.h"
///////////////////////////////////////////////////////////////////////////////
static SkBitmap load_bitmap() {
SkBitmap bm;
- SkString directory = skiagm::GM::GetResourcePath();
- SkString path = SkOSPath::SkPathJoin(directory.c_str(), "mandrill_512.png");
+ SkString resourcePath = GetResourcePath();
+ SkString path = SkOSPath::SkPathJoin(resourcePath.c_str(), "mandrill_512.png");
SkAutoDataUnref data(SkData::NewFromFileName(path.c_str()));
if (data.get() != NULL) {
SkInstallDiscardablePixelRef(SkDecodingImageGenerator::Create(
« no previous file with comments | « samplecode/SampleApp.cpp ('k') | samplecode/SampleSubpixelTranslate.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698