| Index: src/core/SkXfermode.cpp
|
| diff --git a/src/core/SkXfermode.cpp b/src/core/SkXfermode.cpp
|
| index ba9670a9dbc1aa9222912ea672c0b8567ce65341..5b5c6a17a5a5e5ee8a69f19835fd1fd1146fd2c4 100644
|
| --- a/src/core/SkXfermode.cpp
|
| +++ b/src/core/SkXfermode.cpp
|
| @@ -672,7 +672,7 @@ bool SkXfermode::asFragmentProcessor(GrFragmentProcessor**, GrTexture*) const {
|
| return false;
|
| }
|
|
|
| -bool SkXfermode::asXPFactory(GrXPFactory**) const {
|
| +bool SkXfermode::asXPFactory(const GrContext*, GrXPFactory**) const {
|
| return false;
|
| }
|
|
|
| @@ -680,18 +680,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
|
| @@ -935,6 +935,7 @@ void SkProcCoeffXfermode::xferA8(SkAlpha* SK_RESTRICT dst,
|
| }
|
|
|
| #if SK_SUPPORT_GPU
|
| +#include "effects/GrAdvancedEquationXferProcessor.h"
|
| #include "effects/GrCustomXfermode.h"
|
|
|
| bool SkProcCoeffXfermode::asFragmentProcessor(GrFragmentProcessor** fp,
|
| @@ -949,7 +950,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);
|
| @@ -958,6 +959,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);
|
|
|