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

Side by Side Diff: gm/shadows.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, 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/pictureshader.cpp ('k') | gm/simpleaaclip.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 2011 Google Inc. 3 * Copyright 2011 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 #include "gm.h" 8 #include "gm.h"
9 #include "SkBlurMask.h" 9 #include "SkBlurMask.h"
10 #include "SkBlurDrawLooper.h" 10 #include "SkBlurDrawLooper.h"
(...skipping 10 matching lines...) Expand all
21 paint->setStyle(SkPaint::kStroke_Style); 21 paint->setStyle(SkPaint::kStroke_Style);
22 paint->setStrokeWidth(strokeWidth); 22 paint->setStrokeWidth(strokeWidth);
23 } 23 }
24 } 24 }
25 25
26 class ShadowsGM : public GM { 26 class ShadowsGM : public GM {
27 public: 27 public:
28 SkPath fCirclePath; 28 SkPath fCirclePath;
29 SkRect fRect; 29 SkRect fRect;
30 30
31 ShadowsGM() { 31 protected:
32 void onOnceBeforeDraw() SK_OVERRIDE {
32 this->setBGColor(0xFFDDDDDD); 33 this->setBGColor(0xFFDDDDDD);
33 fCirclePath.addCircle(SkIntToScalar(20), SkIntToScalar(20), SkIntToScala r(10) ); 34 fCirclePath.addCircle(SkIntToScalar(20), SkIntToScalar(20), SkIntToScala r(10) );
34 fRect.set(SkIntToScalar(10), SkIntToScalar(10), 35 fRect.set(SkIntToScalar(10), SkIntToScalar(10),
35 SkIntToScalar(30), SkIntToScalar(30)); 36 SkIntToScalar(30), SkIntToScalar(30));
36 } 37 }
37 38
38 protected:
39 virtual SkString onShortName() { 39 virtual SkString onShortName() {
40 return SkString("shadows"); 40 return SkString("shadows");
41 } 41 }
42 42
43 virtual SkISize onISize() { 43 virtual SkISize onISize() {
44 return SkISize::Make(200, 120); 44 return SkISize::Make(200, 120);
45 } 45 }
46 46
47 virtual void onDraw(SkCanvas* canvas) { 47 virtual void onDraw(SkCanvas* canvas) {
48 SkBlurDrawLooper* shadowLoopers[5]; 48 SkBlurDrawLooper* shadowLoopers[5];
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 private: 118 private:
119 typedef GM INHERITED; 119 typedef GM INHERITED;
120 }; 120 };
121 121
122 /////////////////////////////////////////////////////////////////////////////// 122 ///////////////////////////////////////////////////////////////////////////////
123 123
124 static GM* MyFactory(void*) { return new ShadowsGM; } 124 static GM* MyFactory(void*) { return new ShadowsGM; }
125 static GMRegistry reg(MyFactory); 125 static GMRegistry reg(MyFactory);
126 126
127 } 127 }
OLDNEW
« no previous file with comments | « gm/pictureshader.cpp ('k') | gm/simpleaaclip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698