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

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

Issue 1471053002: Don't create a GXPFactory when blend is SrcOver (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix compile Created 5 years 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/SkArithmeticMode_gpu.h ('k') | src/effects/SkDisplacementMapEffect.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 1244 matching lines...) Expand 10 before | Expand all | Expand 10 after
1255 // inner: dst = dst * src 1255 // inner: dst = dst * src
1256 paint.setCoverageSetOpXPFactory(SkRegion::kIntersect_Op); 1256 paint.setCoverageSetOpXPFactory(SkRegion::kIntersect_Op);
1257 } else if (kSolid_SkBlurStyle == fBlurStyle) { 1257 } else if (kSolid_SkBlurStyle == fBlurStyle) {
1258 // solid: dst = src + dst - src * dst 1258 // solid: dst = src + dst - src * dst
1259 // = src + (1 - src) * dst 1259 // = src + (1 - src) * dst
1260 paint.setCoverageSetOpXPFactory(SkRegion::kUnion_Op); 1260 paint.setCoverageSetOpXPFactory(SkRegion::kUnion_Op);
1261 } else if (kOuter_SkBlurStyle == fBlurStyle) { 1261 } else if (kOuter_SkBlurStyle == fBlurStyle) {
1262 // outer: dst = dst * (1 - src) 1262 // outer: dst = dst * (1 - src)
1263 // = 0 * src + (1 - src) * dst 1263 // = 0 * src + (1 - src) * dst
1264 paint.setCoverageSetOpXPFactory(SkRegion::kDifference_Op); 1264 paint.setCoverageSetOpXPFactory(SkRegion::kDifference_Op);
1265 } else {
1266 paint.setCoverageSetOpXPFactory(SkRegion::kReplace_Op);
1265 } 1267 }
1266 1268
1267 SkAutoTUnref<GrDrawContext> drawContext(context->drawContext((*result)-> asRenderTarget())); 1269 SkAutoTUnref<GrDrawContext> drawContext(context->drawContext((*result)-> asRenderTarget()));
1268 if (!drawContext) { 1270 if (!drawContext) {
1269 return false; 1271 return false;
1270 } 1272 }
1271 1273
1272 drawContext->drawRect(GrClip::WideOpen(), paint, SkMatrix::I(), clipRect ); 1274 drawContext->drawRect(GrClip::WideOpen(), paint, SkMatrix::I(), clipRect );
1273 } 1275 }
1274 1276
(...skipping 28 matching lines...) Expand all
1303 } else { 1305 } else {
1304 str->append("None"); 1306 str->append("None");
1305 } 1307 }
1306 str->append("))"); 1308 str->append("))");
1307 } 1309 }
1308 #endif 1310 #endif
1309 1311
1310 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) 1312 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter)
1311 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) 1313 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl)
1312 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 1314 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « src/effects/SkArithmeticMode_gpu.h ('k') | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698