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 | 8 |
9 #if SK_SUPPORT_GPU | |
10 #include "GrRenderTarget.h" | |
11 #endif | |
12 #include "SkBenchmark.h" | 9 #include "SkBenchmark.h" |
13 #include "SkDeferredCanvas.h" | 10 #include "SkDeferredCanvas.h" |
14 #include "SkDevice.h" | 11 #include "SkDevice.h" |
15 #include "SkImage.h" | 12 #include "SkImage.h" |
16 #include "SkSurface.h" | 13 #include "SkSurface.h" |
| 14 #if SK_SUPPORT_GPU |
| 15 #include "GrRenderTarget.h" |
| 16 #endif |
17 | 17 |
18 class DeferredSurfaceCopyBench : public SkBenchmark { | 18 class DeferredSurfaceCopyBench : public SkBenchmark { |
19 enum { | 19 enum { |
20 kSurfaceWidth = 1000, | 20 kSurfaceWidth = 1000, |
21 kSurfaceHeight = 1000, | 21 kSurfaceHeight = 1000, |
22 }; | 22 }; |
23 public: | 23 public: |
24 DeferredSurfaceCopyBench(bool discardableContents) { | 24 DeferredSurfaceCopyBench(bool discardableContents) { |
25 fDiscardableContents = discardableContents; | 25 fDiscardableContents = discardableContents; |
26 } | 26 } |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 private: | 73 private: |
74 bool fDiscardableContents; | 74 bool fDiscardableContents; |
75 | 75 |
76 typedef SkBenchmark INHERITED; | 76 typedef SkBenchmark INHERITED; |
77 }; | 77 }; |
78 | 78 |
79 ////////////////////////////////////////////////////////////////////////////// | 79 ////////////////////////////////////////////////////////////////////////////// |
80 | 80 |
81 DEF_BENCH( return new DeferredSurfaceCopyBench(false); ) | 81 DEF_BENCH( return new DeferredSurfaceCopyBench(false); ) |
82 DEF_BENCH( return new DeferredSurfaceCopyBench(true); ) | 82 DEF_BENCH( return new DeferredSurfaceCopyBench(true); ) |
OLD | NEW |