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

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

Issue 1431593002: Make SkBlurImageFilter capable of cropping during blur (GPU path). (Closed) Base URL: senorblanco-linux.mon:src/skia@blur-applyCropRect4-separate-loops
Patch Set: Fix uninitialized bounds in convolve_gaussian_2d() Created 5 years, 1 month 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/SkGpuBlurUtils.h » ('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 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after
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, false, xformedSigma, xforme dSigma, 1239 clipRect, nullptr, xformedSigma, xfor medSigma,
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
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
OLDNEW
« no previous file with comments | « src/effects/SkBlurImageFilter.cpp ('k') | src/effects/SkGpuBlurUtils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698