| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 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 "SkBitmap.h" | 9 #include "SkBitmap.h" |
| 10 #include "SkRandom.h" | 10 #include "SkRandom.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 canvas->translate(dx, dy); | 117 canvas->translate(dx, dy); |
| 118 canvas->scale(s, s); | 118 canvas->scale(s, s); |
| 119 canvas->rotate(r); | 119 canvas->rotate(r); |
| 120 this->drawShape(canvas, p, &random); | 120 this->drawShape(canvas, p, &random); |
| 121 canvas->restore(); | 121 canvas->restore(); |
| 122 } | 122 } |
| 123 } | 123 } |
| 124 | 124 |
| 125 virtual uint32_t onGetFlags() const { | 125 virtual uint32_t onGetFlags() const { |
| 126 // Skip PDF rasterization since rendering this PDF takes forever. | 126 // Skip PDF rasterization since rendering this PDF takes forever. |
| 127 return kSkipPDFRasterization_Flag; | 127 return kSkipPDFRasterization_Flag | kSkipTiled_Flag; |
| 128 } | 128 } |
| 129 | 129 |
| 130 private: | 130 private: |
| 131 enum { | 131 enum { |
| 132 kNumShapes = 100, | 132 kNumShapes = 100, |
| 133 }; | 133 }; |
| 134 SkAutoTUnref<SkShader> fBG; | 134 SkAutoTUnref<SkShader> fBG; |
| 135 SkPath fConcavePath; | 135 SkPath fConcavePath; |
| 136 SkPath fConvexPath; | 136 SkPath fConvexPath; |
| 137 typedef GM INHERITED; | 137 typedef GM INHERITED; |
| 138 }; | 138 }; |
| 139 | 139 |
| 140 ////////////////////////////////////////////////////////////////////////////// | 140 ////////////////////////////////////////////////////////////////////////////// |
| 141 | 141 |
| 142 static GM* MyFactory(void*) { return new MixedXfermodesGM; } | 142 static GM* MyFactory(void*) { return new MixedXfermodesGM; } |
| 143 static GMRegistry reg(MyFactory); | 143 static GMRegistry reg(MyFactory); |
| 144 | 144 |
| 145 } | 145 } |
| OLD | NEW |