| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "SkPath.h" | 10 #include "SkPath.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 fCircle1.addCircle(fX1, fY, fR, SkPath::kCW_Direction); | 23 fCircle1.addCircle(fX1, fY, fR, SkPath::kCW_Direction); |
| 24 fCircle2.addCircle(fX2, fY, fR, SkPath::kCW_Direction); | 24 fCircle2.addCircle(fX2, fY, fR, SkPath::kCW_Direction); |
| 25 } | 25 } |
| 26 | 26 |
| 27 protected: | 27 protected: |
| 28 virtual uint32_t onGetFlags() const SK_OVERRIDE { | 28 virtual uint32_t onGetFlags() const SK_OVERRIDE { |
| 29 return kSkipTiled_Flag | kAsBench_Flag; | 29 return kSkipTiled_Flag | kAsBench_Flag; |
| 30 } | 30 } |
| 31 | 31 |
| 32 virtual SkString onShortName() { | 32 virtual SkString onShortName() SK_OVERRIDE { |
| 33 return SkString("circular-clips"); | 33 return SkString("circular-clips"); |
| 34 } | 34 } |
| 35 | 35 |
| 36 virtual SkISize onISize() { | 36 virtual SkISize onISize() SK_OVERRIDE { |
| 37 return SkISize::Make(800, 600); | 37 return SkISize::Make(800, 600); |
| 38 } | 38 } |
| 39 | 39 |
| 40 virtual void onDraw(SkCanvas* canvas) { | 40 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { |
| 41 SkRegion::Op ops[] = { | 41 SkRegion::Op ops[] = { |
| 42 SkRegion::kDifference_Op, | 42 SkRegion::kDifference_Op, |
| 43 SkRegion::kIntersect_Op, | 43 SkRegion::kIntersect_Op, |
| 44 SkRegion::kUnion_Op, | 44 SkRegion::kUnion_Op, |
| 45 SkRegion::kXOR_Op, | 45 SkRegion::kXOR_Op, |
| 46 SkRegion::kReverseDifference_Op, | 46 SkRegion::kReverseDifference_Op, |
| 47 SkRegion::kReplace_Op, | 47 SkRegion::kReplace_Op, |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 SkRect rect = SkRect::MakeLTRB(fX1 - fR, fY - fR, fX2 + fR, fY + fR); | 50 SkRect rect = SkRect::MakeLTRB(fX1 - fR, fY - fR, fX2 + fR, fY + fR); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 74 } | 74 } |
| 75 } | 75 } |
| 76 | 76 |
| 77 private: | 77 private: |
| 78 typedef skiagm::GM INHERITED; | 78 typedef skiagm::GM INHERITED; |
| 79 }; | 79 }; |
| 80 | 80 |
| 81 ////////////////////////////////////////////////////////////////////////////// | 81 ////////////////////////////////////////////////////////////////////////////// |
| 82 | 82 |
| 83 DEF_GM( return new CircularClipsGM; ) | 83 DEF_GM( return new CircularClipsGM; ) |
| OLD | NEW |