| OLD | NEW |
| 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 clipBounds, | 235 clipBounds, |
| 236 viewMatrix, | 236 viewMatrix, |
| 237 &maskRect)) { | 237 &maskRect)) { |
| 238 SkIRect finalIRect; | 238 SkIRect finalIRect; |
| 239 maskRect.roundOut(&finalIRect); | 239 maskRect.roundOut(&finalIRect); |
| 240 if (clip_bounds_quick_reject(clipBounds, finalIRect)) { | 240 if (clip_bounds_quick_reject(clipBounds, finalIRect)) { |
| 241 // clipped out | 241 // clipped out |
| 242 return; | 242 return; |
| 243 } | 243 } |
| 244 | 244 |
| 245 if (paint.getMaskFilter()->directFilterMaskGPU(context, | 245 if (paint.getMaskFilter()->directFilterMaskGPU(context->textureProvi
der(), |
| 246 drawContext, |
| 246 renderTarget, | 247 renderTarget, |
| 247 &grPaint, | 248 &grPaint, |
| 248 clip, | 249 clip, |
| 249 viewMatrix, | 250 viewMatrix, |
| 250 strokeInfo, | 251 strokeInfo, |
| 251 *devPathPtr)) { | 252 *devPathPtr)) { |
| 252 // the mask filter was able to draw itself directly, so there's
nothing | 253 // the mask filter was able to draw itself directly, so there's
nothing |
| 253 // left to do. | 254 // left to do. |
| 254 return; | 255 return; |
| 255 } | 256 } |
| 256 | 257 |
| 257 | |
| 258 SkAutoTUnref<GrTexture> mask(create_mask_GPU(context, | 258 SkAutoTUnref<GrTexture> mask(create_mask_GPU(context, |
| 259 maskRect, | 259 maskRect, |
| 260 *devPathPtr, | 260 *devPathPtr, |
| 261 strokeInfo, | 261 strokeInfo, |
| 262 grPaint.isAntiAlias(), | 262 grPaint.isAntiAlias(), |
| 263 renderTarget->numColorS
amples())); | 263 renderTarget->numColorS
amples())); |
| 264 if (mask) { | 264 if (mask) { |
| 265 GrTexture* filtered; | 265 GrTexture* filtered; |
| 266 | 266 |
| 267 if (paint.getMaskFilter()->filterMaskGPU(mask, viewMatrix, maskR
ect, | 267 if (paint.getMaskFilter()->filterMaskGPU(mask, viewMatrix, maskR
ect, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 288 SkPaint::kFill_Sty
le; | 288 SkPaint::kFill_Sty
le; |
| 289 draw_with_mask_filter(drawContext, context->textureProvider(), renderTar
get, | 289 draw_with_mask_filter(drawContext, context->textureProvider(), renderTar
get, |
| 290 clip, viewMatrix, *devPathPtr, | 290 clip, viewMatrix, *devPathPtr, |
| 291 paint.getMaskFilter(), clipBounds, &grPaint, style
); | 291 paint.getMaskFilter(), clipBounds, &grPaint, style
); |
| 292 return; | 292 return; |
| 293 } | 293 } |
| 294 | 294 |
| 295 drawContext->drawPath(renderTarget, clip, grPaint, viewMatrix, *pathPtr, str
okeInfo); | 295 drawContext->drawPath(renderTarget, clip, grPaint, viewMatrix, *pathPtr, str
okeInfo); |
| 296 } | 296 } |
| 297 | 297 |
| OLD | NEW |