Cleanup some legacy instantiate calls
Since explicit resource allocation has stuck these instantiate calls are no longer required.
Change-Id: I5a8a7fa714eb1e9550f4f645ce8fced2d5f7aa4e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222457
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp
index 54a21ea..478a4d0 100644
--- a/src/gpu/GrDrawingManager.cpp
+++ b/src/gpu/GrDrawingManager.cpp
@@ -321,8 +321,8 @@
while (alloc.assign(&startIndex, &stopIndex, &error)) {
if (GrResourceAllocator::AssignError::kFailedProxyInstantiation == error) {
for (int i = startIndex; i < stopIndex; ++i) {
- if (fDAG.opList(i) && !fDAG.opList(i)->isFullyInstantiated()) {
- // If the backing surface wasn't allocated drop the entire opList.
+ if (fDAG.opList(i) && !fDAG.opList(i)->isInstantiated()) {
+ // If the backing surface wasn't allocated, drop the entire opList.
fDAG.removeOpList(i);
}
if (fDAG.opList(i)) {
@@ -395,12 +395,6 @@
}
#endif
- auto direct = fContext->priv().asDirectContext();
- if (!direct) {
- return false;
- }
-
- auto resourceProvider = direct->priv().resourceProvider();
bool anyOpListsExecuted = false;
for (int i = startIndex; i < stopIndex; ++i) {
@@ -409,16 +403,9 @@
}
GrOpList* opList = fDAG.opList(i);
+ SkASSERT(opList->isInstantiated());
+ SkASSERT(opList->deferredProxiesAreInstantiated());
- if (!opList->isFullyInstantiated()) {
- // If the backing surface wasn't allocated drop the draw of the entire opList.
- fDAG.removeOpList(i);
- continue;
- }
-
- // TODO: handle this instantiation via lazy surface proxies?
- // Instantiate all deferred proxies (being built on worker threads) so we can upload them
- opList->instantiateDeferredProxies(resourceProvider);
opList->prepare(flushState);
}