Always try to reduce opList splitting in DDL contexts/drawingManagers
This may get us in trouble w/ local DDL testing (since we run all our GMs through DDLs). For Chrome this shouldn't yet be a problem (since they are only using DDLs for compositing).
This does mean we're on a tight timeline to land predictive intermediate flushes before Chrome starts using DDLs for rasterization.
Change-Id: I0bb95c075cff3ee49498ff267d76c3a61d16373e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199722
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrLegacyDirectContext.cpp b/src/gpu/GrLegacyDirectContext.cpp
index d5bce1b..7a5fad0 100644
--- a/src/gpu/GrLegacyDirectContext.cpp
+++ b/src/gpu/GrLegacyDirectContext.cpp
@@ -86,7 +86,18 @@
sortOpLists = true;
}
- this->setupDrawingManager(this->explicitlyAllocateGPUResources(), sortOpLists);
+ // For now, this is only turned on for direct rendering when explicitly enabled.
+ // Once predictive intermediate flushes are implemented it should be enabled whenever
+ // sorting is enabled.
+ bool reduceOpListSplitting = false; // sortOpLists
+ if (GrContextOptions::Enable::kNo == this->options().fReduceOpListSplitting) {
+ reduceOpListSplitting = false;
+ } else if (GrContextOptions::Enable::kYes == this->options().fReduceOpListSplitting) {
+ reduceOpListSplitting = true;
+ }
+
+ this->setupDrawingManager(this->explicitlyAllocateGPUResources(),
+ sortOpLists, reduceOpListSplitting);
SkASSERT(this->caps());