| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #include "SkBlurMaskFilter.h" | 9 #include "SkBlurMaskFilter.h" |
| 10 #include "SkBlurMask.h" | 10 #include "SkBlurMask.h" |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 return kFalse_FilterReturn; | 347 return kFalse_FilterReturn; |
| 348 } | 348 } |
| 349 | 349 |
| 350 patch->fMask.fBounds.offsetTo(0, 0); | 350 patch->fMask.fBounds.offsetTo(0, 0); |
| 351 patch->fOuterRect = dstM.fBounds; | 351 patch->fOuterRect = dstM.fBounds; |
| 352 patch->fCenter.fX = SkScalarCeilToInt(leftUnstretched) + 1; | 352 patch->fCenter.fX = SkScalarCeilToInt(leftUnstretched) + 1; |
| 353 patch->fCenter.fY = SkScalarCeilToInt(topUnstretched) + 1; | 353 patch->fCenter.fY = SkScalarCeilToInt(topUnstretched) + 1; |
| 354 return kTrue_FilterReturn; | 354 return kTrue_FilterReturn; |
| 355 } | 355 } |
| 356 | 356 |
| 357 #ifdef SK_IGNORE_FAST_RECT_BLUR | |
| 358 SK_CONF_DECLARE( bool, c_analyticBlurNinepatch, "mask.filter.analyticNinePatch",
false, "Use the faster analytic blur approach for ninepatch rects" ); | |
| 359 #else | |
| 360 SK_CONF_DECLARE( bool, c_analyticBlurNinepatch, "mask.filter.analyticNinePatch",
true, "Use the faster analytic blur approach for ninepatch rects" ); | 357 SK_CONF_DECLARE( bool, c_analyticBlurNinepatch, "mask.filter.analyticNinePatch",
true, "Use the faster analytic blur approach for ninepatch rects" ); |
| 361 #endif | |
| 362 | 358 |
| 363 SkMaskFilter::FilterReturn | 359 SkMaskFilter::FilterReturn |
| 364 SkBlurMaskFilterImpl::filterRectsToNine(const SkRect rects[], int count, | 360 SkBlurMaskFilterImpl::filterRectsToNine(const SkRect rects[], int count, |
| 365 const SkMatrix& matrix, | 361 const SkMatrix& matrix, |
| 366 const SkIRect& clipBounds, | 362 const SkIRect& clipBounds, |
| 367 NinePatch* patch) const { | 363 NinePatch* patch) const { |
| 368 if (count < 1 || count > 2) { | 364 if (count < 1 || count > 2) { |
| 369 return kUnimplemented_FilterReturn; | 365 return kUnimplemented_FilterReturn; |
| 370 } | 366 } |
| 371 | 367 |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 895 } else { | 891 } else { |
| 896 str->append("None"); | 892 str->append("None"); |
| 897 } | 893 } |
| 898 str->append("))"); | 894 str->append("))"); |
| 899 } | 895 } |
| 900 #endif | 896 #endif |
| 901 | 897 |
| 902 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) | 898 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) |
| 903 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) | 899 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) |
| 904 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END | 900 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END |
| OLD | NEW |