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

Unified Diff: src/gpu/GrDrawTarget.cpp

Issue 1417263002: Revert of Dependencies are now added between the drawTargets in GrPipeline (Closed) Base URL: https://skia.googlesource.com/skia.git@mdb-adddeps
Patch Set: Created 5 years, 2 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/GrDrawTarget.h ('k') | src/gpu/GrDrawingManager.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTarget.cpp
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index 1411687f7f7ad3f73eb819707b15bdfcbcdfc9e3..f42ee111ce351b1b6e26190581849dcca1cbd579 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -32,14 +32,13 @@
////////////////////////////////////////////////////////////////////////////////
-GrDrawTarget::GrDrawTarget(GrRenderTarget* rt, GrGpu* gpu, GrResourceProvider* resourceProvider)
+GrDrawTarget::GrDrawTarget(GrGpu* gpu, GrResourceProvider* resourceProvider)
: fGpu(SkRef(gpu))
, fResourceProvider(resourceProvider)
, fFlushState(fGpu, fResourceProvider, 0)
, fFlushing(false)
, fFirstUnpreparedBatch(0)
- , fFlags(0)
- , fRenderTarget(rt) {
+ , fFlags(0) {
// TODO: Stop extracting the context (currently needed by GrClipMaskManager)
fContext = fGpu->getContext();
fClipMaskManager.reset(new GrClipMaskManager(this));
@@ -51,10 +50,6 @@
}
GrDrawTarget::~GrDrawTarget() {
- if (fRenderTarget && this == fRenderTarget->getLastDrawTarget()) {
- fRenderTarget->setLastDrawTarget(nullptr);
- }
-
fGpu->unref();
}
@@ -187,7 +182,7 @@
// drawTargets will be created to replace them if the SkGpuDevice(s) write to them again.
this->makeClosed();
- // Loop over the batches that haven't yet generated their geometry
+ // Loop over all batches and generate geometry
for (; fFirstUnpreparedBatch < fBatches.count(); ++fFirstUnpreparedBatch) {
fBatches[fFirstUnpreparedBatch]->prepare(&fFlushState);
}
@@ -231,11 +226,6 @@
if (!this->installPipelineInDrawBatch(&pipelineBuilder, &scissorState, batch)) {
return;
}
-
-#ifdef ENABLE_MDB
- SkASSERT(fRenderTarget);
- batch->pipeline()->addDependenciesTo(fRenderTarget);
-#endif
this->recordBatch(batch);
}
@@ -468,10 +458,6 @@
const SkIPoint& dstPoint) {
GrBatch* batch = GrCopySurfaceBatch::Create(dst, src, srcRect, dstPoint);
if (batch) {
-#ifdef ENABLE_MDB
- this->addDependency(src);
-#endif
-
this->recordBatch(batch);
batch->unref();
}
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrDrawingManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698