Make DDL contexts/drawing managers always sort opLists
We want:
DDLs to always be sorted
Live rendering to still be sorted w/in Skia
Live rendering to still not be sorted in Chrome and Android
Additionally, we want reduced-opList-splitting to only be enabled on some of Skia's bots.
Change-Id: I15e7d69c7e109749665a86a0169ad918c993dc77
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199244
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrRecordingContext.cpp b/src/gpu/GrRecordingContext.cpp
index 23f25cd..9c25f33 100644
--- a/src/gpu/GrRecordingContext.cpp
+++ b/src/gpu/GrRecordingContext.cpp
@@ -61,6 +61,10 @@
fTextBlobCache.reset(new GrTextBlobCache(textblobcache_overbudget_CB, this,
this->contextID()));
+ return true;
+}
+
+void GrRecordingContext::setupDrawingManager(bool explicitlyAllocate, bool sortOpLists) {
GrPathRendererChain::Options prcOptions;
prcOptions.fAllowPathMaskCaching = this->options().fAllowPathMaskCaching;
#if GR_TEST_UTILS
@@ -90,13 +94,16 @@
}
#endif
+ // SHORT TERM TODO: until intermediate flushes at allocation time are added we need to obey the
+ // reduceOpListSplitting flag. Once that lands we should always reduce opList splitting in
+ // DDL contexts/drawing managers. We should still obey the options for non-DDL drawing managers
+ // until predictive intermediate flushes are added (i.e., we can't reorder forever).
fDrawingManager.reset(new GrDrawingManager(this,
- prcOptions,
- textContextOptions,
- this->explicitlyAllocateGPUResources(),
- this->options().fSortRenderTargets,
- this->options().fReduceOpListSplitting));
- return true;
+ prcOptions,
+ textContextOptions,
+ explicitlyAllocate,
+ sortOpLists,
+ this->options().fReduceOpListSplitting));
}
void GrRecordingContext::abandonContext() {