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 "Benchmark.h" | 8 #include "Benchmark.h" |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkPaint.h" | 10 #include "SkPaint.h" |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 SkIntToScalar(points[base3] + xTrans), | 174 SkIntToScalar(points[base3] + xTrans), |
175 SkIntToScalar(points[base3+1] + yTrans), | 175 SkIntToScalar(points[base3+1] + yTrans), |
176 weight); | 176 weight); |
177 } | 177 } |
178 } | 178 } |
179 | 179 |
180 virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { | 180 virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { |
181 #if SK_SUPPORT_GPU | 181 #if SK_SUPPORT_GPU |
182 GrContext* context = canvas->getGrContext(); | 182 GrContext* context = canvas->getGrContext(); |
183 // This is a workaround for skbug.com/2078. See also skbug.com/2033. | 183 // This is a workaround for skbug.com/2078. See also skbug.com/2033. |
184 if (NULL != context) { | 184 if (context) { |
185 GrTestTarget tt; | 185 GrTestTarget tt; |
186 context->getTestTarget(&tt); | 186 context->getTestTarget(&tt); |
187 if (tt.target()->caps()->pathRenderingSupport()) { | 187 if (tt.target()->caps()->pathRenderingSupport()) { |
188 return; | 188 return; |
189 } | 189 } |
190 } | 190 } |
191 #endif | 191 #endif |
192 INHERITED::onDraw(loops, canvas); | 192 INHERITED::onDraw(loops, canvas); |
193 } | 193 } |
194 | 194 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 // Don't have default path renderer for conics yet on GPU, so must use AA | 249 // Don't have default path renderer for conics yet on GPU, so must use AA |
250 // DEF_BENCH( return new ConicPathBench(FLAGS00); ) | 250 // DEF_BENCH( return new ConicPathBench(FLAGS00); ) |
251 // DEF_BENCH( return new ConicPathBench(FLAGS01); ) | 251 // DEF_BENCH( return new ConicPathBench(FLAGS01); ) |
252 DEF_BENCH( return new ConicPathBench(FLAGS10); ) | 252 DEF_BENCH( return new ConicPathBench(FLAGS10); ) |
253 DEF_BENCH( return new ConicPathBench(FLAGS11); ) | 253 DEF_BENCH( return new ConicPathBench(FLAGS11); ) |
254 | 254 |
255 DEF_BENCH( return new CubicPathBench(FLAGS00); ) | 255 DEF_BENCH( return new CubicPathBench(FLAGS00); ) |
256 DEF_BENCH( return new CubicPathBench(FLAGS01); ) | 256 DEF_BENCH( return new CubicPathBench(FLAGS01); ) |
257 DEF_BENCH( return new CubicPathBench(FLAGS10); ) | 257 DEF_BENCH( return new CubicPathBench(FLAGS10); ) |
258 DEF_BENCH( return new CubicPathBench(FLAGS11); ) | 258 DEF_BENCH( return new CubicPathBench(FLAGS11); ) |
OLD | NEW |