Index: src/core/SkImageFilter.cpp |
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp |
index 0a5e16e1d7a54d44640a0ff86cc5c343cb4dea42..8694fc557e66488c32538fddef2a253d83df1ca1 100644 |
--- a/src/core/SkImageFilter.cpp |
+++ b/src/core/SkImageFilter.cpp |
@@ -10,6 +10,7 @@ |
#include "SkBitmap.h" |
#include "SkChecksum.h" |
#include "SkDevice.h" |
+#include "GrDrawContext.h" |
#include "SkLazyPtr.h" |
#include "SkMatrixImageFilter.h" |
#include "SkReadBuffer.h" |
@@ -276,11 +277,15 @@ bool SkImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const Cont |
SkASSERT(fp); |
GrPaint paint; |
paint.addColorProcessor(fp)->unref(); |
- context->drawNonAARectToRect(dst->asRenderTarget(), clip, paint, SkMatrix::I(), dstRect, |
- srcRect); |
- WrapTexture(dst, bounds.width(), bounds.height(), result); |
- return true; |
+ GrDrawContext* drawContext = context->drawContext(); |
+ if (drawContext) { |
+ drawContext->drawNonAARectToRect(dst->asRenderTarget(), clip, paint, SkMatrix::I(), |
+ dstRect, srcRect); |
+ |
+ WrapTexture(dst, bounds.width(), bounds.height(), result); |
+ return true; |
+ } |
} |
#endif |
return false; |