Chromium Code Reviews| 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 | 9 |
| 10 #include "SkBlurMask.h" | 10 #include "SkBlurMask.h" |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 476 // a bug in gcc98 | 476 // a bug in gcc98 |
| 477 void SkMask_FreeImage(uint8_t* image); | 477 void SkMask_FreeImage(uint8_t* image); |
| 478 void SkMask_FreeImage(uint8_t* image) { | 478 void SkMask_FreeImage(uint8_t* image) { |
| 479 SkMask::FreeImage(image); | 479 SkMask::FreeImage(image); |
| 480 } | 480 } |
| 481 | 481 |
| 482 bool SkBlurMask::BoxBlur(SkMask* dst, const SkMask& src, | 482 bool SkBlurMask::BoxBlur(SkMask* dst, const SkMask& src, |
| 483 SkScalar sigma, SkBlurStyle style, SkBlurQuality qualit y, | 483 SkScalar sigma, SkBlurStyle style, SkBlurQuality qualit y, |
| 484 SkIPoint* margin, bool force_quality) { | 484 SkIPoint* margin, bool force_quality) { |
| 485 | 485 |
| 486 SkDebugf( "Blurring something: sigma=%f\n", sigma ); | |
|
bsalomon
2014/05/19 18:39:26
should prolly remove this, otherwise lgtm.
| |
| 487 | |
| 486 if (src.fFormat != SkMask::kA8_Format) { | 488 if (src.fFormat != SkMask::kA8_Format) { |
| 487 return false; | 489 return false; |
| 488 } | 490 } |
| 489 | 491 |
| 490 // Force high quality off for small radii (performance) | 492 // Force high quality off for small radii (performance) |
| 491 if (!force_quality && sigma <= SkIntToScalar(2)) { | 493 if (!force_quality && sigma <= SkIntToScalar(2)) { |
| 492 quality = kLow_SkBlurQuality; | 494 quality = kLow_SkBlurQuality; |
| 493 } | 495 } |
| 494 | 496 |
| 495 SkScalar passRadius; | 497 SkScalar passRadius; |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 987 (void)autoCall.detach(); | 989 (void)autoCall.detach(); |
| 988 } | 990 } |
| 989 | 991 |
| 990 if (style == kInner_SkBlurStyle) { | 992 if (style == kInner_SkBlurStyle) { |
| 991 dst->fBounds = src.fBounds; // restore trimmed bounds | 993 dst->fBounds = src.fBounds; // restore trimmed bounds |
| 992 dst->fRowBytes = src.fRowBytes; | 994 dst->fRowBytes = src.fRowBytes; |
| 993 } | 995 } |
| 994 | 996 |
| 995 return true; | 997 return true; |
| 996 } | 998 } |
| OLD | NEW |