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

Side by Side Diff: src/gpu/GrBlurUtils.cpp

Issue 1311583005: Add special case circle blur for Ganesh (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix no-GPU build Created 5 years, 3 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 | « src/effects/SkBlurMaskFilter.cpp ('k') | src/gpu/GrProcessor.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 2015 Google Inc. 2 * Copyright 2015 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 "GrBlurUtils.h" 8 #include "GrBlurUtils.h"
9 #include "GrDrawContext.h" 9 #include "GrDrawContext.h"
10 #include "GrCaps.h" 10 #include "GrCaps.h"
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 // avoid possibly allocating a new path in transform if we can 228 // avoid possibly allocating a new path in transform if we can
229 SkPath* devPathPtr = pathIsMutable ? pathPtr : tmpPath.init(); 229 SkPath* devPathPtr = pathIsMutable ? pathPtr : tmpPath.init();
230 if (!pathIsMutable) { 230 if (!pathIsMutable) {
231 devPathPtr->setIsVolatile(true); 231 devPathPtr->setIsVolatile(true);
232 } 232 }
233 233
234 // transform the path into device space 234 // transform the path into device space
235 pathPtr->transform(viewMatrix, devPathPtr); 235 pathPtr->transform(viewMatrix, devPathPtr);
236 236
237 SkRect maskRect; 237 SkRect maskRect;
238 if (paint.getMaskFilter()->canFilterMaskGPU(devPathPtr->getBounds(), 238 if (paint.getMaskFilter()->canFilterMaskGPU(SkRRect::MakeRect(devPathPtr ->getBounds()),
239 clipBounds, 239 clipBounds,
240 viewMatrix, 240 viewMatrix,
241 &maskRect)) { 241 &maskRect)) {
242 SkIRect finalIRect; 242 SkIRect finalIRect;
243 maskRect.roundOut(&finalIRect); 243 maskRect.roundOut(&finalIRect);
244 if (clip_bounds_quick_reject(clipBounds, finalIRect)) { 244 if (clip_bounds_quick_reject(clipBounds, finalIRect)) {
245 // clipped out 245 // clipped out
246 return; 246 return;
247 } 247 }
248 248
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 SkPaint::kFill_Sty le; 292 SkPaint::kFill_Sty le;
293 draw_with_mask_filter(drawContext, context->textureProvider(), renderTar get, 293 draw_with_mask_filter(drawContext, context->textureProvider(), renderTar get,
294 clip, viewMatrix, *devPathPtr, 294 clip, viewMatrix, *devPathPtr,
295 paint.getMaskFilter(), clipBounds, &grPaint, style ); 295 paint.getMaskFilter(), clipBounds, &grPaint, style );
296 return; 296 return;
297 } 297 }
298 298
299 drawContext->drawPath(renderTarget, clip, grPaint, viewMatrix, *pathPtr, str okeInfo); 299 drawContext->drawPath(renderTarget, clip, grPaint, viewMatrix, *pathPtr, str okeInfo);
300 } 300 }
301 301
OLDNEW
« no previous file with comments | « src/effects/SkBlurMaskFilter.cpp ('k') | src/gpu/GrProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698