| Index: src/core/SkXfermode.cpp
|
| diff --git a/src/core/SkXfermode.cpp b/src/core/SkXfermode.cpp
|
| index 7165e99161bd2bc69e4aff56e536a1c5f9e5d336..f8da9a7d6fa7705826b2ab6edd79e87cc9b85a14 100644
|
| --- a/src/core/SkXfermode.cpp
|
| +++ b/src/core/SkXfermode.cpp
|
| @@ -675,7 +675,7 @@ bool SkXfermode::asFragmentProcessor(GrFragmentProcessor**, GrTexture*) const {
|
| return false;
|
| }
|
|
|
| -bool SkXfermode::asXPFactory(GrXPFactory**) const {
|
| +bool SkXfermode::asXPFactory(const GrContext*, GrXPFactory**) const {
|
| return false;
|
| }
|
|
|
| @@ -683,18 +683,18 @@ bool SkXfermode::asXPFactory(GrXPFactory**) const {
|
| #if SK_SUPPORT_GPU
|
| #include "effects/GrPorterDuffXferProcessor.h"
|
|
|
| -bool SkXfermode::AsXPFactory(SkXfermode* xfermode, GrXPFactory** xpf) {
|
| +bool SkXfermode::AsXPFactory(SkXfermode* xfermode, const GrContext* context, GrXPFactory** xpf) {
|
| if (NULL == xfermode) {
|
| if (xpf) {
|
| *xpf = GrPorterDuffXPFactory::Create(kSrcOver_Mode);
|
| }
|
| return true;
|
| } else {
|
| - return xfermode->asXPFactory(xpf);
|
| + return xfermode->asXPFactory(context, xpf);
|
| }
|
| }
|
| #else
|
| -bool SkXfermode::AsXPFactory(SkXfermode* xfermode, GrXPFactory** xpf) {
|
| +bool SkXfermode::AsXPFactory(SkXfermode*, const GrContext*, GrXPFactory**) {
|
| return false;
|
| }
|
| #endif
|
| @@ -938,6 +938,7 @@ void SkProcCoeffXfermode::xferA8(SkAlpha* SK_RESTRICT dst,
|
| }
|
|
|
| #if SK_SUPPORT_GPU
|
| +#include "effects/GrAdvancedEquationXPFactory.h"
|
| #include "effects/GrCustomXfermode.h"
|
|
|
| bool SkProcCoeffXfermode::asFragmentProcessor(GrFragmentProcessor** fp,
|
| @@ -952,7 +953,7 @@ bool SkProcCoeffXfermode::asFragmentProcessor(GrFragmentProcessor** fp,
|
| return false;
|
| }
|
|
|
| -bool SkProcCoeffXfermode::asXPFactory(GrXPFactory** xp) const {
|
| +bool SkProcCoeffXfermode::asXPFactory(const GrContext* context, GrXPFactory** xp) const {
|
| if (CANNOT_USE_COEFF != fSrcCoeff) {
|
| if (xp) {
|
| *xp = GrPorterDuffXPFactory::Create(fMode);
|
| @@ -961,6 +962,14 @@ bool SkProcCoeffXfermode::asXPFactory(GrXPFactory** xp) const {
|
| return true;
|
| }
|
|
|
| + if (GrAdvancedEquationXPFactory::IsSupported(context, fMode)) {
|
| + if (xp) {
|
| + *xp = GrAdvancedEquationXPFactory::Create(context, fMode);
|
| + SkASSERT(*xp);
|
| + }
|
| + return true;
|
| + }
|
| +
|
| if (GrCustomXfermode::IsSupportedMode(fMode)) {
|
| if (xp) {
|
| *xp = GrCustomXfermode::CreateXPFactory(fMode);
|
|
|