Chromium Code Reviews| Index: src/gpu/SkGr.cpp |
| diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp |
| index e4dc467e7f8b9ce2ccd27d5957f505371a515063..c89229a8a4c6b41d698fa94b8f1c2e2f9d24871f 100644 |
| --- a/src/gpu/SkGr.cpp |
| +++ b/src/gpu/SkGr.cpp |
| @@ -489,10 +489,10 @@ static inline bool skpaint_to_grpaint_impl(GrContext* context, |
| } |
| } |
| - SkXfermode* mode = skPaint.getXfermode(); |
| - GrXPFactory* xpFactory = nullptr; |
| - SkXfermode::AsXPFactory(mode, &xpFactory); |
| - SkSafeUnref(grPaint->setXPFactory(xpFactory)); |
| + SkXfermode* xfermode = skPaint.getXfermode(); |
| + if (xfermode) { |
|
egdaniel
2016/02/08 15:32:11
This is the check for srcOver right? So that we ke
robertphillips
2016/02/08 15:54:53
Done.
|
| + grPaint->setXPFactory(xfermode->asXPFactory())->unref(); |
| + } |
| #ifndef SK_IGNORE_GPU_DITHER |
| if (skPaint.isDither() && grPaint->numColorFragmentProcessors() > 0) { |