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 "SkCanvas.h" | 8 #include "SkCanvas.h" |
9 #include "SkGradientShader.h" | 9 #include "SkGradientShader.h" |
10 #include "SkUnitMappers.h" | 10 #include "SkUnitMappers.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 static const int kTextLen = SK_ARRAY_COUNT(kText) - 1; | 51 static const int kTextLen = SK_ARRAY_COUNT(kText) - 1; |
52 static const int kPointSize = 300; | 52 static const int kPointSize = 300; |
53 | 53 |
54 class ShaderText3GM : public GM { | 54 class ShaderText3GM : public GM { |
55 public: | 55 public: |
56 ShaderText3GM() { | 56 ShaderText3GM() { |
57 this->setBGColor(0xFFDDDDDD); | 57 this->setBGColor(0xFFDDDDDD); |
58 } | 58 } |
59 | 59 |
60 protected: | 60 protected: |
| 61 virtual uint32_t onGetFlags() const SK_OVERRIDE { |
| 62 return kSkipTiled_Flag; |
| 63 } |
61 | 64 |
62 virtual SkString onShortName() SK_OVERRIDE { | 65 virtual SkString onShortName() SK_OVERRIDE { |
63 return SkString("shadertext3"); | 66 return SkString("shadertext3"); |
64 } | 67 } |
65 | 68 |
66 virtual SkISize onISize() SK_OVERRIDE{ return make_isize(800, 1000); } | 69 virtual SkISize onISize() SK_OVERRIDE{ return make_isize(800, 1000); } |
67 | 70 |
68 virtual void onOnceBeforeDraw() SK_OVERRIDE { | 71 virtual void onOnceBeforeDraw() SK_OVERRIDE { |
69 makebm(&fBmp, kPointSize / 4, kPointSize / 4); | 72 makebm(&fBmp, kPointSize / 4, kPointSize / 4); |
70 } | 73 } |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 private: | 137 private: |
135 SkBitmap fBmp; | 138 SkBitmap fBmp; |
136 typedef GM INHERITED; | 139 typedef GM INHERITED; |
137 }; | 140 }; |
138 | 141 |
139 /////////////////////////////////////////////////////////////////////////////// | 142 /////////////////////////////////////////////////////////////////////////////// |
140 | 143 |
141 static GM* MyFactory(void*) { return new ShaderText3GM; } | 144 static GM* MyFactory(void*) { return new ShaderText3GM; } |
142 static GMRegistry reg(MyFactory); | 145 static GMRegistry reg(MyFactory); |
143 } | 146 } |
OLD | NEW |