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

Side by Side Diff: gm/roundrects.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 | « gm/rects.cpp ('k') | gm/rrect.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 "gm.h" 9 #include "gm.h"
10 #include "SkTArray.h" 10 #include "SkTArray.h"
(...skipping 10 matching lines...) Expand all
21 class RoundRectGM : public GM { 21 class RoundRectGM : public GM {
22 public: 22 public:
23 RoundRectGM() { 23 RoundRectGM() {
24 this->setBGColor(0xFF000000); 24 this->setBGColor(0xFF000000);
25 this->makePaints(); 25 this->makePaints();
26 this->makeMatrices(); 26 this->makeMatrices();
27 } 27 }
28 28
29 protected: 29 protected:
30 30
31 SkString onShortName() SK_OVERRIDE { 31 SkString onShortName() override {
32 return SkString("roundrects"); 32 return SkString("roundrects");
33 } 33 }
34 34
35 SkISize onISize() SK_OVERRIDE { 35 SkISize onISize() override {
36 return SkISize::Make(1200, 900); 36 return SkISize::Make(1200, 900);
37 } 37 }
38 38
39 void makePaints() { 39 void makePaints() {
40 { 40 {
41 // no AA 41 // no AA
42 SkPaint p; 42 SkPaint p;
43 fPaints.push_back(p); 43 fPaints.push_back(p);
44 } 44 }
45 45
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 SkColor genColor(SkRandom* rand) { 130 SkColor genColor(SkRandom* rand) {
131 SkScalar hsv[3]; 131 SkScalar hsv[3];
132 hsv[0] = rand->nextRangeF(0.0f, 360.0f); 132 hsv[0] = rand->nextRangeF(0.0f, 360.0f);
133 hsv[1] = rand->nextRangeF(0.75f, 1.0f); 133 hsv[1] = rand->nextRangeF(0.75f, 1.0f);
134 hsv[2] = rand->nextRangeF(0.75f, 1.0f); 134 hsv[2] = rand->nextRangeF(0.75f, 1.0f);
135 135
136 return SkHSVToColor(hsv); 136 return SkHSVToColor(hsv);
137 } 137 }
138 138
139 void onDraw(SkCanvas* canvas) SK_OVERRIDE { 139 void onDraw(SkCanvas* canvas) override {
140 SkRandom rand(1); 140 SkRandom rand(1);
141 canvas->translate(20 * SK_Scalar1, 20 * SK_Scalar1); 141 canvas->translate(20 * SK_Scalar1, 20 * SK_Scalar1);
142 SkRect rect = SkRect::MakeLTRB(-20, -30, 20, 30); 142 SkRect rect = SkRect::MakeLTRB(-20, -30, 20, 30);
143 SkRRect circleRect; 143 SkRRect circleRect;
144 circleRect.setRectXY(rect, 5, 5); 144 circleRect.setRectXY(rect, 5, 5);
145 145
146 const SkScalar kXStart = 60.0f; 146 const SkScalar kXStart = 60.0f;
147 const SkScalar kYStart = 80.0f; 147 const SkScalar kYStart = 80.0f;
148 const int kXStep = 150; 148 const int kXStep = 150;
149 const int kYStep = 160; 149 const int kYStep = 160;
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 331
332 typedef GM INHERITED; 332 typedef GM INHERITED;
333 }; 333 };
334 334
335 ////////////////////////////////////////////////////////////////////////////// 335 //////////////////////////////////////////////////////////////////////////////
336 336
337 static GM* MyFactory(void*) { return new RoundRectGM; } 337 static GM* MyFactory(void*) { return new RoundRectGM; }
338 static GMRegistry reg(MyFactory); 338 static GMRegistry reg(MyFactory);
339 339
340 } 340 }
OLDNEW
« no previous file with comments | « gm/rects.cpp ('k') | gm/rrect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698