Index: src/gpu/GrRenderTarget.cpp |
diff --git a/src/gpu/GrRenderTarget.cpp b/src/gpu/GrRenderTarget.cpp |
index d539c900f32f78d252da28bfbd8098f798c97b0b..59a7ae5a2a72b73b4ec9f8d908de95370ab80d95 100644 |
--- a/src/gpu/GrRenderTarget.cpp |
+++ b/src/gpu/GrRenderTarget.cpp |
@@ -10,6 +10,7 @@ |
#include "GrRenderTarget.h" |
#include "GrContext.h" |
+#include "GrDrawContext.h" |
#include "GrGpu.h" |
#include "GrRenderTargetPriv.h" |
#include "GrStencilAttachment.h" |
@@ -17,10 +18,12 @@ |
void GrRenderTarget::discard() { |
// go through context so that all necessary flushing occurs |
GrContext* context = this->getContext(); |
- if (NULL == context) { |
+ GrDrawContext* drawContext = context ? context->drawContext() : NULL; |
+ if (!drawContext) { |
return; |
} |
- context->discardRenderTarget(this); |
+ |
+ drawContext->discard(this); |
} |
void GrRenderTarget::flagAsNeedingResolve(const SkIRect* rect) { |