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/GrDDLTask.cpp b/src/gpu/GrDDLTask.cpp
index 57f8dce..ab90e28 100644
--- a/src/gpu/GrDDLTask.cpp
+++ b/src/gpu/GrDDLTask.cpp
@@ -51,6 +51,10 @@
}
bool GrDDLTask::onIsUsed(GrSurfaceProxy* proxy) const {
+ if (proxy == fDDLTarget.get()) {
+ return true;
+ }
+
for (auto& task : fDDL->priv().renderTasks()) {
if (task->isUsed(proxy)) {
return true;