| 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 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 899 | 899 |
| 900 SkPath path; | 900 SkPath path; |
| 901 path.addRRect( smallRRect ); | 901 path.addRRect( smallRRect ); |
| 902 | 902 |
| 903 SkDraw::DrawToMask(path, &mask.fBounds, NULL, NULL, &mask, SkMask::kJust
RenderImage_CreateMode, SkPaint::kFill_Style); | 903 SkDraw::DrawToMask(path, &mask.fBounds, NULL, NULL, &mask, SkMask::kJust
RenderImage_CreateMode, SkPaint::kFill_Style); |
| 904 | 904 |
| 905 SkMask blurred_mask; | 905 SkMask blurred_mask; |
| 906 SkBlurMask::BoxBlur(&blurred_mask, mask, sigma, kNormal_SkBlurStyle, kHi
gh_SkBlurQuality, NULL, true ); | 906 SkBlurMask::BoxBlur(&blurred_mask, mask, sigma, kNormal_SkBlurStyle, kHi
gh_SkBlurQuality, NULL, true ); |
| 907 | 907 |
| 908 blurNinePatchTexture = context->createTexture(¶ms, texDesc, blurRRec
tNinePatchID, blurred_mask.fImage, 0); | 908 blurNinePatchTexture = context->createTexture(¶ms, texDesc, blurRRec
tNinePatchID, blurred_mask.fImage, 0); |
| 909 SkMask::FreeImage(blurred_mask.fImage); |
| 909 } | 910 } |
| 910 | 911 |
| 912 SkAutoTUnref<GrTexture> blurunref(blurNinePatchTexture); |
| 911 if (NULL == blurNinePatchTexture) { | 913 if (NULL == blurNinePatchTexture) { |
| 912 return NULL; | 914 return NULL; |
| 913 } | 915 } |
| 914 | 916 |
| 915 return CreateEffectRef(AutoEffectUnref(SkNEW_ARGS(GrRRectBlurEffect, | 917 return CreateEffectRef(AutoEffectUnref(SkNEW_ARGS(GrRRectBlurEffect, |
| 916 (sigma, rrect, blurNinePat
chTexture)))); | 918 (sigma, rrect, blurNinePat
chTexture)))); |
| 917 } | 919 } |
| 918 | 920 |
| 919 void GrRRectBlurEffect::getConstantColorComponents(GrColor* color, uint32_t* val
idFlags) const { | 921 void GrRRectBlurEffect::getConstantColorComponents(GrColor* color, uint32_t* val
idFlags) const { |
| 920 *validFlags = 0; | 922 *validFlags = 0; |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1205 } else { | 1207 } else { |
| 1206 str->append("None"); | 1208 str->append("None"); |
| 1207 } | 1209 } |
| 1208 str->append("))"); | 1210 str->append("))"); |
| 1209 } | 1211 } |
| 1210 #endif | 1212 #endif |
| 1211 | 1213 |
| 1212 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) | 1214 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) |
| 1213 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) | 1215 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) |
| 1214 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END | 1216 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END |
| OLD | NEW |