Add context option to reduce opList splitting
This is split out of: https://skia-review.googlesource.com/c/skia/+/143113 (Reduce arbitrary opList splitting when sorting (take 3)).
It needs to be behind a context option because, without mini-flushes, it can cause OOM on smaller devices (e.g., Nexus7 and AndroidOne).
Change-Id: Icde3302bd033a9c4634bb0ca97c950456e73db7c
Reviewed-on: https://skia-review.googlesource.com/c/160763
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index c0d3886..b29454c 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -134,7 +134,8 @@
: false;
fDrawingManager.reset(new GrDrawingManager(this, prcOptions, textContextOptions,
&fSingleOwner, explicitlyAllocatingResources,
- options.fSortRenderTargets));
+ options.fSortRenderTargets,
+ options.fReduceOpListSplitting));
fGlyphCache = new GrGlyphCache(fCaps.get(), options.fGlyphCacheTextureMaximumBytes);