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

Side by Side Diff: gm/clip_strokerect.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/circularclips.cpp ('k') | gm/clipdrawdraw.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 #include "gm.h" 8 #include "gm.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkPath.h" 10 #include "SkPath.h"
11 11
12 class ClipStrokeRectGM : public skiagm::GM { 12 class ClipStrokeRectGM : public skiagm::GM {
13 public: 13 public:
14 ClipStrokeRectGM() { 14 ClipStrokeRectGM() {
15 15
16 } 16 }
17 17
18 protected: 18 protected:
19 SkString onShortName() SK_OVERRIDE { 19 SkString onShortName() override {
20 return SkString("clip_strokerect"); 20 return SkString("clip_strokerect");
21 } 21 }
22 22
23 SkISize onISize() SK_OVERRIDE { 23 SkISize onISize() override {
24 return SkISize::Make(200, 400); 24 return SkISize::Make(200, 400);
25 } 25 }
26 26
27 void onDraw(SkCanvas* canvas) SK_OVERRIDE { 27 void onDraw(SkCanvas* canvas) override {
28 SkPaint p; 28 SkPaint p;
29 p.setColor(SK_ColorRED); 29 p.setColor(SK_ColorRED);
30 p.setAntiAlias(true); 30 p.setAntiAlias(true);
31 p.setStyle(SkPaint::kStroke_Style); 31 p.setStyle(SkPaint::kStroke_Style);
32 p.setStrokeWidth(22); 32 p.setStrokeWidth(22);
33 33
34 SkRect r = SkRect::MakeXYWH(20, 20, 100, 100); 34 SkRect r = SkRect::MakeXYWH(20, 20, 100, 100);
35 // setting the height of this to 19 causes failure 35 // setting the height of this to 19 causes failure
36 SkRect rect = SkRect::MakeXYWH(20, 0, 100, 20); 36 SkRect rect = SkRect::MakeXYWH(20, 0, 100, 20);
37 37
(...skipping 24 matching lines...) Expand all
62 p.setStrokeWidth(2); 62 p.setStrokeWidth(2);
63 canvas->drawRect(rect2, p); 63 canvas->drawRect(rect2, p);
64 } 64 }
65 65
66 private: 66 private:
67 typedef skiagm::GM INHERITED; 67 typedef skiagm::GM INHERITED;
68 }; 68 };
69 69
70 DEF_GM( return SkNEW(ClipStrokeRectGM); ) 70 DEF_GM( return SkNEW(ClipStrokeRectGM); )
71 71
OLDNEW
« no previous file with comments | « gm/circularclips.cpp ('k') | gm/clipdrawdraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698