| 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 | 7 |
| 8 #include "gm.h" | 8 #include "gm.h" |
| 9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
| 10 #include "SkGradientShader.h" | 10 #include "SkGradientShader.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 typedef GM INHERITED; | 95 typedef GM INHERITED; |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 | 98 |
| 99 | 99 |
| 100 class GradTextGM : public GM { | 100 class GradTextGM : public GM { |
| 101 public: | 101 public: |
| 102 GradTextGM () {} | 102 GradTextGM () {} |
| 103 | 103 |
| 104 protected: | 104 protected: |
| 105 virtual SkString onShortName() SK_OVERRIDE { | 105 SkString onShortName() SK_OVERRIDE { |
| 106 return SkString("gradtext"); | 106 return SkString("gradtext"); |
| 107 } | 107 } |
| 108 | 108 |
| 109 uint32_t onGetFlags() const SK_OVERRIDE { | 109 uint32_t onGetFlags() const SK_OVERRIDE { |
| 110 return kSkipTiled_Flag; | 110 return kSkipTiled_Flag; |
| 111 } | 111 } |
| 112 | 112 |
| 113 SkISize onISize() SK_OVERRIDE { return SkISize::Make(500, 480); } | 113 SkISize onISize() SK_OVERRIDE { return SkISize::Make(500, 480); } |
| 114 | 114 |
| 115 static void draw_text(SkCanvas* canvas, const SkPaint& paint) { | 115 static void draw_text(SkCanvas* canvas, const SkPaint& paint) { |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 ////////////////////////////////////////////////////////////////////////////// | 163 ////////////////////////////////////////////////////////////////////////////// |
| 164 | 164 |
| 165 static GM* MyFactory(void*) { return new GradTextGM; } | 165 static GM* MyFactory(void*) { return new GradTextGM; } |
| 166 static GM* CMyFactory(void*) { return new ChromeGradTextGM1; } | 166 static GM* CMyFactory(void*) { return new ChromeGradTextGM1; } |
| 167 static GM* CMyFactory2(void*) { return new ChromeGradTextGM2; } | 167 static GM* CMyFactory2(void*) { return new ChromeGradTextGM2; } |
| 168 | 168 |
| 169 static GMRegistry reg(MyFactory); | 169 static GMRegistry reg(MyFactory); |
| 170 static GMRegistry Creg(CMyFactory); | 170 static GMRegistry Creg(CMyFactory); |
| 171 static GMRegistry Creg2(CMyFactory2); | 171 static GMRegistry Creg2(CMyFactory2); |
| 172 } | 172 } |
| OLD | NEW |