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

Unified Diff: gm/dftext.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/dcshader.cpp ('k') | gm/mixedtextblobs.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/dftext.cpp
diff --git a/gm/dftext.cpp b/gm/dftext.cpp
index 314ee71389942ed9100b1ab4b79b75cd666db968..63e7cdfa5e60438d1f49fd959ce5e6949c9d5c46 100755
--- a/gm/dftext.cpp
+++ b/gm/dftext.cpp
@@ -24,14 +24,7 @@ public:
protected:
void onOnceBeforeDraw() override {
- 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 = SkTypeface::CreateFromStream(stream.detach());
+ fTypeface = GetResourceAsTypeface("/fonts/Funkster.ttf");
}
SkString onShortName() override {
« no previous file with comments | « gm/dcshader.cpp ('k') | gm/mixedtextblobs.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698