| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 #include "gm.h" | 7 #include "gm.h" |
| 8 #include "Resources.h" | 8 #include "Resources.h" |
| 9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
| 10 #include "SkStream.h" | 10 #include "SkStream.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 SkString filename = GetResourcePath("/Funkster.ttf"); | 27 SkString filename = GetResourcePath("/Funkster.ttf"); |
| 28 SkAutoTDelete<SkFILEStream> stream(new SkFILEStream(filename.c_str())); | 28 SkAutoTDelete<SkFILEStream> stream(new SkFILEStream(filename.c_str())); |
| 29 if (!stream->isValid()) { | 29 if (!stream->isValid()) { |
| 30 SkDebugf("Could not find Funkster.ttf, please set --resourcePath cor
rectly.\n"); | 30 SkDebugf("Could not find Funkster.ttf, please set --resourcePath cor
rectly.\n"); |
| 31 return; | 31 return; |
| 32 } | 32 } |
| 33 | 33 |
| 34 fTypeface = SkTypeface::CreateFromStream(stream.detach()); | 34 fTypeface = SkTypeface::CreateFromStream(stream.detach()); |
| 35 } | 35 } |
| 36 | 36 |
| 37 uint32_t onGetFlags() const SK_OVERRIDE { | |
| 38 return kGPUOnly_Flag; | |
| 39 } | |
| 40 | |
| 41 SkString onShortName() SK_OVERRIDE { | 37 SkString onShortName() SK_OVERRIDE { |
| 42 return SkString("dftext"); | 38 return SkString("dftext"); |
| 43 } | 39 } |
| 44 | 40 |
| 45 SkISize onISize() SK_OVERRIDE { | 41 SkISize onISize() SK_OVERRIDE { |
| 46 return SkISize::Make(1024, 768); | 42 return SkISize::Make(1024, 768); |
| 47 } | 43 } |
| 48 | 44 |
| 49 static void rotate_about(SkCanvas* canvas, | 45 static void rotate_about(SkCanvas* canvas, |
| 50 SkScalar degrees, | 46 SkScalar degrees, |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 #endif | 213 #endif |
| 218 } | 214 } |
| 219 | 215 |
| 220 private: | 216 private: |
| 221 SkTypeface* fTypeface; | 217 SkTypeface* fTypeface; |
| 222 | 218 |
| 223 typedef skiagm::GM INHERITED; | 219 typedef skiagm::GM INHERITED; |
| 224 }; | 220 }; |
| 225 | 221 |
| 226 DEF_GM( return SkNEW(DFTextGM); ) | 222 DEF_GM( return SkNEW(DFTextGM); ) |
| OLD | NEW |