Rewrite tessellation atlases as normal render tasks
Rewrites tessellation atlases as normal render tasks instead of
"onFlush" tasks. These tasks get inserted into the DAG upfront, lay
out their atlases as dependent tasks get built and reference them, and
finally add their ops to render themselves during onMakeClosed. Doing it
this way allows us to pause the flush and re-render the atlas whenever
it runs out of room.
Bug: b/188794626
Bug: chromium:928984
Change-Id: Id59a5527924c63d5ff7c5bce46a88368e79fc3ef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420556
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
diff --git a/src/gpu/GrRenderTask.cpp b/src/gpu/GrRenderTask.cpp
index 1c15d66..22a7604 100644
--- a/src/gpu/GrRenderTask.cpp
+++ b/src/gpu/GrRenderTask.cpp
@@ -149,10 +149,12 @@
return; // don't add duplicate dependencies
}
- // We are closing 'dependedOnTask' here bc the current contents of it are what 'this'
- // renderTask depends on. We need a break in 'dependedOnTask' so that the usage of
- // that state has a chance to execute.
- dependedOnTask->makeClosed(drawingMgr->getContext());
+ if (!dependedOnTask->isSetFlag(kAtlas_Flag)) {
+ // We are closing 'dependedOnTask' here bc the current contents of it are what 'this'
+ // renderTask depends on. We need a break in 'dependedOnTask' so that the usage of
+ // that state has a chance to execute.
+ dependedOnTask->makeClosed(drawingMgr->getContext());
+ }
}
auto resolveFlags = GrSurfaceProxy::ResolveFlags::kNone;