Index: src/effects/SkXfermodeImageFilter.cpp |
diff --git a/src/effects/SkXfermodeImageFilter.cpp b/src/effects/SkXfermodeImageFilter.cpp |
index 76c46295a490f7d56b8aebcf90c93c52d652fa63..f98247a2f47c98f8f1f209b37f7921b76abb4d55 100644 |
--- a/src/effects/SkXfermodeImageFilter.cpp |
+++ b/src/effects/SkXfermodeImageFilter.cpp |
@@ -14,6 +14,7 @@ |
#include "SkXfermode.h" |
#if SK_SUPPORT_GPU |
#include "GrContext.h" |
+#include "GrDrawContext.h" |
#include "effects/GrTextureDomain.h" |
#include "SkGr.h" |
#endif |
@@ -178,7 +179,14 @@ bool SkXfermodeImageFilter::filterImageGPU(Proxy* proxy, |
paint.addColorProcessor(foregroundDomain.get()); |
paint.addColorProcessor(xferProcessor)->unref(); |
- context->drawRect(dst->asRenderTarget(), GrClip::WideOpen(), paint, SkMatrix::I(), srcRect); |
+ |
+ GrDrawContext* drawContext = context->drawContext(); |
+ if (!drawContext) { |
+ return false; |
+ } |
+ |
+ drawContext->drawRect(dst->asRenderTarget(), GrClip::WideOpen(), paint, |
+ SkMatrix::I(), srcRect); |
offset->fX = backgroundOffset.fX; |
offset->fY = backgroundOffset.fY; |