Add GrResourceAllocator::makeBudgetHeadroom
This allows the caller to decide whether a plan is feasible before
committing to it. In this CL the drawing manager doesn't actually
call it, but we test it. We'll call it in a follow-up CL
Bug: skia:10877
Change-Id: Ie3a6c14a0196f595c522a0c961aba7b10c980711
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394157
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp
index 9f983f6..e1ce658 100644
--- a/src/gpu/GrDrawingManager.cpp
+++ b/src/gpu/GrDrawingManager.cpp
@@ -211,6 +211,7 @@
task->gatherProxyIntervals(&alloc);
}
+ // TODO: Call makeBudgetHeadroom before proceeding with reordered DAG.
flushed = alloc.planAssignment() && alloc.assign() && this->executeRenderTasks(&flushState);
}
this->removeRenderTasks();