| 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 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1269 // = src + (1 - src) * dst | 1269 // = src + (1 - src) * dst |
| 1270 paint.setCoverageSetOpXPFactory(SkRegion::kUnion_Op); | 1270 paint.setCoverageSetOpXPFactory(SkRegion::kUnion_Op); |
| 1271 } else if (kOuter_SkBlurStyle == fBlurStyle) { | 1271 } else if (kOuter_SkBlurStyle == fBlurStyle) { |
| 1272 // outer: dst = dst * (1 - src) | 1272 // outer: dst = dst * (1 - src) |
| 1273 // = 0 * src + (1 - src) * dst | 1273 // = 0 * src + (1 - src) * dst |
| 1274 paint.setCoverageSetOpXPFactory(SkRegion::kDifference_Op); | 1274 paint.setCoverageSetOpXPFactory(SkRegion::kDifference_Op); |
| 1275 } else { | 1275 } else { |
| 1276 paint.setCoverageSetOpXPFactory(SkRegion::kReplace_Op); | 1276 paint.setCoverageSetOpXPFactory(SkRegion::kReplace_Op); |
| 1277 } | 1277 } |
| 1278 | 1278 |
| 1279 SkAutoTUnref<GrDrawContext> drawContext(context->drawContext((*result)->
asRenderTarget())); | 1279 sk_sp<GrDrawContext> drawContext( |
| 1280 context->drawContext(sk_ref_sp((*result)->as
RenderTarget()))); |
| 1280 if (!drawContext) { | 1281 if (!drawContext) { |
| 1281 return false; | 1282 return false; |
| 1282 } | 1283 } |
| 1283 | 1284 |
| 1284 drawContext->drawRect(GrClip::WideOpen(), paint, SkMatrix::I(), clipRect
); | 1285 drawContext->drawRect(GrClip::WideOpen(), paint, SkMatrix::I(), clipRect
); |
| 1285 } | 1286 } |
| 1286 | 1287 |
| 1287 return true; | 1288 return true; |
| 1288 } | 1289 } |
| 1289 | 1290 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 1315 } else { | 1316 } else { |
| 1316 str->append("None"); | 1317 str->append("None"); |
| 1317 } | 1318 } |
| 1318 str->append("))"); | 1319 str->append("))"); |
| 1319 } | 1320 } |
| 1320 #endif | 1321 #endif |
| 1321 | 1322 |
| 1322 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) | 1323 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) |
| 1323 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) | 1324 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) |
| 1324 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END | 1325 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END |
| OLD | NEW |