Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(302)

Unified Diff: src/effects/SkXfermodeImageFilter.cpp

Issue 1151283004: Split drawing functionality out of GrContext and into new GrDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix no-GPU builds Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/effects/SkMorphologyImageFilter.cpp ('k') | src/gpu/GrAARectRenderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/effects/SkMorphologyImageFilter.cpp ('k') | src/gpu/GrAARectRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698