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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 #else | 317 #else |
318 SK_CONF_DECLARE( bool, c_analyticBlurRRect, "mask.filter.blur.analyticblurrrect"
, true, "Use the faster analytic blur approach for ninepatch round rects" ); | 318 SK_CONF_DECLARE( bool, c_analyticBlurRRect, "mask.filter.blur.analyticblurrrect"
, true, "Use the faster analytic blur approach for ninepatch round rects" ); |
319 #endif | 319 #endif |
320 | 320 |
321 SkMaskFilter::FilterReturn | 321 SkMaskFilter::FilterReturn |
322 SkBlurMaskFilterImpl::filterRRectToNine(const SkRRect& rrect, const SkMatrix& ma
trix, | 322 SkBlurMaskFilterImpl::filterRRectToNine(const SkRRect& rrect, const SkMatrix& ma
trix, |
323 const SkIRect& clipBounds, | 323 const SkIRect& clipBounds, |
324 NinePatch* patch) const { | 324 NinePatch* patch) const { |
325 SkASSERT(patch != NULL); | 325 SkASSERT(patch != NULL); |
326 switch (rrect.getType()) { | 326 switch (rrect.getType()) { |
327 case SkRRect::kUnknown_Type: | |
328 // Unknown should never be returned. | |
329 SkASSERT(false); | |
330 // Fall through. | |
331 case SkRRect::kEmpty_Type: | 327 case SkRRect::kEmpty_Type: |
332 // Nothing to draw. | 328 // Nothing to draw. |
333 return kFalse_FilterReturn; | 329 return kFalse_FilterReturn; |
334 | 330 |
335 case SkRRect::kRect_Type: | 331 case SkRRect::kRect_Type: |
336 // We should have caught this earlier. | 332 // We should have caught this earlier. |
337 SkASSERT(false); | 333 SkASSERT(false); |
338 // Fall through. | 334 // Fall through. |
339 case SkRRect::kOval_Type: | 335 case SkRRect::kOval_Type: |
340 // The nine patch special case does not handle ovals, and we | 336 // The nine patch special case does not handle ovals, and we |
(...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1269 } else { | 1265 } else { |
1270 str->append("None"); | 1266 str->append("None"); |
1271 } | 1267 } |
1272 str->append("))"); | 1268 str->append("))"); |
1273 } | 1269 } |
1274 #endif | 1270 #endif |
1275 | 1271 |
1276 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) | 1272 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) |
1277 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) | 1273 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) |
1278 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END | 1274 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END |
OLD | NEW |