OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkBlurMaskFilter.h" | 8 #include "SkBlurMaskFilter.h" |
9 #include "SkBlurMask.h" | 9 #include "SkBlurMask.h" |
10 #include "SkGpuBlurUtils.h" | 10 #include "SkGpuBlurUtils.h" |
(...skipping 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1270 // = src + (1 - src) * dst | 1270 // = src + (1 - src) * dst |
1271 paint.setCoverageSetOpXPFactory(SkRegion::kUnion_Op); | 1271 paint.setCoverageSetOpXPFactory(SkRegion::kUnion_Op); |
1272 } else if (kOuter_SkBlurStyle == fBlurStyle) { | 1272 } else if (kOuter_SkBlurStyle == fBlurStyle) { |
1273 // outer: dst = dst * (1 - src) | 1273 // outer: dst = dst * (1 - src) |
1274 // = 0 * src + (1 - src) * dst | 1274 // = 0 * src + (1 - src) * dst |
1275 paint.setCoverageSetOpXPFactory(SkRegion::kDifference_Op); | 1275 paint.setCoverageSetOpXPFactory(SkRegion::kDifference_Op); |
1276 } else { | 1276 } else { |
1277 paint.setCoverageSetOpXPFactory(SkRegion::kReplace_Op); | 1277 paint.setCoverageSetOpXPFactory(SkRegion::kReplace_Op); |
1278 } | 1278 } |
1279 | 1279 |
1280 drawContext->drawRect(GrClip::WideOpen(), paint, SkMatrix::I(), clipRect
); | 1280 drawContext->drawRect(GrWideOpenClip(), paint, SkMatrix::I(), clipRect); |
1281 } | 1281 } |
1282 | 1282 |
1283 *result = drawContext->asTexture().release(); | 1283 *result = drawContext->asTexture().release(); |
1284 return true; | 1284 return true; |
1285 } | 1285 } |
1286 | 1286 |
1287 #endif // SK_SUPPORT_GPU | 1287 #endif // SK_SUPPORT_GPU |
1288 | 1288 |
1289 | 1289 |
1290 #ifndef SK_IGNORE_TO_STRING | 1290 #ifndef SK_IGNORE_TO_STRING |
(...skipping 21 matching lines...) Expand all Loading... |
1312 } else { | 1312 } else { |
1313 str->append("None"); | 1313 str->append("None"); |
1314 } | 1314 } |
1315 str->append("))"); | 1315 str->append("))"); |
1316 } | 1316 } |
1317 #endif | 1317 #endif |
1318 | 1318 |
1319 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) | 1319 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) |
1320 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) | 1320 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) |
1321 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END | 1321 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END |
OLD | NEW |