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 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1229 | 1229 |
1230 GrContext* context = src->getContext(); | 1230 GrContext* context = src->getContext(); |
1231 | 1231 |
1232 SkScalar xformedSigma = this->computeXformedSigma(ctm); | 1232 SkScalar xformedSigma = this->computeXformedSigma(ctm); |
1233 SkASSERT(xformedSigma > 0); | 1233 SkASSERT(xformedSigma > 0); |
1234 | 1234 |
1235 // If we're doing a normal blur, we can clobber the pathTexture in the | 1235 // If we're doing a normal blur, we can clobber the pathTexture in the |
1236 // gaussianBlur. Otherwise, we need to save it for later compositing. | 1236 // gaussianBlur. Otherwise, we need to save it for later compositing. |
1237 bool isNormalBlur = (kNormal_SkBlurStyle == fBlurStyle); | 1237 bool isNormalBlur = (kNormal_SkBlurStyle == fBlurStyle); |
1238 *result = SkGpuBlurUtils::GaussianBlur(context, src, isNormalBlur && canOver
writeSrc, | 1238 *result = SkGpuBlurUtils::GaussianBlur(context, src, isNormalBlur && canOver
writeSrc, |
1239 clipRect, nullptr, xformedSigma, xfor
medSigma, | 1239 clipRect, false, xformedSigma, xforme
dSigma, |
1240 GrTextureProvider::kApprox_SizeConstr
aint); | 1240 GrTextureProvider::kApprox_SizeConstr
aint); |
1241 if (nullptr == *result) { | 1241 if (nullptr == *result) { |
1242 return false; | 1242 return false; |
1243 } | 1243 } |
1244 | 1244 |
1245 if (!isNormalBlur) { | 1245 if (!isNormalBlur) { |
1246 GrPaint paint; | 1246 GrPaint paint; |
1247 SkMatrix matrix; | 1247 SkMatrix matrix; |
1248 matrix.setIDiv(src->width(), src->height()); | 1248 matrix.setIDiv(src->width(), src->height()); |
1249 // Blend pathTexture over blurTexture. | 1249 // Blend pathTexture over blurTexture. |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1300 } else { | 1300 } else { |
1301 str->append("None"); | 1301 str->append("None"); |
1302 } | 1302 } |
1303 str->append("))"); | 1303 str->append("))"); |
1304 } | 1304 } |
1305 #endif | 1305 #endif |
1306 | 1306 |
1307 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) | 1307 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) |
1308 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) | 1308 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) |
1309 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END | 1309 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END |
OLD | NEW |