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

Side by Side Diff: gm/patch.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/ovals.cpp ('k') | gm/patchgrid.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 2014 Google Inc. 3 * Copyright 2014 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 "SkGradientShader.h" 10 #include "SkGradientShader.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 * This GM draws a cubics coons patch using the specialized call SkCanvas::drawP atch. 69 * This GM draws a cubics coons patch using the specialized call SkCanvas::drawP atch.
70 */ 70 */
71 class SkPatchGM : public GM { 71 class SkPatchGM : public GM {
72 72
73 public: 73 public:
74 SkPatchGM() { 74 SkPatchGM() {
75 this->setBGColor(0xFFFFFFFF); 75 this->setBGColor(0xFFFFFFFF);
76 } 76 }
77 77
78 protected: 78 protected:
79 SkString onShortName() SK_OVERRIDE { 79 SkString onShortName() override {
80 return SkString("patch_primitive"); 80 return SkString("patch_primitive");
81 } 81 }
82 82
83 SkISize onISize() SK_OVERRIDE { 83 SkISize onISize() override {
84 return SkISize::Make(800, 800); 84 return SkISize::Make(800, 800);
85 } 85 }
86 86
87 void onDraw(SkCanvas* canvas) SK_OVERRIDE { 87 void onDraw(SkCanvas* canvas) override {
88 88
89 SkPaint paint; 89 SkPaint paint;
90 90
91 // The order of the colors and points is clockwise starting at upper-lef t corner. 91 // The order of the colors and points is clockwise starting at upper-lef t corner.
92 const SkPoint cubics[SkPatchUtils::kNumCtrlPts] = { 92 const SkPoint cubics[SkPatchUtils::kNumCtrlPts] = {
93 //top points 93 //top points
94 {100,100},{150,50},{250,150}, {300,100}, 94 {100,100},{150,50},{250,150}, {300,100},
95 //right points 95 //right points
96 {250, 150},{350,250}, 96 {250, 150},{350,250},
97 //bottom points 97 //bottom points
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 canvas->restore(); 150 canvas->restore();
151 } 151 }
152 152
153 private: 153 private:
154 typedef GM INHERITED; 154 typedef GM INHERITED;
155 }; 155 };
156 156
157 DEF_GM(return SkNEW(SkPatchGM); ) 157 DEF_GM(return SkNEW(SkPatchGM); )
158 158
159 } 159 }
OLDNEW
« no previous file with comments | « gm/ovals.cpp ('k') | gm/patchgrid.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698