Chromium Code Reviews| Index: src/core/SkMaskFilter.cpp |
| diff --git a/src/core/SkMaskFilter.cpp b/src/core/SkMaskFilter.cpp |
| index 9c367f946b552798447eb89eec20b3237f481afe..4ff157d87482cb4b0d018afb2c48c0be617962be 100644 |
| --- a/src/core/SkMaskFilter.cpp |
| +++ b/src/core/SkMaskFilter.cpp |
| @@ -12,6 +12,7 @@ |
| #include "SkBounder.h" |
| #include "SkDraw.h" |
| #include "SkRasterClip.h" |
| +#include "SkRRect.h" |
| #include "SkTypes.h" |
| #if SK_SUPPORT_GPU |
| @@ -204,6 +205,23 @@ static int countNestedRects(const SkPath& path, SkRect rects[2]) { |
| return path.isRect(&rects[0]); |
| } |
| +bool SkMaskFilter::filterRRect(const SkRRect& devRRect, const SkMatrix& matrix, |
| + const SkRasterClip& clip, SkBounder* bounder, |
| + SkBlitter* blitter, SkPaint::Style style) const { |
|
robertphillips
2013/10/31 00:24:58
Could you expand on what makes this case sneaky?
scroggo
2013/11/01 21:45:46
Done.
|
| + // Only handle the sneaky case: |
| + NinePatch patch; |
| + patch.fMask.fImage = NULL; |
| + if (kTrue_FilterReturn != this->filterRRectToNine(devRRect, matrix, |
| + clip.getBounds(), |
| + &patch)) { |
| + return false; |
| + } |
| + draw_nine(patch.fMask, patch.fOuterRect, patch.fCenter, true, clip, |
| + bounder, blitter); |
| + SkMask::FreeImage(patch.fMask.fImage); |
| + return true; |
| +} |
| + |
| bool SkMaskFilter::filterPath(const SkPath& devPath, const SkMatrix& matrix, |
| const SkRasterClip& clip, SkBounder* bounder, |
| SkBlitter* blitter, SkPaint::Style style) const { |
| @@ -267,6 +285,12 @@ bool SkMaskFilter::filterPath(const SkPath& devPath, const SkMatrix& matrix, |
| } |
| SkMaskFilter::FilterReturn |
| +SkMaskFilter::filterRRectToNine(const SkRRect&, const SkMatrix&, |
| + const SkIRect& clipBounds, NinePatch*) const { |
| + return kUnimplemented_FilterReturn; |
| +} |
| + |
| +SkMaskFilter::FilterReturn |
| SkMaskFilter::filterRectsToNine(const SkRect[], int count, const SkMatrix&, |
| const SkIRect& clipBounds, NinePatch*) const { |
| return kUnimplemented_FilterReturn; |