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

Unified Diff: src/gpu/GrRenderTarget.cpp

Issue 1225923010: Refugee from Dead Machine 4: MDB Monster Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Last update from dead machine Created 4 years, 8 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/gpu/GrPipelineBuilder.h ('k') | src/gpu/GrReorderCommandBuilder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « src/gpu/GrPipelineBuilder.h ('k') | src/gpu/GrReorderCommandBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698