Chromium Code Reviews| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 101 public: | 101 public: |
| 102 GradientsGM() { | 102 GradientsGM() { |
| 103 this->setBGColor(0xFFDDDDDD); | 103 this->setBGColor(0xFFDDDDDD); |
| 104 } | 104 } |
| 105 | 105 |
| 106 protected: | 106 protected: |
| 107 SkString onShortName() { | 107 SkString onShortName() { |
| 108 return SkString("gradients"); | 108 return SkString("gradients"); |
| 109 } | 109 } |
| 110 | 110 |
| 111 virtual SkISize onISize() { return make_isize(640, 615); } | 111 virtual SkISize onISize() { return make_isize(840, 815); } |
|
vandebo (ex-Chrome)
2013/09/12 21:37:05
Of course, this will require a rebaseline across a
edisonn
2013/09/17 15:14:23
yep - the view needs to be extended
| |
| 112 | 112 |
| 113 virtual void onDraw(SkCanvas* canvas) { | 113 virtual void onDraw(SkCanvas* canvas) { |
| 114 | 114 |
| 115 SkPoint pts[2] = { | 115 SkPoint pts[2] = { |
| 116 { 0, 0 }, | 116 { 0, 0 }, |
| 117 { SkIntToScalar(100), SkIntToScalar(100) } | 117 { SkIntToScalar(100), SkIntToScalar(100) } |
| 118 }; | 118 }; |
| 119 SkShader::TileMode tm = SkShader::kClamp_TileMode; | 119 SkShader::TileMode tm = SkShader::kClamp_TileMode; |
| 120 SkRect r = { 0, 0, SkIntToScalar(100), SkIntToScalar(100) }; | 120 SkRect r = { 0, 0, SkIntToScalar(100), SkIntToScalar(100) }; |
| 121 SkPaint paint; | 121 SkPaint paint; |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 428 | 428 |
| 429 static GM* MyFactory5(void*) { return new GradientsLocalPerspectiveGM; } | 429 static GM* MyFactory5(void*) { return new GradientsLocalPerspectiveGM; } |
| 430 static GMRegistry reg5(MyFactory5); | 430 static GMRegistry reg5(MyFactory5); |
| 431 | 431 |
| 432 static GM* MyFactory6(void*) { return new GradientsViewPerspectiveGM; } | 432 static GM* MyFactory6(void*) { return new GradientsViewPerspectiveGM; } |
| 433 static GMRegistry reg6(MyFactory6); | 433 static GMRegistry reg6(MyFactory6); |
| 434 | 434 |
| 435 static GM* MyFactory7(void*) { return new RadialGradient2GM; } | 435 static GM* MyFactory7(void*) { return new RadialGradient2GM; } |
| 436 static GMRegistry reg7(MyFactory7); | 436 static GMRegistry reg7(MyFactory7); |
| 437 } | 437 } |
| OLD | NEW |