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

Unified Diff: gm/dcshader.cpp

Issue 1120823002: Move resource fonts to common location. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove now unused variable. Created 5 years, 8 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/coloremoji.cpp ('k') | gm/dftext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/dcshader.cpp
diff --git a/gm/dcshader.cpp b/gm/dcshader.cpp
index 8120ff836ac5b693d5cf838ced759d89a7fe085e..6cfd00e84002916f2fefeb56a6e4daa2262dbacd 100644
--- a/gm/dcshader.cpp
+++ b/gm/dcshader.cpp
@@ -219,14 +219,7 @@ protected:
struct BmpText : public Text {
void setFont(SkPaint* paint) override {
if (!fTypeface) {
- SkString filename = GetResourcePath("/Funkster.ttf");
- SkAutoTDelete<SkFILEStream> stream(new SkFILEStream(filename.c_str()));
- if (!stream->isValid()) {
- SkDebugf("Could not find Funkster.ttf, please set --resourcePath "
- "correctly.\n");
- return;
- }
- fTypeface.reset(SkTypeface::CreateFromStream(stream.detach()));
+ fTypeface.reset(GetResourceAsTypeface("/fonts/Funkster.ttf"));
}
paint->setTypeface(fTypeface);
}
« no previous file with comments | « gm/coloremoji.cpp ('k') | gm/dftext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698