Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Side by Side Diff: bench/DeferredSurfaceCopyBench.cpp

Issue 347823004: Remove Sk prefix from some bench classes. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: SkGMBench -> GMBench Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « bench/DeferredCanvasBench.cpp ('k') | bench/DisplacementBench.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "SkBenchmark.h" 9 #include "Benchmark.h"
10 #include "SkDeferredCanvas.h" 10 #include "SkDeferredCanvas.h"
11 #include "SkDevice.h" 11 #include "SkDevice.h"
12 #include "SkImage.h" 12 #include "SkImage.h"
13 #include "SkSurface.h" 13 #include "SkSurface.h"
14 #if SK_SUPPORT_GPU 14 #if SK_SUPPORT_GPU
15 #include "GrRenderTarget.h" 15 #include "GrRenderTarget.h"
16 #endif 16 #endif
17 17
18 class DeferredSurfaceCopyBench : public SkBenchmark { 18 class DeferredSurfaceCopyBench : public Benchmark {
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 }
27 27
28 protected: 28 protected:
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 } 66 }
67 drawingCanvas->drawRect(fullCanvasRect, paint); 67 drawingCanvas->drawRect(fullCanvasRect, paint);
68 // Trigger copy on write, which should be faster in the discardable case. 68 // Trigger copy on write, which should be faster in the discardable case.
69 drawingCanvas->flush(); 69 drawingCanvas->flush();
70 } 70 }
71 } 71 }
72 72
73 private: 73 private:
74 bool fDiscardableContents; 74 bool fDiscardableContents;
75 75
76 typedef SkBenchmark INHERITED; 76 typedef Benchmark 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); )
OLDNEW
« no previous file with comments | « bench/DeferredCanvasBench.cpp ('k') | bench/DisplacementBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698