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

Side by Side Diff: gm/beziereffects.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/astcbitmap.cpp ('k') | gm/beziers.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 // This test only works with the GPU backend. 9 // This test only works with the GPU backend.
10 10
(...skipping 18 matching lines...) Expand all
29 /** 29 /**
30 * This GM directly exercises effects that draw Bezier curves in the GPU backend . 30 * This GM directly exercises effects that draw Bezier curves in the GPU backend .
31 */ 31 */
32 class BezierCubicEffects : public GM { 32 class BezierCubicEffects : public GM {
33 public: 33 public:
34 BezierCubicEffects() { 34 BezierCubicEffects() {
35 this->setBGColor(0xFFFFFFFF); 35 this->setBGColor(0xFFFFFFFF);
36 } 36 }
37 37
38 protected: 38 protected:
39 virtual SkString onShortName() SK_OVERRIDE { 39 SkString onShortName() SK_OVERRIDE {
40 return SkString("bezier_cubic_effects"); 40 return SkString("bezier_cubic_effects");
41 } 41 }
42 42
43 virtual SkISize onISize() SK_OVERRIDE { 43 SkISize onISize() SK_OVERRIDE {
44 return SkISize::Make(800, 800); 44 return SkISize::Make(800, 800);
45 } 45 }
46 46
47 virtual uint32_t onGetFlags() const SK_OVERRIDE { 47 uint32_t onGetFlags() const SK_OVERRIDE {
48 // This is a GPU-specific GM. 48 // This is a GPU-specific GM.
49 return kGPUOnly_Flag; 49 return kGPUOnly_Flag;
50 } 50 }
51 51
52 52
53 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { 53 void onDraw(SkCanvas* canvas) SK_OVERRIDE {
54 GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget (); 54 GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget ();
55 if (NULL == rt) { 55 if (NULL == rt) {
56 return; 56 return;
57 } 57 }
58 GrContext* context = rt->getContext(); 58 GrContext* context = rt->getContext();
59 if (NULL == context) { 59 if (NULL == context) {
60 return; 60 return;
61 } 61 }
62 62
63 struct Vertex { 63 struct Vertex {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 /** 188 /**
189 * This GM directly exercises effects that draw Bezier curves in the GPU backend . 189 * This GM directly exercises effects that draw Bezier curves in the GPU backend .
190 */ 190 */
191 class BezierConicEffects : public GM { 191 class BezierConicEffects : public GM {
192 public: 192 public:
193 BezierConicEffects() { 193 BezierConicEffects() {
194 this->setBGColor(0xFFFFFFFF); 194 this->setBGColor(0xFFFFFFFF);
195 } 195 }
196 196
197 protected: 197 protected:
198 virtual SkString onShortName() SK_OVERRIDE { 198 SkString onShortName() SK_OVERRIDE {
199 return SkString("bezier_conic_effects"); 199 return SkString("bezier_conic_effects");
200 } 200 }
201 201
202 virtual SkISize onISize() SK_OVERRIDE { 202 SkISize onISize() SK_OVERRIDE {
203 return SkISize::Make(800, 800); 203 return SkISize::Make(800, 800);
204 } 204 }
205 205
206 virtual uint32_t onGetFlags() const SK_OVERRIDE { 206 uint32_t onGetFlags() const SK_OVERRIDE {
207 // This is a GPU-specific GM. 207 // This is a GPU-specific GM.
208 return kGPUOnly_Flag; 208 return kGPUOnly_Flag;
209 } 209 }
210 210
211 211
212 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { 212 void onDraw(SkCanvas* canvas) SK_OVERRIDE {
213 GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget (); 213 GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget ();
214 if (NULL == rt) { 214 if (NULL == rt) {
215 return; 215 return;
216 } 216 }
217 GrContext* context = rt->getContext(); 217 GrContext* context = rt->getContext();
218 if (NULL == context) { 218 if (NULL == context) {
219 return; 219 return;
220 } 220 }
221 221
222 struct Vertex { 222 struct Vertex {
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 /** 380 /**
381 * This GM directly exercises effects that draw Bezier quad curves in the GPU ba ckend. 381 * This GM directly exercises effects that draw Bezier quad curves in the GPU ba ckend.
382 */ 382 */
383 class BezierQuadEffects : public GM { 383 class BezierQuadEffects : public GM {
384 public: 384 public:
385 BezierQuadEffects() { 385 BezierQuadEffects() {
386 this->setBGColor(0xFFFFFFFF); 386 this->setBGColor(0xFFFFFFFF);
387 } 387 }
388 388
389 protected: 389 protected:
390 virtual SkString onShortName() SK_OVERRIDE { 390 SkString onShortName() SK_OVERRIDE {
391 return SkString("bezier_quad_effects"); 391 return SkString("bezier_quad_effects");
392 } 392 }
393 393
394 virtual SkISize onISize() SK_OVERRIDE { 394 SkISize onISize() SK_OVERRIDE {
395 return SkISize::Make(800, 800); 395 return SkISize::Make(800, 800);
396 } 396 }
397 397
398 virtual uint32_t onGetFlags() const SK_OVERRIDE { 398 uint32_t onGetFlags() const SK_OVERRIDE {
399 // This is a GPU-specific GM. 399 // This is a GPU-specific GM.
400 return kGPUOnly_Flag; 400 return kGPUOnly_Flag;
401 } 401 }
402 402
403 403
404 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { 404 void onDraw(SkCanvas* canvas) SK_OVERRIDE {
405 GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget (); 405 GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget ();
406 if (NULL == rt) { 406 if (NULL == rt) {
407 return; 407 return;
408 } 408 }
409 GrContext* context = rt->getContext(); 409 GrContext* context = rt->getContext();
410 if (NULL == context) { 410 if (NULL == context) {
411 return; 411 return;
412 } 412 }
413 413
414 struct Vertex { 414 struct Vertex {
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 typedef GM INHERITED; 524 typedef GM INHERITED;
525 }; 525 };
526 526
527 DEF_GM( return SkNEW(BezierCubicEffects); ) 527 DEF_GM( return SkNEW(BezierCubicEffects); )
528 DEF_GM( return SkNEW(BezierConicEffects); ) 528 DEF_GM( return SkNEW(BezierConicEffects); )
529 DEF_GM( return SkNEW(BezierQuadEffects); ) 529 DEF_GM( return SkNEW(BezierQuadEffects); )
530 530
531 } 531 }
532 532
533 #endif 533 #endif
OLDNEW
« no previous file with comments | « gm/astcbitmap.cpp ('k') | gm/beziers.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698