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

Side by Side Diff: bench/BigPathBench.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/AlternatingColorPatternBench.cpp ('k') | bench/BitmapBench.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 2015 Google Inc. 2 * Copyright 2015 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 "SkPath.h" 10 #include "SkPath.h"
(...skipping 20 matching lines...) Expand all
31 31
32 public: 32 public:
33 BigPathBench(Align align, bool round) : fAlign(align), fRound(round) { 33 BigPathBench(Align align, bool round) : fAlign(align), fRound(round) {
34 fName.printf("bigpath_%s", gAlignName[fAlign]); 34 fName.printf("bigpath_%s", gAlignName[fAlign]);
35 if (round) { 35 if (round) {
36 fName.append("_round"); 36 fName.append("_round");
37 } 37 }
38 } 38 }
39 39
40 protected: 40 protected:
41 const char* onGetName() SK_OVERRIDE { 41 const char* onGetName() override {
42 return fName.c_str(); 42 return fName.c_str();
43 } 43 }
44 44
45 SkIPoint onGetSize() SK_OVERRIDE { 45 SkIPoint onGetSize() override {
46 return SkIPoint::Make(640, 100); 46 return SkIPoint::Make(640, 100);
47 } 47 }
48 48
49 void onPreDraw() SK_OVERRIDE { 49 void onPreDraw() override {
50 make_path(fPath); 50 make_path(fPath);
51 } 51 }
52 52
53 void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { 53 void onDraw(const int loops, SkCanvas* canvas) override {
54 SkPaint paint; 54 SkPaint paint;
55 paint.setAntiAlias(true); 55 paint.setAntiAlias(true);
56 paint.setStyle(SkPaint::kStroke_Style); 56 paint.setStyle(SkPaint::kStroke_Style);
57 paint.setStrokeWidth(2); 57 paint.setStrokeWidth(2);
58 if (fRound) { 58 if (fRound) {
59 paint.setStrokeJoin(SkPaint::kRound_Join); 59 paint.setStrokeJoin(SkPaint::kRound_Join);
60 } 60 }
61 this->setupPaint(&paint); 61 this->setupPaint(&paint);
62 62
63 const SkRect r = fPath.getBounds(); 63 const SkRect r = fPath.getBounds();
(...skipping 18 matching lines...) Expand all
82 }; 82 };
83 83
84 DEF_BENCH( return new BigPathBench(kLeft_Align, false); ) 84 DEF_BENCH( return new BigPathBench(kLeft_Align, false); )
85 DEF_BENCH( return new BigPathBench(kMiddle_Align, false); ) 85 DEF_BENCH( return new BigPathBench(kMiddle_Align, false); )
86 DEF_BENCH( return new BigPathBench(kRight_Align, false); ) 86 DEF_BENCH( return new BigPathBench(kRight_Align, false); )
87 87
88 DEF_BENCH( return new BigPathBench(kLeft_Align, true); ) 88 DEF_BENCH( return new BigPathBench(kLeft_Align, true); )
89 DEF_BENCH( return new BigPathBench(kMiddle_Align, true); ) 89 DEF_BENCH( return new BigPathBench(kMiddle_Align, true); )
90 DEF_BENCH( return new BigPathBench(kRight_Align, true); ) 90 DEF_BENCH( return new BigPathBench(kRight_Align, true); )
91 91
OLDNEW
« no previous file with comments | « bench/AlternatingColorPatternBench.cpp ('k') | bench/BitmapBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698