| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 | 7 |
| 8 #include "gm.h" | 8 #include "gm.h" |
| 9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
| 10 #include "SkStream.h" | 10 #include "SkStream.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 } | 38 } |
| 39 | 39 |
| 40 fTypeface = SkTypeface::CreateFromStream(stream); | 40 fTypeface = SkTypeface::CreateFromStream(stream); |
| 41 } | 41 } |
| 42 | 42 |
| 43 virtual SkString onShortName() { | 43 virtual SkString onShortName() { |
| 44 return SkString("coloremoji"); | 44 return SkString("coloremoji"); |
| 45 } | 45 } |
| 46 | 46 |
| 47 virtual SkISize onISize() { | 47 virtual SkISize onISize() { |
| 48 return make_isize(640, 480); | 48 return SkISize::Make(640, 480); |
| 49 } | 49 } |
| 50 | 50 |
| 51 virtual void onDraw(SkCanvas* canvas) { | 51 virtual void onDraw(SkCanvas* canvas) { |
| 52 | 52 |
| 53 canvas->drawColor(SK_ColorGRAY); | 53 canvas->drawColor(SK_ColorGRAY); |
| 54 | 54 |
| 55 SkPaint paint; | 55 SkPaint paint; |
| 56 paint.setTypeface(fTypeface); | 56 paint.setTypeface(fTypeface); |
| 57 | 57 |
| 58 const char* text = "hamburgerfons"; | 58 const char* text = "hamburgerfons"; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 | 110 |
| 111 typedef GM INHERITED; | 111 typedef GM INHERITED; |
| 112 }; | 112 }; |
| 113 | 113 |
| 114 ////////////////////////////////////////////////////////////////////////////// | 114 ////////////////////////////////////////////////////////////////////////////// |
| 115 | 115 |
| 116 static GM* MyFactory(void*) { return new ColorEmojiGM; } | 116 static GM* MyFactory(void*) { return new ColorEmojiGM; } |
| 117 static GMRegistry reg(MyFactory); | 117 static GMRegistry reg(MyFactory); |
| 118 | 118 |
| 119 } | 119 } |
| OLD | NEW |