Index: src/gpu/GrContext.cpp |
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp |
index 3a2bbe864ca184015bdd53f9833c0d52dbb41ae7..c26327eecfe373b6b7ba3e412887e25ba59e542b 100644 |
--- a/src/gpu/GrContext.cpp |
+++ b/src/gpu/GrContext.cpp |
@@ -1440,6 +1440,14 @@ void GrContext::resolveRenderTarget(GrRenderTarget* target) { |
fGpu->resolveRenderTarget(target); |
} |
+void GrContext::discardRenderTarget(GrRenderTarget* target) { |
+ SkASSERT(target); |
+ ASSERT_OWNED_RESOURCE(target); |
+ AutoRestoreEffects are; |
+ AutoCheckFlush acf(this); |
+ this->prepareToDraw(NULL, BUFFERED_DRAW, &are, &acf)->discard(target); |
+} |
+ |
void GrContext::copyTexture(GrTexture* src, GrRenderTarget* dst, const SkIPoint* topLeft) { |
if (NULL == src || NULL == dst) { |
return; |