Index: src/core/SkXfermode.cpp |
=================================================================== |
--- src/core/SkXfermode.cpp (revision 8410) |
+++ src/core/SkXfermode.cpp (working copy) |
@@ -680,6 +680,22 @@ |
return false; |
} |
+bool SkXfermode::asNewEffect(GrContext*, GrEffectRef**, Coeff*, Coeff*) const { |
+ return false; |
+} |
+ |
+bool SkXfermode::AsNewEffect(SkXfermode* xfermode, |
+ GrContext* context, |
+ GrEffectRef** effect, |
+ Coeff* src, |
+ Coeff* dst) { |
+ if (NULL == xfermode) { |
robertphillips
2013/03/27 18:12:09
do we need to set 'effect' to be NULL as part of t
bsalomon
2013/03/27 18:39:42
Yes, will add that.
|
+ return ModeAsCoeff(kSrcOver_Mode, src, dst); |
+ } else { |
+ return xfermode->asNewEffect(context, effect, src, dst); |
+ } |
+} |
+ |
SkPMColor SkXfermode::xferColor(SkPMColor src, SkPMColor dst) const{ |
// no-op. subclasses should override this |
return dst; |
@@ -958,6 +974,10 @@ |
return true; |
} |
+ virtual bool asNewEffect(GrContext*, GrEffectRef**, Coeff* src, Coeff* dst) const SK_OVERRIDE { |
+ return this->asCoeff(src, dst); |
+ } |
+ |
SK_DEVELOPER_TO_STRING() |
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkProcCoeffXfermode) |