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

Side by Side Diff: bench/DeferredCanvasBench.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/DecodeBench.cpp ('k') | bench/DeferredSurfaceCopyBench.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 * Copyright 2012 Google Inc. 2 * Copyright 2012 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 #include "SkBenchmark.h" 7 #include "Benchmark.h"
8 #include "SkDeferredCanvas.h" 8 #include "SkDeferredCanvas.h"
9 #include "SkDevice.h" 9 #include "SkDevice.h"
10 #include "SkString.h" 10 #include "SkString.h"
11 11
12 class DeferredCanvasBench : public SkBenchmark { 12 class DeferredCanvasBench : public Benchmark {
13 public: 13 public:
14 DeferredCanvasBench(const char name[]) { 14 DeferredCanvasBench(const char name[]) {
15 fName.printf("deferred_canvas_%s", name); 15 fName.printf("deferred_canvas_%s", name);
16 } 16 }
17 17
18 enum { 18 enum {
19 CANVAS_WIDTH = 200, 19 CANVAS_WIDTH = 200,
20 CANVAS_HEIGHT = 200, 20 CANVAS_HEIGHT = 200,
21 }; 21 };
22 protected: 22 protected:
(...skipping 16 matching lines...) Expand all
39 #endif 39 #endif
40 } 40 }
41 41
42 virtual void initDeferredCanvas(SkDeferredCanvas* canvas) = 0; 42 virtual void initDeferredCanvas(SkDeferredCanvas* canvas) = 0;
43 virtual void drawInDeferredCanvas(const int loops, SkDeferredCanvas* canvas) = 0; 43 virtual void drawInDeferredCanvas(const int loops, SkDeferredCanvas* canvas) = 0;
44 virtual void finalizeDeferredCanvas(SkDeferredCanvas* canvas) = 0; 44 virtual void finalizeDeferredCanvas(SkDeferredCanvas* canvas) = 0;
45 45
46 SkString fName; 46 SkString fName;
47 47
48 private: 48 private:
49 typedef SkBenchmark INHERITED; 49 typedef Benchmark INHERITED;
50 }; 50 };
51 51
52 class SimpleNotificationClient : public SkDeferredCanvas::NotificationClient { 52 class SimpleNotificationClient : public SkDeferredCanvas::NotificationClient {
53 public: 53 public:
54 SimpleNotificationClient() : fDummy(false) {} 54 SimpleNotificationClient() : fDummy(false) {}
55 55
56 //bogus virtual implementations that just do something small 56 //bogus virtual implementations that just do something small
57 virtual void prepareForDraw() SK_OVERRIDE {fDummy = true;} 57 virtual void prepareForDraw() SK_OVERRIDE {fDummy = true;}
58 virtual void storageAllocatedForRecordingChanged(size_t) SK_OVERRIDE {fDummy = false;} 58 virtual void storageAllocatedForRecordingChanged(size_t) SK_OVERRIDE {fDummy = false;}
59 virtual void flushedDrawCommands() SK_OVERRIDE {fDummy = !fDummy;} 59 virtual void flushedDrawCommands() SK_OVERRIDE {fDummy = !fDummy;}
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 private: 98 private:
99 typedef DeferredCanvasBench INHERITED; 99 typedef DeferredCanvasBench INHERITED;
100 SimpleNotificationClient fNotificationClient; 100 SimpleNotificationClient fNotificationClient;
101 }; 101 };
102 102
103 103
104 /////////////////////////////////////////////////////////////////////////////// 104 ///////////////////////////////////////////////////////////////////////////////
105 105
106 DEF_BENCH( return new DeferredRecordBench(); ) 106 DEF_BENCH( return new DeferredRecordBench(); )
OLDNEW
« no previous file with comments | « bench/DecodeBench.cpp ('k') | bench/DeferredSurfaceCopyBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698