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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 | 213 |
214 sk_sp<GrTexture> mask(create_mask_GPU(context, | 214 sk_sp<GrTexture> mask(create_mask_GPU(context, |
215 finalIRect, | 215 finalIRect, |
216 *path, | 216 *path, |
217 fillOrHairline, | 217 fillOrHairline, |
218 paint->isAntiAlias(), | 218 paint->isAntiAlias(), |
219 drawContext->numColorSamples())); | 219 drawContext->numColorSamples())); |
220 if (mask) { | 220 if (mask) { |
221 GrTexture* filtered; | 221 GrTexture* filtered; |
222 | 222 |
223 if (maskFilter->filterMaskGPU(mask.get(), viewMatrix, finalIRect, &f
iltered, true)) { | 223 if (maskFilter->filterMaskGPU(mask.get(), viewMatrix, finalIRect, &f
iltered)) { |
224 // filterMaskGPU gives us ownership of a ref to the result | 224 // filterMaskGPU gives us ownership of a ref to the result |
225 SkAutoTUnref<GrTexture> atu(filtered); | 225 SkAutoTUnref<GrTexture> atu(filtered); |
226 if (draw_mask(drawContext, clip, viewMatrix, finalIRect, paint,
filtered)) { | 226 if (draw_mask(drawContext, clip, viewMatrix, finalIRect, paint,
filtered)) { |
227 // This path is completely drawn | 227 // This path is completely drawn |
228 return; | 228 return; |
229 } | 229 } |
230 } | 230 } |
231 } | 231 } |
232 } | 232 } |
233 | 233 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 } | 292 } |
293 | 293 |
294 if (paint.getMaskFilter()) { | 294 if (paint.getMaskFilter()) { |
295 draw_path_with_mask_filter(context, drawContext, clip, &grPaint, viewMat
rix, | 295 draw_path_with_mask_filter(context, drawContext, clip, &grPaint, viewMat
rix, |
296 paint.getMaskFilter(), style, | 296 paint.getMaskFilter(), style, |
297 path, pathIsMutable); | 297 path, pathIsMutable); |
298 } else { | 298 } else { |
299 drawContext->drawPath(clip, grPaint, viewMatrix, *path, style); | 299 drawContext->drawPath(clip, grPaint, viewMatrix, *path, style); |
300 } | 300 } |
301 } | 301 } |
OLD | NEW |