| 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 "SkColorPriv.h" | 10 #include "SkColorPriv.h" |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 namespace skiagm { | 126 namespace skiagm { |
| 127 | 127 |
| 128 class AARectModesGM : public GM { | 128 class AARectModesGM : public GM { |
| 129 SkPaint fBGPaint; | 129 SkPaint fBGPaint; |
| 130 public: | 130 public: |
| 131 AARectModesGM () { | 131 AARectModesGM () { |
| 132 fBGPaint.setShader(make_bg_shader())->unref(); | 132 fBGPaint.setShader(make_bg_shader())->unref(); |
| 133 } | 133 } |
| 134 | 134 |
| 135 protected: | 135 protected: |
| 136 virtual uint32_t onGetFlags() const SK_OVERRIDE { |
| 137 return kSkipTiled_Flag; |
| 138 } |
| 136 | 139 |
| 137 virtual SkString onShortName() { | 140 virtual SkString onShortName() { |
| 138 return SkString("aarectmodes"); | 141 return SkString("aarectmodes"); |
| 139 } | 142 } |
| 140 | 143 |
| 141 virtual SkISize onISize() { return make_isize(640, 480); } | 144 virtual SkISize onISize() { return make_isize(640, 480); } |
| 142 | 145 |
| 143 virtual void onDraw(SkCanvas* canvas) { | 146 virtual void onDraw(SkCanvas* canvas) { |
| 144 if (false) { // avoid bit rot, suppress warning | 147 if (false) { // avoid bit rot, suppress warning |
| 145 test4(canvas); | 148 test4(canvas); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 private: | 182 private: |
| 180 typedef GM INHERITED; | 183 typedef GM INHERITED; |
| 181 }; | 184 }; |
| 182 | 185 |
| 183 ////////////////////////////////////////////////////////////////////////////// | 186 ////////////////////////////////////////////////////////////////////////////// |
| 184 | 187 |
| 185 static GM* MyFactory(void*) { return new AARectModesGM; } | 188 static GM* MyFactory(void*) { return new AARectModesGM; } |
| 186 static GMRegistry reg(MyFactory); | 189 static GMRegistry reg(MyFactory); |
| 187 | 190 |
| 188 } | 191 } |
| OLD | NEW |