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

Side by Side Diff: gm/thinstrokedrects.cpp

Issue 281383013: skiagm::make_isize -> SkISize::Make (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 7 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/thinrects.cpp ('k') | gm/tileimagefilter.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 2013 Google Inc. 2 * Copyright 2013 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 9
10 namespace skiagm { 10 namespace skiagm {
11 11
12 // Draw rects with various stroke widths at 1/8 pixel increments 12 // Draw rects with various stroke widths at 1/8 pixel increments
13 class ThinStrokedRectsGM : public GM { 13 class ThinStrokedRectsGM : public GM {
14 public: 14 public:
15 ThinStrokedRectsGM() { 15 ThinStrokedRectsGM() {
16 this->setBGColor(0xFF000000); 16 this->setBGColor(0xFF000000);
17 } 17 }
18 18
19 protected: 19 protected:
20 virtual uint32_t onGetFlags() const SK_OVERRIDE { 20 virtual uint32_t onGetFlags() const SK_OVERRIDE {
21 return kSkipTiled_Flag; 21 return kSkipTiled_Flag;
22 } 22 }
23 23
24 virtual SkString onShortName() SK_OVERRIDE { 24 virtual SkString onShortName() SK_OVERRIDE {
25 return SkString("thinstrokedrects"); 25 return SkString("thinstrokedrects");
26 } 26 }
27 27
28 virtual SkISize onISize() SK_OVERRIDE { 28 virtual SkISize onISize() SK_OVERRIDE {
29 return make_isize(240, 320); 29 return SkISize::Make(240, 320);
30 } 30 }
31 31
32 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { 32 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
33 33
34 SkPaint paint; 34 SkPaint paint;
35 paint.setColor(SK_ColorWHITE); 35 paint.setColor(SK_ColorWHITE);
36 paint.setStyle(SkPaint::kStroke_Style); 36 paint.setStyle(SkPaint::kStroke_Style);
37 paint.setAntiAlias(true); 37 paint.setAntiAlias(true);
38 38
39 static const SkRect rect = { 0, 0, 10, 10 }; 39 static const SkRect rect = { 0, 0, 10, 10 };
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 private: 74 private:
75 typedef GM INHERITED; 75 typedef GM INHERITED;
76 }; 76 };
77 77
78 ////////////////////////////////////////////////////////////////////////////// 78 //////////////////////////////////////////////////////////////////////////////
79 79
80 DEF_GM( return SkNEW(ThinStrokedRectsGM); ) 80 DEF_GM( return SkNEW(ThinStrokedRectsGM); )
81 81
82 } 82 }
OLDNEW
« no previous file with comments | « gm/thinrects.cpp ('k') | gm/tileimagefilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698