Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Side by Side Diff: src/effects/SkBlurMaskFilter.cpp

Issue 1421493003: tunnel down texture-size-constraint to imagefilters (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix formating Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/effects/SkBlurImageFilter.cpp ('k') | src/effects/SkComposeImageFilter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after
1227 1227
1228 GrContext* context = src->getContext(); 1228 GrContext* context = src->getContext();
1229 1229
1230 SkScalar xformedSigma = this->computeXformedSigma(ctm); 1230 SkScalar xformedSigma = this->computeXformedSigma(ctm);
1231 SkASSERT(xformedSigma > 0); 1231 SkASSERT(xformedSigma > 0);
1232 1232
1233 // If we're doing a normal blur, we can clobber the pathTexture in the 1233 // If we're doing a normal blur, we can clobber the pathTexture in the
1234 // gaussianBlur. Otherwise, we need to save it for later compositing. 1234 // gaussianBlur. Otherwise, we need to save it for later compositing.
1235 bool isNormalBlur = (kNormal_SkBlurStyle == fBlurStyle); 1235 bool isNormalBlur = (kNormal_SkBlurStyle == fBlurStyle);
1236 *result = SkGpuBlurUtils::GaussianBlur(context, src, isNormalBlur && canOver writeSrc, 1236 *result = SkGpuBlurUtils::GaussianBlur(context, src, isNormalBlur && canOver writeSrc,
1237 clipRect, false, xformedSigma, xforme dSigma); 1237 clipRect, false, xformedSigma, xforme dSigma,
1238 GrTextureProvider::kApprox_SizeConstr aint);
1238 if (nullptr == *result) { 1239 if (nullptr == *result) {
1239 return false; 1240 return false;
1240 } 1241 }
1241 1242
1242 if (!isNormalBlur) { 1243 if (!isNormalBlur) {
1243 GrPaint paint; 1244 GrPaint paint;
1244 SkMatrix matrix; 1245 SkMatrix matrix;
1245 matrix.setIDiv(src->width(), src->height()); 1246 matrix.setIDiv(src->width(), src->height());
1246 // Blend pathTexture over blurTexture. 1247 // Blend pathTexture over blurTexture.
1247 paint.addCoverageFragmentProcessor(GrSimpleTextureEffect::Create(src, ma trix))->unref(); 1248 paint.addCoverageFragmentProcessor(GrSimpleTextureEffect::Create(src, ma trix))->unref();
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
1297 } else { 1298 } else {
1298 str->append("None"); 1299 str->append("None");
1299 } 1300 }
1300 str->append("))"); 1301 str->append("))");
1301 } 1302 }
1302 #endif 1303 #endif
1303 1304
1304 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) 1305 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter)
1305 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) 1306 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl)
1306 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 1307 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « src/effects/SkBlurImageFilter.cpp ('k') | src/effects/SkComposeImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698