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

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

Issue 1230813003: More threading of GrProcessorDataManager (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 years, 5 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/core/SkBitmapProcShader.cpp ('k') | src/effects/SkGpuBlurUtils.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 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after
1224 clipRect, false, xformedSigma, xforme dSigma); 1224 clipRect, false, xformedSigma, xforme dSigma);
1225 if (NULL == *result) { 1225 if (NULL == *result) {
1226 return false; 1226 return false;
1227 } 1227 }
1228 1228
1229 if (!isNormalBlur) { 1229 if (!isNormalBlur) {
1230 GrPaint paint; 1230 GrPaint paint;
1231 SkMatrix matrix; 1231 SkMatrix matrix;
1232 matrix.setIDiv(src->width(), src->height()); 1232 matrix.setIDiv(src->width(), src->height());
1233 // Blend pathTexture over blurTexture. 1233 // Blend pathTexture over blurTexture.
1234 paint.addCoverageProcessor(GrSimpleTextureEffect::Create(src, matrix))-> unref(); 1234 paint.addCoverageProcessor(GrSimpleTextureEffect::Create(paint.getProces sorDataManager(),
1235 src, matrix))-> unref();
1235 if (kInner_SkBlurStyle == fBlurStyle) { 1236 if (kInner_SkBlurStyle == fBlurStyle) {
1236 // inner: dst = dst * src 1237 // inner: dst = dst * src
1237 paint.setCoverageSetOpXPFactory(SkRegion::kIntersect_Op); 1238 paint.setCoverageSetOpXPFactory(SkRegion::kIntersect_Op);
1238 } else if (kSolid_SkBlurStyle == fBlurStyle) { 1239 } else if (kSolid_SkBlurStyle == fBlurStyle) {
1239 // solid: dst = src + dst - src * dst 1240 // solid: dst = src + dst - src * dst
1240 // = src + (1 - src) * dst 1241 // = src + (1 - src) * dst
1241 paint.setCoverageSetOpXPFactory(SkRegion::kUnion_Op); 1242 paint.setCoverageSetOpXPFactory(SkRegion::kUnion_Op);
1242 } else if (kOuter_SkBlurStyle == fBlurStyle) { 1243 } else if (kOuter_SkBlurStyle == fBlurStyle) {
1243 // outer: dst = dst * (1 - src) 1244 // outer: dst = dst * (1 - src)
1244 // = 0 * src + (1 - src) * dst 1245 // = 0 * src + (1 - src) * dst
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1285 } else { 1286 } else {
1286 str->append("None"); 1287 str->append("None");
1287 } 1288 }
1288 str->append("))"); 1289 str->append("))");
1289 } 1290 }
1290 #endif 1291 #endif
1291 1292
1292 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) 1293 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter)
1293 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) 1294 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl)
1294 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 1295 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « src/core/SkBitmapProcShader.cpp ('k') | src/effects/SkGpuBlurUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698