| 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 // left to do. | 252 // left to do. |
| 253 return; | 253 return; |
| 254 } | 254 } |
| 255 | 255 |
| 256 | 256 |
| 257 SkAutoTUnref<GrTexture> mask(create_mask_GPU(context, | 257 SkAutoTUnref<GrTexture> mask(create_mask_GPU(context, |
| 258 maskRect, | 258 maskRect, |
| 259 *devPathPtr, | 259 *devPathPtr, |
| 260 strokeInfo, | 260 strokeInfo, |
| 261 grPaint.isAntiAlias(), | 261 grPaint.isAntiAlias(), |
| 262 renderTarget->numSample
s())); | 262 renderTarget->numColorS
amples())); |
| 263 if (mask) { | 263 if (mask) { |
| 264 GrTexture* filtered; | 264 GrTexture* filtered; |
| 265 | 265 |
| 266 if (paint.getMaskFilter()->filterMaskGPU(mask, viewMatrix, maskR
ect, | 266 if (paint.getMaskFilter()->filterMaskGPU(mask, viewMatrix, maskR
ect, |
| 267 &filtered, true)) { | 267 &filtered, true)) { |
| 268 // filterMaskGPU gives us ownership of a ref to the result | 268 // filterMaskGPU gives us ownership of a ref to the result |
| 269 SkAutoTUnref<GrTexture> atu(filtered); | 269 SkAutoTUnref<GrTexture> atu(filtered); |
| 270 if (draw_mask(drawContext, | 270 if (draw_mask(drawContext, |
| 271 renderTarget, | 271 renderTarget, |
| 272 clip, | 272 clip, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 287 SkPaint::kFill_Sty
le; | 287 SkPaint::kFill_Sty
le; |
| 288 draw_with_mask_filter(drawContext, context->textureProvider(), renderTar
get, | 288 draw_with_mask_filter(drawContext, context->textureProvider(), renderTar
get, |
| 289 clip, viewMatrix, *devPathPtr, | 289 clip, viewMatrix, *devPathPtr, |
| 290 paint.getMaskFilter(), clipBounds, &grPaint, style
); | 290 paint.getMaskFilter(), clipBounds, &grPaint, style
); |
| 291 return; | 291 return; |
| 292 } | 292 } |
| 293 | 293 |
| 294 drawContext->drawPath(renderTarget, clip, grPaint, viewMatrix, *pathPtr, str
okeInfo); | 294 drawContext->drawPath(renderTarget, clip, grPaint, viewMatrix, *pathPtr, str
okeInfo); |
| 295 } | 295 } |
| 296 | 296 |
| OLD | NEW |