| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 static const int kTextLen = SK_ARRAY_COUNT(kText) - 1; | 45 static const int kTextLen = SK_ARRAY_COUNT(kText) - 1; |
| 46 static const int kPointSize = 300; | 46 static const int kPointSize = 300; |
| 47 | 47 |
| 48 class ShaderText3GM : public GM { | 48 class ShaderText3GM : public GM { |
| 49 public: | 49 public: |
| 50 ShaderText3GM() { | 50 ShaderText3GM() { |
| 51 this->setBGColor(0xFFDDDDDD); | 51 this->setBGColor(0xFFDDDDDD); |
| 52 } | 52 } |
| 53 | 53 |
| 54 protected: | 54 protected: |
| 55 uint32_t onGetFlags() const SK_OVERRIDE { | |
| 56 return kSkipTiled_Flag; | |
| 57 } | |
| 58 | 55 |
| 59 SkString onShortName() SK_OVERRIDE { | 56 SkString onShortName() SK_OVERRIDE { |
| 60 return SkString("shadertext3"); | 57 return SkString("shadertext3"); |
| 61 } | 58 } |
| 62 | 59 |
| 63 SkISize onISize() SK_OVERRIDE{ return SkISize::Make(800, 1000); } | 60 SkISize onISize() SK_OVERRIDE{ return SkISize::Make(800, 1000); } |
| 64 | 61 |
| 65 void onOnceBeforeDraw() SK_OVERRIDE { | 62 void onOnceBeforeDraw() SK_OVERRIDE { |
| 66 makebm(&fBmp, kPointSize / 4, kPointSize / 4); | 63 makebm(&fBmp, kPointSize / 4, kPointSize / 4); |
| 67 } | 64 } |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 private: | 130 private: |
| 134 SkBitmap fBmp; | 131 SkBitmap fBmp; |
| 135 typedef GM INHERITED; | 132 typedef GM INHERITED; |
| 136 }; | 133 }; |
| 137 | 134 |
| 138 /////////////////////////////////////////////////////////////////////////////// | 135 /////////////////////////////////////////////////////////////////////////////// |
| 139 | 136 |
| 140 static GM* MyFactory(void*) { return new ShaderText3GM; } | 137 static GM* MyFactory(void*) { return new ShaderText3GM; } |
| 141 static GMRegistry reg(MyFactory); | 138 static GMRegistry reg(MyFactory); |
| 142 } | 139 } |
| OLD | NEW |