OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |