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

Side by Side Diff: gm/circularclips.cpp

Issue 953383002: fuzzer fixes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix up width and height in initializer Created 5 years, 10 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/bitmapshader.cpp ('k') | gm/complexclip2.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 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkPath.h" 10 #include "SkPath.h"
11 11
12 class CircularClipsGM : public skiagm::GM { 12 class CircularClipsGM : public skiagm::GM {
13 SkScalar fX1, fX2, fY, fR; 13 SkScalar fX1, fX2, fY, fR;
14 SkPath fCircle1, fCircle2; 14 SkPath fCircle1, fCircle2;
15 15
16 public: 16 protected:
17 CircularClipsGM() { 17 void onOnceBeforeDraw() SK_OVERRIDE {
18 fX1 = 80; 18 fX1 = 80;
19 fX2 = 120; 19 fX2 = 120;
20 fY = 50; 20 fY = 50;
21 fR = 40; 21 fR = 40;
22 22
23 fCircle1.addCircle(fX1, fY, fR, SkPath::kCW_Direction); 23 fCircle1.addCircle(fX1, fY, fR, SkPath::kCW_Direction);
24 fCircle2.addCircle(fX2, fY, fR, SkPath::kCW_Direction); 24 fCircle2.addCircle(fX2, fY, fR, SkPath::kCW_Direction);
25 } 25 }
26 26
27 protected:
28 27
29 bool runAsBench() const SK_OVERRIDE { return true; } 28 bool runAsBench() const SK_OVERRIDE { return true; }
30 29
31 SkString onShortName() SK_OVERRIDE { 30 SkString onShortName() SK_OVERRIDE {
32 return SkString("circular-clips"); 31 return SkString("circular-clips");
33 } 32 }
34 33
35 SkISize onISize() SK_OVERRIDE { 34 SkISize onISize() SK_OVERRIDE {
36 return SkISize::Make(800, 600); 35 return SkISize::Make(800, 600);
37 } 36 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 } 72 }
74 } 73 }
75 74
76 private: 75 private:
77 typedef skiagm::GM INHERITED; 76 typedef skiagm::GM INHERITED;
78 }; 77 };
79 78
80 ////////////////////////////////////////////////////////////////////////////// 79 //////////////////////////////////////////////////////////////////////////////
81 80
82 DEF_GM( return new CircularClipsGM; ) 81 DEF_GM( return new CircularClipsGM; )
OLDNEW
« no previous file with comments | « gm/bitmapshader.cpp ('k') | gm/complexclip2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698