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 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
679 SkBlurMask::ComputeBlurProfile(sigma, &profile); | 679 SkBlurMask::ComputeBlurProfile(sigma, &profile); |
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) { |
robertphillips
2014/01/31 14:11:50
SkSafeSetNull?
humper
2014/01/31 14:14:05
Awesome, didn't know about that. will use!
| |
690 (*horizontalScanline)->unref(); | 690 (*horizontalScanline)->unref(); |
691 *horizontalScanline = NULL; | |
691 return false; | 692 return false; |
692 } | 693 } |
693 | 694 |
694 } | 695 } |
695 return true; | 696 return true; |
696 } | 697 } |
697 | 698 |
698 GrRectBlurEffect::GrRectBlurEffect(const SkRect& rect, float sigma, | 699 GrRectBlurEffect::GrRectBlurEffect(const SkRect& rect, float sigma, |
699 GrTexture *horizontal_scanline, GrTexture *ve rtical_scanline) | 700 GrTexture *horizontal_scanline, GrTexture *ve rtical_scanline) |
700 : INHERITED(), | 701 : INHERITED(), |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
897 } else { | 898 } else { |
898 str->append("None"); | 899 str->append("None"); |
899 } | 900 } |
900 str->append("))"); | 901 str->append("))"); |
901 } | 902 } |
902 #endif | 903 #endif |
903 | 904 |
904 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) | 905 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) |
905 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) | 906 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) |
906 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END | 907 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END |
OLD | NEW |