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

Side by Side Diff: bench/ChartBench.cpp

Issue 1037793002: C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla} (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: git cl web Created 5 years, 9 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/BlurRoundRectBench.cpp ('k') | bench/ChecksumBench.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 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 "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkPaint.h" 10 #include "SkPaint.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 class ChartBench : public Benchmark { 87 class ChartBench : public Benchmark {
88 public: 88 public:
89 ChartBench(bool aa) { 89 ChartBench(bool aa) {
90 fShift = 0; 90 fShift = 0;
91 fAA = aa; 91 fAA = aa;
92 fSize.fWidth = -1; 92 fSize.fWidth = -1;
93 fSize.fHeight = -1; 93 fSize.fHeight = -1;
94 } 94 }
95 95
96 protected: 96 protected:
97 const char* onGetName() SK_OVERRIDE { 97 const char* onGetName() override {
98 if (fAA) { 98 if (fAA) {
99 return "chart_aa"; 99 return "chart_aa";
100 } else { 100 } else {
101 return "chart_bw"; 101 return "chart_bw";
102 } 102 }
103 } 103 }
104 104
105 void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { 105 void onDraw(const int loops, SkCanvas* canvas) override {
106 bool sizeChanged = false; 106 bool sizeChanged = false;
107 if (canvas->getDeviceSize() != fSize) { 107 if (canvas->getDeviceSize() != fSize) {
108 fSize = canvas->getDeviceSize(); 108 fSize = canvas->getDeviceSize();
109 sizeChanged = true; 109 sizeChanged = true;
110 } 110 }
111 111
112 SkScalar ySpread = SkIntToScalar(fSize.fHeight / 20); 112 SkScalar ySpread = SkIntToScalar(fSize.fHeight / 20);
113 113
114 SkScalar height = SkIntToScalar(fSize.fHeight); 114 SkScalar height = SkIntToScalar(fSize.fHeight);
115 if (sizeChanged) { 115 if (sizeChanged) {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 SkTDArray<SkScalar> fData[kNumGraphs]; 183 SkTDArray<SkScalar> fData[kNumGraphs];
184 bool fAA; 184 bool fAA;
185 185
186 typedef Benchmark INHERITED; 186 typedef Benchmark INHERITED;
187 }; 187 };
188 188
189 ////////////////////////////////////////////////////////////////////////////// 189 //////////////////////////////////////////////////////////////////////////////
190 190
191 DEF_BENCH( return new ChartBench(true); ) 191 DEF_BENCH( return new ChartBench(true); )
192 DEF_BENCH( return new ChartBench(false); ) 192 DEF_BENCH( return new ChartBench(false); )
OLDNEW
« no previous file with comments | « bench/BlurRoundRectBench.cpp ('k') | bench/ChecksumBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698