| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 "SkPaint.h" | 10 #include "SkPaint.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 canvas->drawCircle(c0.fX, c0.fY, r0, paint); | 49 canvas->drawCircle(c0.fX, c0.fY, r0, paint); |
| 50 canvas->drawCircle(c1.fX, c1.fY, r1, paint); | 50 canvas->drawCircle(c1.fX, c1.fY, r1, paint); |
| 51 canvas->drawRect(bounds, paint); | 51 canvas->drawRect(bounds, paint); |
| 52 } | 52 } |
| 53 | 53 |
| 54 class TwoPointRadialGM : public skiagm::GM { | 54 class TwoPointRadialGM : public skiagm::GM { |
| 55 public: | 55 public: |
| 56 TwoPointRadialGM() {} | 56 TwoPointRadialGM() {} |
| 57 | 57 |
| 58 protected: | 58 protected: |
| 59 virtual uint32_t onGetFlags() const SK_OVERRIDE { |
| 60 return kSkipTiled_Flag; |
| 61 } |
| 62 |
| 59 SkString onShortName() { | 63 SkString onShortName() { |
| 60 return SkString("twopointconical"); | 64 return SkString("twopointconical"); |
| 61 } | 65 } |
| 62 | 66 |
| 63 SkISize onISize() { return skiagm::make_isize(480, 780); } | 67 SkISize onISize() { return skiagm::make_isize(480, 780); } |
| 64 | 68 |
| 65 virtual void onDraw(SkCanvas* canvas) { | 69 virtual void onDraw(SkCanvas* canvas) { |
| 66 if (false) { | 70 if (false) { |
| 67 SkPaint paint; | 71 SkPaint paint; |
| 68 paint.setColor(SK_ColorBLUE); | 72 paint.setColor(SK_ColorBLUE); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 canvas->translate(0, DY); | 106 canvas->translate(0, DY); |
| 103 } | 107 } |
| 104 } | 108 } |
| 105 }; | 109 }; |
| 106 | 110 |
| 107 ////////////////////////////////////////////////////////////////////////////// | 111 ////////////////////////////////////////////////////////////////////////////// |
| 108 | 112 |
| 109 static skiagm::GM* F(void*) { return new TwoPointRadialGM; } | 113 static skiagm::GM* F(void*) { return new TwoPointRadialGM; } |
| 110 | 114 |
| 111 static skiagm::GMRegistry gR(F); | 115 static skiagm::GMRegistry gR(F); |
| OLD | NEW |