| 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 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 ada.reset(profile); | 680 ada.reset(profile); |
| 681 } | 681 } |
| 682 | 682 |
| 683 SkAutoTMalloc<uint8_t> verticalPixels(height); | 683 SkAutoTMalloc<uint8_t> verticalPixels(height); |
| 684 SkBlurMask::ComputeBlurredScanline(verticalPixels, profile, height, sigm
a); | 684 SkBlurMask::ComputeBlurredScanline(verticalPixels, profile, height, sigm
a); |
| 685 | 685 |
| 686 *verticalScanline = context->createTexture(¶ms, texDesc, verticalCac
heID, | 686 *verticalScanline = context->createTexture(¶ms, texDesc, verticalCac
heID, |
| 687 verticalPixels, 0); | 687 verticalPixels, 0); |
| 688 | 688 |
| 689 if (NULL == *verticalScanline) { | 689 if (NULL == *verticalScanline) { |
| 690 (*horizontalScanline)->unref(); | 690 SkSafeSetNull(*horizontalScanline); |
| 691 return false; | 691 return false; |
| 692 } | 692 } |
| 693 | 693 |
| 694 } | 694 } |
| 695 return true; | 695 return true; |
| 696 } | 696 } |
| 697 | 697 |
| 698 GrRectBlurEffect::GrRectBlurEffect(const SkRect& rect, float sigma, | 698 GrRectBlurEffect::GrRectBlurEffect(const SkRect& rect, float sigma, |
| 699 GrTexture *horizontal_scanline, GrTexture *ve
rtical_scanline) | 699 GrTexture *horizontal_scanline, GrTexture *ve
rtical_scanline) |
| 700 : INHERITED(), | 700 : INHERITED(), |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 897 } else { | 897 } else { |
| 898 str->append("None"); | 898 str->append("None"); |
| 899 } | 899 } |
| 900 str->append("))"); | 900 str->append("))"); |
| 901 } | 901 } |
| 902 #endif | 902 #endif |
| 903 | 903 |
| 904 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) | 904 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) |
| 905 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) | 905 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) |
| 906 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END | 906 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END |
| OLD | NEW |