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

Side by Side Diff: gm/complexclip2.cpp

Issue 1232463006: Fix up -Winconsistent-missing-override (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: llvm_coverage_build Created 5 years, 5 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/bitmapshader.cpp ('k') | gm/dcshader.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 2011 Google Inc. 2 * Copyright 2011 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 8
9 #include "gm.h" 9 #include "gm.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 return "rect"; 111 return "rect";
112 case kRRect_Clip: 112 case kRRect_Clip:
113 return "rrect"; 113 return "rrect";
114 case kPath_Clip: 114 case kPath_Clip:
115 return "path"; 115 return "path";
116 } 116 }
117 SkDEBUGFAIL("Unknown clip type."); 117 SkDEBUGFAIL("Unknown clip type.");
118 return ""; 118 return "";
119 } 119 }
120 120
121 virtual SkString onShortName() { 121 SkString onShortName() override {
122 if (kRect_Clip == fClip && !fAntiAlias) { 122 if (kRect_Clip == fClip && !fAntiAlias) {
123 return SkString("complexclip2"); 123 return SkString("complexclip2");
124 } 124 }
125 125
126 SkString str; 126 SkString str;
127 str.printf("complexclip2_%s_%s", 127 str.printf("complexclip2_%s_%s",
128 ClipStr(fClip), 128 ClipStr(fClip),
129 fAntiAlias ? "aa" : "bw"); 129 fAntiAlias ? "aa" : "bw");
130 return str; 130 return str;
131 } 131 }
132 132
133 virtual SkISize onISize() { 133 SkISize onISize() override {
134 return SkISize::Make(SkScalarRoundToInt(fTotalWidth), 134 return SkISize::Make(SkScalarRoundToInt(fTotalWidth),
135 SkScalarRoundToInt(fTotalHeight)); 135 SkScalarRoundToInt(fTotalHeight));
136 } 136 }
137 137
138 virtual void onDraw(SkCanvas* canvas) { 138 void onDraw(SkCanvas* canvas) override {
139 SkPaint rectPaint; 139 SkPaint rectPaint;
140 rectPaint.setStyle(SkPaint::kStroke_Style); 140 rectPaint.setStyle(SkPaint::kStroke_Style);
141 rectPaint.setStrokeWidth(-1); 141 rectPaint.setStrokeWidth(-1);
142 142
143 SkPaint fillPaint; 143 SkPaint fillPaint;
144 fillPaint.setColor(SkColorSetRGB(0xA0,0xDD,0xA0)); 144 fillPaint.setColor(SkColorSetRGB(0xA0,0xDD,0xA0));
145 145
146 for (int i = 0; i < kRows; ++i) { 146 for (int i = 0; i < kRows; ++i) {
147 for (int j = 0; j < kCols; ++j) { 147 for (int j = 0; j < kCols; ++j) {
148 canvas->save(); 148 canvas->save();
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kRect_Clip, false); ) 213 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kRect_Clip, false); )
214 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kRRect_Clip, false); ) 214 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kRRect_Clip, false); )
215 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kPath_Clip, false); ) 215 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kPath_Clip, false); )
216 216
217 // aa 217 // aa
218 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kRect_Clip, true); ) 218 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kRect_Clip, true); )
219 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kRRect_Clip, true); ) 219 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kRRect_Clip, true); )
220 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kPath_Clip, true); ) 220 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kPath_Clip, true); )
221 221
222 } 222 }
OLDNEW
« no previous file with comments | « gm/bitmapshader.cpp ('k') | gm/dcshader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698