Index: src/gpu/GrRenderTarget.cpp |
diff --git a/src/gpu/GrRenderTarget.cpp b/src/gpu/GrRenderTarget.cpp |
index e547021227724d03e11ab0bb4c9053989eb8288e..bade46e4900c7538b2b0e0840c19be8c09c83efb 100644 |
--- a/src/gpu/GrRenderTarget.cpp |
+++ b/src/gpu/GrRenderTarget.cpp |
@@ -24,6 +24,11 @@ GrRenderTarget::~GrRenderTarget() { |
} |
void GrRenderTarget::discard() { |
+ |
+ // since we're discarding we know we don't need the prior DC |
+ // TODO: we should be able to automatically know when a discard is possible: |
+ // once all pending reads are satisfied and there are no refs |
+ this->setFromRawPixels(false); |
// go through context so that all necessary flushing occurs |
GrContext* context = this->getContext(); |
if (!context) { |
@@ -36,6 +41,8 @@ void GrRenderTarget::discard() { |
} |
drawContext->discard(); |
+ |
+ this->setFromRawPixels(false); |
} |
void GrRenderTarget::flagAsNeedingResolve(const SkIRect* rect) { |