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

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

Issue 1571033002: remove imagefilter::sizeconstraint (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after
1234 1234
1235 GrContext* context = src->getContext(); 1235 GrContext* context = src->getContext();
1236 1236
1237 SkScalar xformedSigma = this->computeXformedSigma(ctm); 1237 SkScalar xformedSigma = this->computeXformedSigma(ctm);
1238 SkASSERT(xformedSigma > 0); 1238 SkASSERT(xformedSigma > 0);
1239 1239
1240 // If we're doing a normal blur, we can clobber the pathTexture in the 1240 // If we're doing a normal blur, we can clobber the pathTexture in the
1241 // gaussianBlur. Otherwise, we need to save it for later compositing. 1241 // gaussianBlur. Otherwise, we need to save it for later compositing.
1242 bool isNormalBlur = (kNormal_SkBlurStyle == fBlurStyle); 1242 bool isNormalBlur = (kNormal_SkBlurStyle == fBlurStyle);
1243 *result = SkGpuBlurUtils::GaussianBlur(context, src, isNormalBlur && canOver writeSrc, 1243 *result = SkGpuBlurUtils::GaussianBlur(context, src, isNormalBlur && canOver writeSrc,
1244 clipRect, nullptr, xformedSigma, xfor medSigma, 1244 clipRect, nullptr, xformedSigma, xfor medSigma);
1245 GrTextureProvider::kApprox_SizeConstr aint);
1246 if (nullptr == *result) { 1245 if (nullptr == *result) {
1247 return false; 1246 return false;
1248 } 1247 }
1249 1248
1250 if (!isNormalBlur) { 1249 if (!isNormalBlur) {
1251 GrPaint paint; 1250 GrPaint paint;
1252 SkMatrix matrix; 1251 SkMatrix matrix;
1253 matrix.setIDiv(src->width(), src->height()); 1252 matrix.setIDiv(src->width(), src->height());
1254 // Blend pathTexture over blurTexture. 1253 // Blend pathTexture over blurTexture.
1255 paint.addCoverageFragmentProcessor(GrSimpleTextureEffect::Create(src, ma trix))->unref(); 1254 paint.addCoverageFragmentProcessor(GrSimpleTextureEffect::Create(src, ma trix))->unref();
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
1307 } else { 1306 } else {
1308 str->append("None"); 1307 str->append("None");
1309 } 1308 }
1310 str->append("))"); 1309 str->append("))");
1311 } 1310 }
1312 #endif 1311 #endif
1313 1312
1314 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) 1313 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter)
1315 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) 1314 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl)
1316 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 1315 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