| 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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 return false; | 379 return false; |
| 380 } | 380 } |
| 381 | 381 |
| 382 if (NULL == maskRect) { | 382 if (NULL == maskRect) { |
| 383 // don't need to compute maskRect | 383 // don't need to compute maskRect |
| 384 return true; | 384 return true; |
| 385 } | 385 } |
| 386 | 386 |
| 387 float sigma3 = 3 * SkScalarToFloat(xformedSigma); | 387 float sigma3 = 3 * SkScalarToFloat(xformedSigma); |
| 388 | 388 |
| 389 SkRect clipRect = SkRect::MakeFromIRect(clipBounds); | 389 SkRect clipRect = SkRect::Make(clipBounds); |
| 390 SkRect srcRect(srcBounds); | 390 SkRect srcRect(srcBounds); |
| 391 | 391 |
| 392 // Outset srcRect and clipRect by 3 * sigma, to compute affected blur area. | 392 // Outset srcRect and clipRect by 3 * sigma, to compute affected blur area. |
| 393 srcRect.outset(SkFloatToScalar(sigma3), SkFloatToScalar(sigma3)); | 393 srcRect.outset(SkFloatToScalar(sigma3), SkFloatToScalar(sigma3)); |
| 394 clipRect.outset(SkFloatToScalar(sigma3), SkFloatToScalar(sigma3)); | 394 clipRect.outset(SkFloatToScalar(sigma3), SkFloatToScalar(sigma3)); |
| 395 srcRect.intersect(clipRect); | 395 srcRect.intersect(clipRect); |
| 396 *maskRect = srcRect; | 396 *maskRect = srcRect; |
| 397 return true; | 397 return true; |
| 398 } | 398 } |
| 399 | 399 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 } else { | 473 } else { |
| 474 str->append("None"); | 474 str->append("None"); |
| 475 } | 475 } |
| 476 str->append("))"); | 476 str->append("))"); |
| 477 } | 477 } |
| 478 #endif | 478 #endif |
| 479 | 479 |
| 480 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) | 480 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) |
| 481 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) | 481 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) |
| 482 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END | 482 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END |
| OLD | NEW |