OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 #include "gm.h" | 8 #include "gm.h" |
9 #include "SkGradientShader.h" | 9 #include "SkGradientShader.h" |
10 | 10 |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 typedef GM INHERITED; | 288 typedef GM INHERITED; |
289 }; | 289 }; |
290 | 290 |
291 /// Tests correctness of *optimized* codepaths in gradients. | 291 /// Tests correctness of *optimized* codepaths in gradients. |
292 | 292 |
293 class ClampedGradientsGM : public GM { | 293 class ClampedGradientsGM : public GM { |
294 public: | 294 public: |
295 ClampedGradientsGM() {} | 295 ClampedGradientsGM() {} |
296 | 296 |
297 protected: | 297 protected: |
298 virtual uint32_t onGetFlags() const SK_OVERRIDE { | |
299 return kSkipTiled_Flag; | |
300 } | |
301 | |
302 SkString onShortName() { return SkString("clamped_gradients"); } | 298 SkString onShortName() { return SkString("clamped_gradients"); } |
303 | 299 |
304 virtual SkISize onISize() { return SkISize::Make(640, 510); } | 300 virtual SkISize onISize() { return SkISize::Make(640, 510); } |
305 | 301 |
306 void drawBG(SkCanvas* canvas) { | 302 void drawBG(SkCanvas* canvas) { |
307 canvas->drawColor(0xFFDDDDDD); | 303 canvas->drawColor(0xFFDDDDDD); |
308 } | 304 } |
309 | 305 |
310 virtual void onDraw(SkCanvas* canvas) { | 306 virtual void onDraw(SkCanvas* canvas) { |
311 this->drawBG(canvas); | 307 this->drawBG(canvas); |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 | 454 |
459 static GM* MyFactory5(void*) { return new GradientsLocalPerspectiveGM; } | 455 static GM* MyFactory5(void*) { return new GradientsLocalPerspectiveGM; } |
460 static GMRegistry reg5(MyFactory5); | 456 static GMRegistry reg5(MyFactory5); |
461 | 457 |
462 static GM* MyFactory6(void*) { return new GradientsViewPerspectiveGM; } | 458 static GM* MyFactory6(void*) { return new GradientsViewPerspectiveGM; } |
463 static GMRegistry reg6(MyFactory6); | 459 static GMRegistry reg6(MyFactory6); |
464 | 460 |
465 static GM* MyFactory7(void*) { return new RadialGradient2GM; } | 461 static GM* MyFactory7(void*) { return new RadialGradient2GM; } |
466 static GMRegistry reg7(MyFactory7); | 462 static GMRegistry reg7(MyFactory7); |
467 } | 463 } |
OLD | NEW |