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

Side by Side Diff: gm/drawbitmaprect.cpp

Issue 1014533004: SkPaint::FilterLevel -> SkFilterQuality (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/downsamplebitmap.cpp ('k') | gm/filterbitmap.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 2011 Google Inc. 2 * Copyright 2011 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 } 210 }
211 211
212 { 212 {
213 // test the following code path: 213 // test the following code path:
214 // SkGpuDevice::drawPath() -> SkGpuDevice::drawWithMaskFilter() 214 // SkGpuDevice::drawPath() -> SkGpuDevice::drawWithMaskFilter()
215 SkIRect srcRect; 215 SkIRect srcRect;
216 SkPaint paint; 216 SkPaint paint;
217 SkBitmap bm; 217 SkBitmap bm;
218 218
219 bm = make_chessbm(5, 5); 219 bm = make_chessbm(5, 5);
220 paint.setFilterLevel(SkPaint::kLow_FilterLevel); 220 paint.setFilterQuality(kLow_SkFilterQuality);
221 221
222 srcRect.setXYWH(1, 1, 3, 3); 222 srcRect.setXYWH(1, 1, 3, 3);
223 SkMaskFilter* mf = SkBlurMaskFilter::Create( 223 SkMaskFilter* mf = SkBlurMaskFilter::Create(
224 kNormal_SkBlurStyle, 224 kNormal_SkBlurStyle,
225 SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(5)), 225 SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(5)),
226 SkBlurMaskFilter::kHighQuality_BlurFlag | 226 SkBlurMaskFilter::kHighQuality_BlurFlag |
227 SkBlurMaskFilter::kIgnoreTransform_BlurFlag); 227 SkBlurMaskFilter::kIgnoreTransform_BlurFlag);
228 paint.setMaskFilter(mf)->unref(); 228 paint.setMaskFilter(mf)->unref();
229 canvas->drawBitmapRect(bm, &srcRect, dstRect, &paint); 229 canvas->drawBitmapRect(bm, &srcRect, dstRect, &paint);
230 } 230 }
231 } 231 }
232 232
233 private: 233 private:
234 typedef skiagm::GM INHERITED; 234 typedef skiagm::GM INHERITED;
235 }; 235 };
236 236
237 DEF_GM( return new DrawBitmapRectGM(canvasproc, NULL); ) 237 DEF_GM( return new DrawBitmapRectGM(canvasproc, NULL); )
238 DEF_GM( return new DrawBitmapRectGM(imageproc, "-imagerect"); ) 238 DEF_GM( return new DrawBitmapRectGM(imageproc, "-imagerect"); )
239 DEF_GM( return new DrawBitmapRectGM(imagescaleproc, "-imagescale"); ) 239 DEF_GM( return new DrawBitmapRectGM(imagescaleproc, "-imagescale"); )
OLDNEW
« no previous file with comments | « gm/downsamplebitmap.cpp ('k') | gm/filterbitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698