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

Unified Diff: gm/filterbitmap.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/factory.cpp ('k') | gm/filterindiabox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/filterbitmap.cpp
diff --git a/gm/filterbitmap.cpp b/gm/filterbitmap.cpp
index 351fb2aaf752c08eaea26ab80cf8cf0ca1bc8893..d73318d31c233d4d23bbb1dedcf0d4fb110cf665 100644
--- a/gm/filterbitmap.cpp
+++ b/gm/filterbitmap.cpp
@@ -6,11 +6,12 @@
*/
#include "gm.h"
-#include "SkGradientShader.h"
-#include "SkTypeface.h"
+#include "Resources.h"
+#include "SkGradientShader.h"
#include "SkImageDecoder.h"
#include "SkStream.h"
+#include "SkTypeface.h"
static void setTypeface(SkPaint* paint, const char name[], SkTypeface::Style style) {
SkSafeUnref(paint->setTypeface(SkTypeface::CreateFromName(name, style)));
@@ -193,12 +194,12 @@ class FilterBitmapImageGM: public FilterBitmapGM {
}
void makeBitmap() SK_OVERRIDE {
- 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/factory.cpp ('k') | gm/filterindiabox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698