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

Side by Side Diff: gm/beziers.cpp

Issue 831113002: Cleanup: More override fixes - another round. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/alphagradients.cpp ('k') | gm/bitmaprecttest.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 2014 Google Inc. 2 * Copyright 2014 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 #include "SkRandom.h" 9 #include "SkRandom.h"
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 class BeziersGM : public skiagm::GM { 44 class BeziersGM : public skiagm::GM {
45 public: 45 public:
46 BeziersGM() {} 46 BeziersGM() {}
47 47
48 protected: 48 protected:
49 virtual uint32_t onGetFlags() const SK_OVERRIDE { 49 virtual uint32_t onGetFlags() const SK_OVERRIDE {
50 return kSkipTiled_Flag; 50 return kSkipTiled_Flag;
51 } 51 }
52 52
53 virtual SkString onShortName() { 53 virtual SkString onShortName() SK_OVERRIDE {
54 return SkString("beziers"); 54 return SkString("beziers");
55 } 55 }
56 56
57 virtual SkISize onISize() { 57 virtual SkISize onISize() SK_OVERRIDE {
58 return SkISize::Make(W, H*2); 58 return SkISize::Make(W, H*2);
59 } 59 }
60 60
61 virtual void onDraw(SkCanvas* canvas) { 61 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
62 SkPaint paint; 62 SkPaint paint;
63 paint.setStyle(SkPaint::kStroke_Style); 63 paint.setStyle(SkPaint::kStroke_Style);
64 paint.setStrokeWidth(SkIntToScalar(9)/2); 64 paint.setStrokeWidth(SkIntToScalar(9)/2);
65 paint.setAntiAlias(true); 65 paint.setAntiAlias(true);
66 66
67 SkRandom rand; 67 SkRandom rand;
68 for (int i = 0; i < N; i++) { 68 for (int i = 0; i < N; i++) {
69 SkPath p; 69 SkPath p;
70 rnd_quad(&p, &paint, rand); 70 rnd_quad(&p, &paint, rand);
71 canvas->drawPath(p, paint); 71 canvas->drawPath(p, paint);
72 } 72 }
73 canvas->translate(0, SH); 73 canvas->translate(0, SH);
74 for (int i = 0; i < N; i++) { 74 for (int i = 0; i < N; i++) {
75 SkPath p; 75 SkPath p;
76 rnd_cubic(&p, &paint, rand); 76 rnd_cubic(&p, &paint, rand);
77 canvas->drawPath(p, paint); 77 canvas->drawPath(p, paint);
78 } 78 }
79 } 79 }
80 80
81 private: 81 private:
82 typedef skiagm::GM INHERITED; 82 typedef skiagm::GM INHERITED;
83 }; 83 };
84 84
85 static skiagm::GM* F0(void*) { return new BeziersGM; } 85 static skiagm::GM* F0(void*) { return new BeziersGM; }
86 static skiagm::GMRegistry R0(F0); 86 static skiagm::GMRegistry R0(F0);
OLDNEW
« no previous file with comments | « gm/alphagradients.cpp ('k') | gm/bitmaprecttest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698