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

Side by Side Diff: gm/blurroundrect.cpp

Issue 371023005: Add always-threaded SkRecord quilt tests. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: bigger tile -> more GMs can quilt Created 6 years, 5 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/blurrect.cpp ('k') | gm/coloremoji.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 "SkBlurMask.h" 9 #include "SkBlurMask.h"
10 #include "SkBlurMaskFilter.h" 10 #include "SkBlurMaskFilter.h"
(...skipping 24 matching lines...) Expand all
35 fName.appendf("-WH-%ix%i-unevenCorners", width, height); 35 fName.appendf("-WH-%ix%i-unevenCorners", width, height);
36 SkVector radii[4]; 36 SkVector radii[4];
37 radii[0].set(SkIntToScalar(30), SkIntToScalar(30)); 37 radii[0].set(SkIntToScalar(30), SkIntToScalar(30));
38 radii[1].set(SkIntToScalar(10), SkIntToScalar(10)); 38 radii[1].set(SkIntToScalar(10), SkIntToScalar(10));
39 radii[2].set(SkIntToScalar(30), SkIntToScalar(30)); 39 radii[2].set(SkIntToScalar(30), SkIntToScalar(30));
40 radii[3].set(SkIntToScalar(10), SkIntToScalar(10)); 40 radii[3].set(SkIntToScalar(10), SkIntToScalar(10));
41 SkRect r = SkRect::MakeWH(SkIntToScalar(width), SkIntToScalar(height)); 41 SkRect r = SkRect::MakeWH(SkIntToScalar(width), SkIntToScalar(height));
42 fRRect.setRectRadii(r, radii); 42 fRRect.setRectRadii(r, radii);
43 } 43 }
44 44
45 virtual uint32_t onGetFlags() const SK_OVERRIDE {
46 return kSkipTiled_Flag;
47 }
48
49 virtual SkString onShortName() SK_OVERRIDE { 45 virtual SkString onShortName() SK_OVERRIDE {
50 return fName; 46 return fName;
51 } 47 }
52 48
53 virtual SkISize onISize() SK_OVERRIDE { 49 virtual SkISize onISize() SK_OVERRIDE {
54 return SkISize::Make(SkScalarCeilToInt(fRRect.rect().width()), 50 return SkISize::Make(SkScalarCeilToInt(fRRect.rect().width()),
55 SkScalarCeilToInt(fRRect.rect().height())); 51 SkScalarCeilToInt(fRRect.rect().height()));
56 } 52 }
57 53
58 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { 54 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 }; 93 };
98 94
99 // Simpler blurred RR test cases where all the radii are the same. 95 // Simpler blurred RR test cases where all the radii are the same.
100 class SimpleBlurRoundRectGM : public skiagm::GM { 96 class SimpleBlurRoundRectGM : public skiagm::GM {
101 public: 97 public:
102 SimpleBlurRoundRectGM() 98 SimpleBlurRoundRectGM()
103 : fName("simpleblurroundrect") { 99 : fName("simpleblurroundrect") {
104 } 100 }
105 101
106 protected: 102 protected:
107 virtual uint32_t onGetFlags() const SK_OVERRIDE {
108 return kSkipTiled_Flag;
109 }
110
111 virtual SkString onShortName() SK_OVERRIDE { 103 virtual SkString onShortName() SK_OVERRIDE {
112 return fName; 104 return fName;
113 } 105 }
114 106
115 virtual SkISize onISize() SK_OVERRIDE { 107 virtual SkISize onISize() SK_OVERRIDE {
116 return SkISize::Make(950, 950); 108 return SkISize::Make(950, 950);
117 } 109 }
118 110
119 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { 111 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
120 canvas->scale(1.5f, 1.5f); 112 canvas->scale(1.5f, 1.5f);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 // TODO(scroggo): Disabled in an attempt to rememdy 145 // TODO(scroggo): Disabled in an attempt to rememdy
154 // https://code.google.com/p/skia/issues/detail?id=1801 ('Win7 Test bots all fai ling GenerateGMs: 146 // https://code.google.com/p/skia/issues/detail?id=1801 ('Win7 Test bots all fai ling GenerateGMs:
155 // ran wrong number of tests') 147 // ran wrong number of tests')
156 //DEF_GM(return new BlurRoundRectGM(600, 5514, 6);) 148 //DEF_GM(return new BlurRoundRectGM(600, 5514, 6);)
157 149
158 // Rounded rect with two opposite corners with large radii, the other two 150 // Rounded rect with two opposite corners with large radii, the other two
159 // small. 151 // small.
160 DEF_GM(return new BlurRoundRectGM(100, 100);) 152 DEF_GM(return new BlurRoundRectGM(100, 100);)
161 153
162 DEF_GM(return new SimpleBlurRoundRectGM();) 154 DEF_GM(return new SimpleBlurRoundRectGM();)
OLDNEW
« no previous file with comments | « gm/blurrect.cpp ('k') | gm/coloremoji.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698