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

Side by Side Diff: gm/thinrects.cpp

Issue 806653007: Fix up all the easy virtual ... SK_OVERRIDE cases. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 11 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/texturedomaineffect.cpp ('k') | gm/thinstrokedrects.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 "gm.h" 8 #include "gm.h"
9 9
10 namespace skiagm { 10 namespace skiagm {
11 11
12 // Draw various width thin rects at 1/8 horizontal pixel increments 12 // Draw various width thin rects at 1/8 horizontal pixel increments
13 class ThinRectsGM : public GM { 13 class ThinRectsGM : public GM {
14 public: 14 public:
15 ThinRectsGM() { 15 ThinRectsGM() {
16 this->setBGColor(0xFF000000); 16 this->setBGColor(0xFF000000);
17 } 17 }
18 18
19 protected: 19 protected:
20 virtual SkString onShortName() SK_OVERRIDE { 20 SkString onShortName() SK_OVERRIDE {
21 return SkString("thinrects"); 21 return SkString("thinrects");
22 } 22 }
23 23
24 virtual SkISize onISize() SK_OVERRIDE { 24 SkISize onISize() SK_OVERRIDE {
25 return SkISize::Make(240, 320); 25 return SkISize::Make(240, 320);
26 } 26 }
27 27
28 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { 28 void onDraw(SkCanvas* canvas) SK_OVERRIDE {
29 29
30 SkPaint white; 30 SkPaint white;
31 white.setColor(SK_ColorWHITE); 31 white.setColor(SK_ColorWHITE);
32 white.setAntiAlias(true); 32 white.setAntiAlias(true);
33 33
34 SkPaint green; 34 SkPaint green;
35 green.setColor(SK_ColorGREEN); 35 green.setColor(SK_ColorGREEN);
36 green.setAntiAlias(true); 36 green.setAntiAlias(true);
37 37
38 for (int i = 0; i < 8; ++i) { 38 for (int i = 0; i < 8; ++i) {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 typedef GM INHERITED; 115 typedef GM INHERITED;
116 }; 116 };
117 117
118 ////////////////////////////////////////////////////////////////////////////// 118 //////////////////////////////////////////////////////////////////////////////
119 119
120 static GM* MyFactory(void*) { return new ThinRectsGM; } 120 static GM* MyFactory(void*) { return new ThinRectsGM; }
121 static GMRegistry reg(MyFactory); 121 static GMRegistry reg(MyFactory);
122 122
123 } 123 }
OLDNEW
« no previous file with comments | « gm/texturedomaineffect.cpp ('k') | gm/thinstrokedrects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698