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 "SkBlurMaskFilter.h" | 9 #include "SkBlurMaskFilter.h" |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
11 #include "SkLayerDrawLooper.h" | 11 #include "SkLayerDrawLooper.h" |
12 #include "SkPaint.h" | 12 #include "SkPaint.h" |
| 13 #include "SkPath.h" |
13 #include "SkRandom.h" | 14 #include "SkRandom.h" |
14 | 15 |
15 // This bench replicates a problematic use case of a draw looper used | 16 // This bench replicates a problematic use case of a draw looper used |
16 // to create an inner blurred rect | 17 // to create an inner blurred rect |
17 class RectoriBench : public Benchmark { | 18 class RectoriBench : public Benchmark { |
18 public: | 19 public: |
19 RectoriBench() {} | 20 RectoriBench() {} |
20 | 21 |
21 protected: | 22 protected: |
22 | 23 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 info.fOffset.set(0, 0); | 96 info.fOffset.set(0, 0); |
96 | 97 |
97 paint = looperBuilder.addLayer(info); | 98 paint = looperBuilder.addLayer(info); |
98 return looperBuilder.detachLooper(); | 99 return looperBuilder.detachLooper(); |
99 } | 100 } |
100 | 101 |
101 typedef Benchmark INHERITED; | 102 typedef Benchmark INHERITED; |
102 }; | 103 }; |
103 | 104 |
104 DEF_BENCH( return SkNEW_ARGS(RectoriBench, ()); ) | 105 DEF_BENCH( return SkNEW_ARGS(RectoriBench, ()); ) |
OLD | NEW |