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