| 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" |
| 11 #include "GrContext.h" | 11 #include "GrContext.h" |
| 12 #include "effects/GrSimpleTextureEffect.h" | 12 #include "effects/GrSimpleTextureEffect.h" |
| 13 #include "GrStyle.h" | 13 #include "GrStyle.h" |
| 14 #include "GrTexture.h" | 14 #include "GrTexture.h" |
| 15 #include "GrTextureProvider.h" | 15 #include "GrTextureProvider.h" |
| 16 #include "SkDraw.h" | 16 #include "SkDraw.h" |
| 17 #include "SkGrPriv.h" | 17 #include "SkGrPriv.h" |
| 18 #include "SkMaskFilter.h" | 18 #include "SkMaskFilter.h" |
| 19 #include "SkPaint.h" | 19 #include "SkPaint.h" |
| 20 #include "SkTLazy.h" |
| 20 | 21 |
| 21 static bool clip_bounds_quick_reject(const SkIRect& clipBounds, const SkIRect& r
ect) { | 22 static bool clip_bounds_quick_reject(const SkIRect& clipBounds, const SkIRect& r
ect) { |
| 22 return clipBounds.isEmpty() || rect.isEmpty() || !SkIRect::Intersects(clipBo
unds, rect); | 23 return clipBounds.isEmpty() || rect.isEmpty() || !SkIRect::Intersects(clipBo
unds, rect); |
| 23 } | 24 } |
| 24 | 25 |
| 25 // Draw a mask using the supplied paint. Since the coverage/geometry | 26 // Draw a mask using the supplied paint. Since the coverage/geometry |
| 26 // is already burnt into the mask this boils down to a rect draw. | 27 // is already burnt into the mask this boils down to a rect draw. |
| 27 // Return true if the mask was successfully drawn. | 28 // Return true if the mask was successfully drawn. |
| 28 static bool draw_mask(GrDrawContext* drawContext, | 29 static bool draw_mask(GrDrawContext* drawContext, |
| 29 const GrClip& clip, | 30 const GrClip& clip, |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 } | 293 } |
| 293 | 294 |
| 294 if (paint.getMaskFilter()) { | 295 if (paint.getMaskFilter()) { |
| 295 draw_path_with_mask_filter(context, drawContext, clip, &grPaint, viewMat
rix, | 296 draw_path_with_mask_filter(context, drawContext, clip, &grPaint, viewMat
rix, |
| 296 paint.getMaskFilter(), style, | 297 paint.getMaskFilter(), style, |
| 297 path, pathIsMutable); | 298 path, pathIsMutable); |
| 298 } else { | 299 } else { |
| 299 drawContext->drawPath(clip, grPaint, viewMatrix, *path, style); | 300 drawContext->drawPath(clip, grPaint, viewMatrix, *path, style); |
| 300 } | 301 } |
| 301 } | 302 } |
| OLD | NEW |