Remove DDLTarget tracking from the GrDrawingManager
By making the DDLTask admit that it is using its ddlTarget
we no longer need this tracking in the drawing manager.
Change-Id: I1696ee6c089e4c21abf0781eb7e3b0fa78b3dbb4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/352176
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp
index 49c63e4..c4ed592 100644
--- a/src/gpu/GrDrawingManager.cpp
+++ b/src/gpu/GrDrawingManager.cpp
@@ -104,11 +104,9 @@
access == SkSurface::BackendSurfaceAccess::kNoAccess && !newState) {
bool allUnused = std::all_of(proxies.begin(), proxies.end(), [&](GrSurfaceProxy* proxy) {
bool used = std::any_of(fDAG.begin(), fDAG.end(), [&](auto& task) {
- // TODO: the DDLTask should now just return true here instead of
- // needing GrDrawingManager::isDDLTarget.
return task && task->isUsed(proxy);
});
- return !used && !this->isDDLTarget(proxy);
+ return !used;
});
if (allUnused) {
if (info.fSubmittedProc) {
@@ -252,7 +250,6 @@
#endif
fLastRenderTasks.reset();
fDAG.reset();
- this->clearDDLTargets();
#ifdef SK_DEBUG
// In non-DDL mode this checks that all the flushed ops have been freed from the memory pool.
@@ -642,8 +639,6 @@
newTextureProxy->markMipmapsDirty();
}
- this->addDDLTarget(newDest, ddl->priv().targetProxy());
-
// Here we jam the proxy that backs the current replay SkSurface into the LazyProxyData.
// The lazy proxy that references it (in the DDL opsTasks) will then steal its GrTexture.
ddl->fLazyProxyData->fReplayDest = newDest;
@@ -688,11 +683,6 @@
}
#endif
-void GrDrawingManager::addDDLTarget(GrSurfaceProxy* newTarget, GrRenderTargetProxy* ddlTarget) {
- SkASSERT(ddlTarget->isDDLTarget());
- fDDLTargets.set(newTarget->uniqueID().asUInt(), ddlTarget);
-}
-
void GrDrawingManager::closeActiveOpsTask() {
if (fActiveOpsTask) {
// This is a temporary fix for the partial-MDB world. In that world we're not