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

Side by Side Diff: gm/bleed.cpp

Issue 1228083004: add src-rect-constraint to drawImageRect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 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/bitmaprecttest.cpp ('k') | gm/convexpolyclip.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"
11 #include "SkCanvas.h" 11 #include "SkCanvas.h"
12 #include "SkImage.h"
12 13
13 #if SK_SUPPORT_GPU 14 #if SK_SUPPORT_GPU
14 #include "GrContext.h" 15 #include "GrContext.h"
15 #include "GrContextOptions.h" 16 #include "GrContextOptions.h"
16 #endif 17 #endif
17 18
19 static void draw_bitmap_rect(SkCanvas* canvas, const SkBitmap& bitmap, const SkI mage*,
20 const SkRect* src, const SkRect& dst,
21 const SkPaint* paint, SkCanvas::SrcRectConstraint c onstraint) {
22 canvas->drawBitmapRect(bitmap, src, dst, paint, constraint);
23 }
24
25 static void draw_image_rect(SkCanvas* canvas, const SkBitmap&, const SkImage* im age,
26 const SkRect* src, const SkRect& dst,
27 const SkPaint* paint, SkCanvas::SrcRectConstraint co nstraint) {
28 canvas->drawImageRect(image, src, dst, paint, constraint);
29 }
30
31 enum BleedTest {
32 kUseBitmap_BleedTest,
33 kUseImage_BleedTest,
34 };
35
36 const struct {
37 const char* fName;
38 void (*fDraw)(SkCanvas*, const SkBitmap&, const SkImage*, const SkRect*, con st SkRect&,
39 const SkPaint*, SkCanvas::SrcRectConstraint);
40 } gBleedRec[] = {
41 { "bleed", draw_bitmap_rect },
42 { "bleed_image", draw_image_rect },
43 };
44
18 // Create a black&white checked texture with 2 1-pixel rings 45 // Create a black&white checked texture with 2 1-pixel rings
19 // around the outside edge. The inner ring is red and the outer ring is blue. 46 // around the outside edge. The inner ring is red and the outer ring is blue.
20 static void make_ringed_bitmap(SkBitmap* result, int width, int height) { 47 static void make_ringed_bitmap(SkBitmap* result, int width, int height) {
21 SkASSERT(0 == width % 2 && 0 == height % 2); 48 SkASSERT(0 == width % 2 && 0 == height % 2);
22 49
23 static const SkPMColor kRed = SkPreMultiplyColor(SK_ColorRED); 50 static const SkPMColor kRed = SkPreMultiplyColor(SK_ColorRED);
24 static const SkPMColor kBlue = SkPreMultiplyColor(SK_ColorBLUE); 51 static const SkPMColor kBlue = SkPreMultiplyColor(SK_ColorBLUE);
25 static const SkPMColor kBlack = SkPreMultiplyColor(SK_ColorBLACK); 52 static const SkPMColor kBlack = SkPreMultiplyColor(SK_ColorBLACK);
26 static const SkPMColor kWhite = SkPreMultiplyColor(SK_ColorWHITE); 53 static const SkPMColor kWhite = SkPreMultiplyColor(SK_ColorWHITE);
27 54
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 } 100 }
74 scanline[width-1] = kBlue; 101 scanline[width-1] = kBlue;
75 102
76 scanline = result->getAddr32(0, height-1); 103 scanline = result->getAddr32(0, height-1);
77 for (int x = 0; x < width; ++x) { 104 for (int x = 0; x < width; ++x) {
78 scanline[x] = kBlue; 105 scanline[x] = kBlue;
79 } 106 }
80 result->setImmutable(); 107 result->setImmutable();
81 } 108 }
82 109
83 // This GM exercises the drawBitmapRectToRect "bleed" flag 110 // This GM exercises the drawBitmapRect constraints
84 class BleedGM : public skiagm::GM { 111 class BleedGM : public skiagm::GM {
85 public: 112 public:
86 BleedGM() {} 113 BleedGM(BleedTest bt) : fBT(bt) {}
87 114
88 protected: 115 protected:
89 116
90 SkString onShortName() override { 117 SkString onShortName() override {
91 return SkString("bleed"); 118 return SkString(gBleedRec[fBT].fName);
92 } 119 }
93 120
94 SkISize onISize() override { 121 SkISize onISize() override {
95 return SkISize::Make(kWidth, 780); 122 return SkISize::Make(kWidth, 780);
96 } 123 }
97 124
98 void onOnceBeforeDraw() override { 125 void onOnceBeforeDraw() override {
99 make_ringed_bitmap(&fBitmapSmall, kSmallTextureSize, kSmallTextureSize); 126 make_ringed_bitmap(&fBitmapSmall, kSmallTextureSize, kSmallTextureSize);
127 fImageSmall.reset(SkImage::NewFromBitmap(fBitmapSmall));
100 128
101 // To exercise the GPU's tiling path we need a texture 129 // To exercise the GPU's tiling path we need a texture
102 // too big for the GPU to handle in one go 130 // too big for the GPU to handle in one go
103 make_ringed_bitmap(&fBitmapBig, 2*kMaxTextureSize, 2*kMaxTextureSize); 131 make_ringed_bitmap(&fBitmapBig, 2*kMaxTextureSize, 2*kMaxTextureSize);
132 fImageBig.reset(SkImage::NewFromBitmap(fBitmapBig));
104 } 133 }
105 134
106 // Draw only the center of the small bitmap 135 // Draw only the center of the small bitmap
107 void drawCase1(SkCanvas* canvas, int transX, int transY, 136 void drawCase1(SkCanvas* canvas, int transX, int transY,
108 SkCanvas::DrawBitmapRectFlags flags, SkFilterQuality filter) { 137 SkCanvas::SrcRectConstraint constraint, SkFilterQuality filte r) {
109 SkRect src = SkRect::MakeXYWH(2, 2, 138 SkRect src = SkRect::MakeXYWH(2, 2,
110 SkIntToScalar(kSmallTextureSize-4), 139 SkIntToScalar(kSmallTextureSize-4),
111 SkIntToScalar(kSmallTextureSize-4)); 140 SkIntToScalar(kSmallTextureSize-4));
112 SkRect dst = SkRect::MakeXYWH(0, 0, SkIntToScalar(kBlockSize), SkIntToSc alar(kBlockSize)); 141 SkRect dst = SkRect::MakeXYWH(SkIntToScalar(transX), SkIntToScalar(trans Y),
142 SkIntToScalar(kBlockSize), SkIntToScalar(k BlockSize));
113 143
114 SkPaint paint; 144 SkPaint paint;
115 paint.setFilterQuality(filter); 145 paint.setFilterQuality(filter);
116 146
117 canvas->save(); 147 gBleedRec[fBT].fDraw(canvas, fBitmapSmall, fImageSmall, &src, dst, &pain t, constraint);
118 canvas->translate(SkIntToScalar(transX), SkIntToScalar(transY));
119 canvas->drawBitmapRectToRect(fBitmapSmall, &src, dst, &paint, flags);
120 canvas->restore();
121 } 148 }
122 149
123 // Draw almost all of the large bitmap 150 // Draw almost all of the large bitmap
124 void drawCase2(SkCanvas* canvas, int transX, int transY, 151 void drawCase2(SkCanvas* canvas, int transX, int transY,
125 SkCanvas::DrawBitmapRectFlags flags, SkFilterQuality filter) { 152 SkCanvas::SrcRectConstraint constraint, SkFilterQuality filte r) {
126 SkRect src = SkRect::MakeXYWH(2, 2, 153 SkRect src = SkRect::MakeXYWH(2, 2,
127 SkIntToScalar(fBitmapBig.width()-4), 154 SkIntToScalar(fBitmapBig.width()-4),
128 SkIntToScalar(fBitmapBig.height()-4)); 155 SkIntToScalar(fBitmapBig.height()-4));
129 SkRect dst = SkRect::MakeXYWH(0, 0, SkIntToScalar(kBlockSize), SkIntToSc alar(kBlockSize)); 156 SkRect dst = SkRect::MakeXYWH(SkIntToScalar(transX), SkIntToScalar(trans Y),
157 SkIntToScalar(kBlockSize), SkIntToScalar(k BlockSize));
130 158
131 SkPaint paint; 159 SkPaint paint;
132 paint.setFilterQuality(filter); 160 paint.setFilterQuality(filter);
133 161
134 canvas->save(); 162 gBleedRec[fBT].fDraw(canvas, fBitmapBig, fImageBig, &src, dst, &paint, c onstraint);
135 canvas->translate(SkIntToScalar(transX), SkIntToScalar(transY));
136 canvas->drawBitmapRectToRect(fBitmapBig, &src, dst, &paint, flags);
137 canvas->restore();
138 } 163 }
139 164
140 // Draw ~1/4 of the large bitmap 165 // Draw ~1/4 of the large bitmap
141 void drawCase3(SkCanvas* canvas, int transX, int transY, 166 void drawCase3(SkCanvas* canvas, int transX, int transY,
142 SkCanvas::DrawBitmapRectFlags flags, SkFilterQuality filter) { 167 SkCanvas::SrcRectConstraint constraint, SkFilterQuality filte r) {
143 SkRect src = SkRect::MakeXYWH(2, 2, 168 SkRect src = SkRect::MakeXYWH(2, 2,
144 SkIntToScalar(fBitmapBig.width()/2-2), 169 SkIntToScalar(fBitmapBig.width()/2-2),
145 SkIntToScalar(fBitmapBig.height()/2-2)); 170 SkIntToScalar(fBitmapBig.height()/2-2));
146 SkRect dst = SkRect::MakeXYWH(0, 0, SkIntToScalar(kBlockSize), SkIntToSc alar(kBlockSize)); 171 SkRect dst = SkRect::MakeXYWH(SkIntToScalar(transX), SkIntToScalar(trans Y),
172 SkIntToScalar(kBlockSize), SkIntToScalar(k BlockSize));
147 173
148 SkPaint paint; 174 SkPaint paint;
149 paint.setFilterQuality(filter); 175 paint.setFilterQuality(filter);
150 176
151 canvas->save(); 177 gBleedRec[fBT].fDraw(canvas, fBitmapBig, fImageBig, &src, dst, &paint, c onstraint);
152 canvas->translate(SkIntToScalar(transX), SkIntToScalar(transY));
153 canvas->drawBitmapRectToRect(fBitmapBig, &src, dst, &paint, flags);
154 canvas->restore();
155 } 178 }
156 179
157 // Draw the center of the small bitmap with a mask filter 180 // Draw the center of the small bitmap with a mask filter
158 void drawCase4(SkCanvas* canvas, int transX, int transY, 181 void drawCase4(SkCanvas* canvas, int transX, int transY,
159 SkCanvas::DrawBitmapRectFlags flags, SkFilterQuality filter) { 182 SkCanvas::SrcRectConstraint constraint, SkFilterQuality filte r) {
160 SkRect src = SkRect::MakeXYWH(2, 2, 183 SkRect src = SkRect::MakeXYWH(2, 2,
161 SkIntToScalar(kSmallTextureSize-4), 184 SkIntToScalar(kSmallTextureSize-4),
162 SkIntToScalar(kSmallTextureSize-4)); 185 SkIntToScalar(kSmallTextureSize-4));
163 SkRect dst = SkRect::MakeXYWH(0, 0, SkIntToScalar(kBlockSize), SkIntToSc alar(kBlockSize)); 186 SkRect dst = SkRect::MakeXYWH(SkIntToScalar(transX), SkIntToScalar(trans Y),
187 SkIntToScalar(kBlockSize), SkIntToScalar(k BlockSize));
164 188
165 SkPaint paint; 189 SkPaint paint;
166 paint.setFilterQuality(filter); 190 paint.setFilterQuality(filter);
167 SkMaskFilter* mf = SkBlurMaskFilter::Create(kNormal_SkBlurStyle, 191 SkMaskFilter* mf = SkBlurMaskFilter::Create(kNormal_SkBlurStyle,
168 SkBlurMask::ConvertRadiusToSigma(SkIntT oScalar(3))); 192 SkBlurMask::ConvertRadiusToSigma(3));
169 paint.setMaskFilter(mf)->unref(); 193 paint.setMaskFilter(mf)->unref();
170 194
171 canvas->save(); 195 gBleedRec[fBT].fDraw(canvas, fBitmapSmall, fImageSmall, &src, dst, &pain t, constraint);
172 canvas->translate(SkIntToScalar(transX), SkIntToScalar(transY));
173 canvas->drawBitmapRectToRect(fBitmapSmall, &src, dst, &paint, flags);
174 canvas->restore();
175 } 196 }
176 197
177 void onDraw(SkCanvas* canvas) override { 198 void onDraw(SkCanvas* canvas) override {
178 199
179 canvas->clear(SK_ColorGRAY); 200 canvas->clear(SK_ColorGRAY);
180 201
181 for (int m = 0; m < 2; ++m) { 202 for (int m = 0; m < 2; ++m) {
182 canvas->save(); 203 canvas->save();
183 if (m) { 204 if (m) {
184 static const SkScalar kBottom = SkIntToScalar(kRow3Y + kBlockSiz e + kBlockSpacing); 205 static const SkScalar kBottom = SkIntToScalar(kRow3Y + kBlockSiz e + kBlockSpacing);
185 canvas->translate(0, kBottom); 206 canvas->translate(0, kBottom);
186 SkMatrix rotate; 207 SkMatrix rotate;
187 rotate.setRotate(15.f, 0, kBottom + kBlockSpacing); 208 rotate.setRotate(15.f, 0, kBottom + kBlockSpacing);
188 canvas->concat(rotate); 209 canvas->concat(rotate);
189 canvas->scale(0.71f, 1.22f); 210 canvas->scale(0.71f, 1.22f);
190 } 211 }
191 212
192 // First draw a column with no bleeding and no filtering 213 // First draw a column with no bleeding and no filtering
193 this->drawCase1(canvas, kCol0X, kRow0Y, SkCanvas::kNone_DrawBitmapRe ctFlag, kNone_SkFilterQuality); 214 this->drawCase1(canvas, kCol0X, kRow0Y, SkCanvas::kStrict_SrcRectCon straint, kNone_SkFilterQuality);
194 this->drawCase2(canvas, kCol0X, kRow1Y, SkCanvas::kNone_DrawBitmapRe ctFlag, kNone_SkFilterQuality); 215 this->drawCase2(canvas, kCol0X, kRow1Y, SkCanvas::kStrict_SrcRectCon straint, kNone_SkFilterQuality);
195 this->drawCase3(canvas, kCol0X, kRow2Y, SkCanvas::kNone_DrawBitmapRe ctFlag, kNone_SkFilterQuality); 216 this->drawCase3(canvas, kCol0X, kRow2Y, SkCanvas::kStrict_SrcRectCon straint, kNone_SkFilterQuality);
196 this->drawCase4(canvas, kCol0X, kRow3Y, SkCanvas::kNone_DrawBitmapRe ctFlag, kNone_SkFilterQuality); 217 this->drawCase4(canvas, kCol0X, kRow3Y, SkCanvas::kStrict_SrcRectCon straint, kNone_SkFilterQuality);
197 218
198 // Then draw a column with no bleeding and low filtering 219 // Then draw a column with no bleeding and low filtering
199 this->drawCase1(canvas, kCol1X, kRow0Y, SkCanvas::kNone_DrawBitmapRe ctFlag, kLow_SkFilterQuality); 220 this->drawCase1(canvas, kCol1X, kRow0Y, SkCanvas::kStrict_SrcRectCon straint, kLow_SkFilterQuality);
200 this->drawCase2(canvas, kCol1X, kRow1Y, SkCanvas::kNone_DrawBitmapRe ctFlag, kLow_SkFilterQuality); 221 this->drawCase2(canvas, kCol1X, kRow1Y, SkCanvas::kStrict_SrcRectCon straint, kLow_SkFilterQuality);
201 this->drawCase3(canvas, kCol1X, kRow2Y, SkCanvas::kNone_DrawBitmapRe ctFlag, kLow_SkFilterQuality); 222 this->drawCase3(canvas, kCol1X, kRow2Y, SkCanvas::kStrict_SrcRectCon straint, kLow_SkFilterQuality);
202 this->drawCase4(canvas, kCol1X, kRow3Y, SkCanvas::kNone_DrawBitmapRe ctFlag, kLow_SkFilterQuality); 223 this->drawCase4(canvas, kCol1X, kRow3Y, SkCanvas::kStrict_SrcRectCon straint, kLow_SkFilterQuality);
203 224
204 // Then draw a column with no bleeding and high filtering 225 // Then draw a column with no bleeding and high filtering
205 this->drawCase1(canvas, kCol2X, kRow0Y, SkCanvas::kNone_DrawBitmapRe ctFlag, kHigh_SkFilterQuality); 226 this->drawCase1(canvas, kCol2X, kRow0Y, SkCanvas::kStrict_SrcRectCon straint, kHigh_SkFilterQuality);
206 this->drawCase2(canvas, kCol2X, kRow1Y, SkCanvas::kNone_DrawBitmapRe ctFlag, kHigh_SkFilterQuality); 227 this->drawCase2(canvas, kCol2X, kRow1Y, SkCanvas::kStrict_SrcRectCon straint, kHigh_SkFilterQuality);
207 this->drawCase3(canvas, kCol2X, kRow2Y, SkCanvas::kNone_DrawBitmapRe ctFlag, kHigh_SkFilterQuality); 228 this->drawCase3(canvas, kCol2X, kRow2Y, SkCanvas::kStrict_SrcRectCon straint, kHigh_SkFilterQuality);
208 this->drawCase4(canvas, kCol2X, kRow3Y, SkCanvas::kNone_DrawBitmapRe ctFlag, kHigh_SkFilterQuality); 229 this->drawCase4(canvas, kCol2X, kRow3Y, SkCanvas::kStrict_SrcRectCon straint, kHigh_SkFilterQuality);
209 230
210 // Then draw a column with bleeding and no filtering (bleed should h ave no effect w/out blur) 231 // Then draw a column with bleeding and no filtering (bleed should h ave no effect w/out blur)
211 this->drawCase1(canvas, kCol3X, kRow0Y, SkCanvas::kBleed_DrawBitmapR ectFlag, kNone_SkFilterQuality); 232 this->drawCase1(canvas, kCol3X, kRow0Y, SkCanvas::kFast_SrcRectConst raint, kNone_SkFilterQuality);
212 this->drawCase2(canvas, kCol3X, kRow1Y, SkCanvas::kBleed_DrawBitmapR ectFlag, kNone_SkFilterQuality); 233 this->drawCase2(canvas, kCol3X, kRow1Y, SkCanvas::kFast_SrcRectConst raint, kNone_SkFilterQuality);
213 this->drawCase3(canvas, kCol3X, kRow2Y, SkCanvas::kBleed_DrawBitmapR ectFlag, kNone_SkFilterQuality); 234 this->drawCase3(canvas, kCol3X, kRow2Y, SkCanvas::kFast_SrcRectConst raint, kNone_SkFilterQuality);
214 this->drawCase4(canvas, kCol3X, kRow3Y, SkCanvas::kBleed_DrawBitmapR ectFlag, kNone_SkFilterQuality); 235 this->drawCase4(canvas, kCol3X, kRow3Y, SkCanvas::kFast_SrcRectConst raint, kNone_SkFilterQuality);
215 236
216 // Then draw a column with bleeding and low filtering 237 // Then draw a column with bleeding and low filtering
217 this->drawCase1(canvas, kCol4X, kRow0Y, SkCanvas::kBleed_DrawBitmapR ectFlag, kLow_SkFilterQuality); 238 this->drawCase1(canvas, kCol4X, kRow0Y, SkCanvas::kFast_SrcRectConst raint, kLow_SkFilterQuality);
218 this->drawCase2(canvas, kCol4X, kRow1Y, SkCanvas::kBleed_DrawBitmapR ectFlag, kLow_SkFilterQuality); 239 this->drawCase2(canvas, kCol4X, kRow1Y, SkCanvas::kFast_SrcRectConst raint, kLow_SkFilterQuality);
219 this->drawCase3(canvas, kCol4X, kRow2Y, SkCanvas::kBleed_DrawBitmapR ectFlag, kLow_SkFilterQuality); 240 this->drawCase3(canvas, kCol4X, kRow2Y, SkCanvas::kFast_SrcRectConst raint, kLow_SkFilterQuality);
220 this->drawCase4(canvas, kCol4X, kRow3Y, SkCanvas::kBleed_DrawBitmapR ectFlag, kLow_SkFilterQuality); 241 this->drawCase4(canvas, kCol4X, kRow3Y, SkCanvas::kFast_SrcRectConst raint, kLow_SkFilterQuality);
221 242
222 // Finally draw a column with bleeding and high filtering 243 // Finally draw a column with bleeding and high filtering
223 this->drawCase1(canvas, kCol5X, kRow0Y, SkCanvas::kBleed_DrawBitmapR ectFlag, kHigh_SkFilterQuality); 244 this->drawCase1(canvas, kCol5X, kRow0Y, SkCanvas::kFast_SrcRectConst raint, kHigh_SkFilterQuality);
224 this->drawCase2(canvas, kCol5X, kRow1Y, SkCanvas::kBleed_DrawBitmapR ectFlag, kHigh_SkFilterQuality); 245 this->drawCase2(canvas, kCol5X, kRow1Y, SkCanvas::kFast_SrcRectConst raint, kHigh_SkFilterQuality);
225 this->drawCase3(canvas, kCol5X, kRow2Y, SkCanvas::kBleed_DrawBitmapR ectFlag, kHigh_SkFilterQuality); 246 this->drawCase3(canvas, kCol5X, kRow2Y, SkCanvas::kFast_SrcRectConst raint, kHigh_SkFilterQuality);
226 this->drawCase4(canvas, kCol5X, kRow3Y, SkCanvas::kBleed_DrawBitmapR ectFlag, kHigh_SkFilterQuality); 247 this->drawCase4(canvas, kCol5X, kRow3Y, SkCanvas::kFast_SrcRectConst raint, kHigh_SkFilterQuality);
227 248
228 canvas->restore(); 249 canvas->restore();
229 } 250 }
230 } 251 }
231 252
232 #if SK_SUPPORT_GPU 253 #if SK_SUPPORT_GPU
233 void modifyGrContextOptions(GrContextOptions* options) override { 254 void modifyGrContextOptions(GrContextOptions* options) override {
234 options->fMaxTextureSizeOverride = kMaxTextureSize; 255 options->fMaxTextureSizeOverride = kMaxTextureSize;
235 } 256 }
236 #endif 257 #endif
(...skipping 13 matching lines...) Expand all
250 static const int kRow0Y = kBlockSpacing; 271 static const int kRow0Y = kBlockSpacing;
251 static const int kRow1Y = 2*kBlockSpacing + kBlockSize; 272 static const int kRow1Y = 2*kBlockSpacing + kBlockSize;
252 static const int kRow2Y = 3*kBlockSpacing + 2*kBlockSize; 273 static const int kRow2Y = 3*kBlockSpacing + 2*kBlockSize;
253 static const int kRow3Y = 4*kBlockSpacing + 3*kBlockSize; 274 static const int kRow3Y = 4*kBlockSpacing + 3*kBlockSize;
254 275
255 static const int kSmallTextureSize = 6; 276 static const int kSmallTextureSize = 6;
256 static const int kMaxTextureSize = 32; 277 static const int kMaxTextureSize = 32;
257 278
258 SkBitmap fBitmapSmall; 279 SkBitmap fBitmapSmall;
259 SkBitmap fBitmapBig; 280 SkBitmap fBitmapBig;
281 SkAutoTUnref<SkImage> fImageSmall;
282 SkAutoTUnref<SkImage> fImageBig;
283 const BleedTest fBT;
260 284
261 typedef GM INHERITED; 285 typedef GM INHERITED;
262 }; 286 };
263 287
264 DEF_GM( return new BleedGM(); ) 288 DEF_GM( return new BleedGM(kUseBitmap_BleedTest); )
289 DEF_GM( return new BleedGM(kUseImage_BleedTest); )
OLDNEW
« no previous file with comments | « gm/bitmaprecttest.cpp ('k') | gm/convexpolyclip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698