OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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" |
11 | 11 |
12 #include <ctype.h> | 12 #include <ctype.h> |
13 | 13 |
14 /** This benchmark tests rendering rotated rectangles. It can optionally apply A
A and/or change the | 14 /** This benchmark tests rendering rotated rectangles. It can optionally apply A
A and/or change the |
15 paint color between each rect in different ways using the ColorType enum. Th
e xfermode used can | 15 paint color between each rect in different ways using the ColorType enum. Th
e xfermode used can |
16 be specified as well. | 16 be specified as well. |
17 */ | 17 */ |
18 | 18 |
19 enum ColorType { | 19 enum ColorType { |
20 kConstantOpaque_ColorType, | 20 kConstantOpaque_ColorType, |
21 kConstantTransparent_ColorType, | 21 kConstantTransparent_ColorType, |
22 kChangingOpaque_ColorType, | 22 kChangingOpaque_ColorType, |
23 kChangingTransparent_ColorType, | 23 kChangingTransparent_ColorType, |
24 kAlternatingOpaqueAndTransparent_ColorType, | 24 kAlternatingOpaqueAndTransparent_ColorType, |
25 }; | 25 }; |
26 | 26 |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 DEF_BENCH(return new RotRectBench(true, kConstantTransparent_ColorType,
SkXfermode::kDarken_Mode);) | 185 DEF_BENCH(return new RotRectBench(true, kConstantTransparent_ColorType,
SkXfermode::kDarken_Mode);) |
186 DEF_BENCH(return new RotRectBench(true, kChangingOpaque_ColorType,
SkXfermode::kDarken_Mode);) | 186 DEF_BENCH(return new RotRectBench(true, kChangingOpaque_ColorType,
SkXfermode::kDarken_Mode);) |
187 DEF_BENCH(return new RotRectBench(true, kChangingTransparent_ColorType,
SkXfermode::kDarken_Mode);) | 187 DEF_BENCH(return new RotRectBench(true, kChangingTransparent_ColorType,
SkXfermode::kDarken_Mode);) |
188 DEF_BENCH(return new RotRectBench(true, kAlternatingOpaqueAndTransparent_ColorT
ype, SkXfermode::kDarken_Mode);) | 188 DEF_BENCH(return new RotRectBench(true, kAlternatingOpaqueAndTransparent_ColorT
ype, SkXfermode::kDarken_Mode);) |
189 | 189 |
190 DEF_BENCH(return new RotRectBench(false, kConstantOpaque_ColorType,
SkXfermode::kDarken_Mode);) | 190 DEF_BENCH(return new RotRectBench(false, kConstantOpaque_ColorType,
SkXfermode::kDarken_Mode);) |
191 DEF_BENCH(return new RotRectBench(false, kConstantTransparent_ColorType,
SkXfermode::kDarken_Mode);) | 191 DEF_BENCH(return new RotRectBench(false, kConstantTransparent_ColorType,
SkXfermode::kDarken_Mode);) |
192 DEF_BENCH(return new RotRectBench(false, kChangingOpaque_ColorType,
SkXfermode::kDarken_Mode);) | 192 DEF_BENCH(return new RotRectBench(false, kChangingOpaque_ColorType,
SkXfermode::kDarken_Mode);) |
193 DEF_BENCH(return new RotRectBench(false, kChangingTransparent_ColorType,
SkXfermode::kDarken_Mode);) | 193 DEF_BENCH(return new RotRectBench(false, kChangingTransparent_ColorType,
SkXfermode::kDarken_Mode);) |
194 DEF_BENCH(return new RotRectBench(false, kAlternatingOpaqueAndTransparent_ColorT
ype, SkXfermode::kDarken_Mode);) | 194 DEF_BENCH(return new RotRectBench(false, kAlternatingOpaqueAndTransparent_ColorT
ype, SkXfermode::kDarken_Mode);) |
OLD | NEW |