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

Unified Diff: gm/coloremoji.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 | « bench/TextBench.cpp ('k') | gm/dcshader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/coloremoji.cpp
diff --git a/gm/coloremoji.cpp b/gm/coloremoji.cpp
index 5a2703b4afd9040a5003f58d966b53a0b74f6387..36897c52a87279523e9e49831d83f86bb09a10f0 100644
--- a/gm/coloremoji.cpp
+++ b/gm/coloremoji.cpp
@@ -54,15 +54,8 @@ protected:
const char* text;
} emojiFonts[2];
virtual void onOnceBeforeDraw() override {
- SkString filename = GetResourcePath("/Funkster.ttf");
- SkAutoTDelete<SkFILEStream> stream(new SkFILEStream(filename.c_str()));
- if (stream->isValid()) {
- fCBDT_CBLC_Typeface.reset(SkTypeface::CreateFromStream(stream.detach()));
- emojiFonts[0].typeface = fCBDT_CBLC_Typeface;
- } else {
- SkDebugf("Could not find Funkster.ttf, please set --resourcePath correctly.\n");
- emojiFonts[0].typeface = NULL;
- }
+ fCBDT_CBLC_Typeface.reset(GetResourceAsTypeface("/fonts/Funkster.ttf"));
+ emojiFonts[0].typeface = fCBDT_CBLC_Typeface;
emojiFonts[0].text = "hamburgerfons";
fSBIX_Typeface.reset(SkTypeface::CreateFromName("Apple Color Emoji", SkTypeface::kNormal));
« no previous file with comments | « bench/TextBench.cpp ('k') | gm/dcshader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698