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

Unified Diff: gm/filterindiabox.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/filterbitmap.cpp ('k') | gm/gm.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/filterindiabox.cpp
diff --git a/gm/filterindiabox.cpp b/gm/filterindiabox.cpp
index 4acb2c3a71554119bf16dec986c9795adebb3b68..1987c95bf781d7caacc226625e7791a0fd5a2d5d 100644
--- a/gm/filterindiabox.cpp
+++ b/gm/filterindiabox.cpp
@@ -6,15 +6,15 @@
*/
#include "gm.h"
-#include "SkGradientShader.h"
-#include "SkTypeface.h"
+#include "Resources.h"
+#include "SkBitmapProcState.h"
+#include "SkBitmapScaler.h"
+#include "SkGradientShader.h"
#include "SkImageDecoder.h"
-#include "SkStream.h"
-
#include "SkImageEncoder.h"
-#include "SkBitmapScaler.h"
-#include "SkBitmapProcState.h"
+#include "SkStream.h"
+#include "SkTypeface.h"
static SkSize computeSize(const SkBitmap& bm, const SkMatrix& mat) {
SkRect bounds = SkRect::MakeWH(SkIntToScalar(bm.width()),
@@ -104,12 +104,12 @@ protected:
}
void makeBitmap() {
- SkString path(skiagm::GM::gResourcePath);
- path.append("/");
- path.append(fFilename);
+ SkString resourcePath = GetResourcePath();
+ resourcePath.append("/");
+ resourcePath.append(fFilename);
- SkImageDecoder *codec = NULL;
- SkFILEStream stream(path.c_str());
+ SkImageDecoder* codec = NULL;
+ SkFILEStream stream(resourcePath.c_str());
if (stream.isValid()) {
codec = SkImageDecoder::Factory(&stream);
}
« no previous file with comments | « gm/filterbitmap.cpp ('k') | gm/gm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698