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); |
} |