Revert "Always try to reduce opList splitting in DDL contexts/drawingManagers"

This reverts commit 2cce805f1f.

Reason for revert: Chrome

Original change's description:
> 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>

TBR=bsalomon@google.com,robertphillips@google.com

Change-Id: Idb2dbda1a41844b2541526d504b117fd4cd628cc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/200505
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This commit is contained in:
Robert Phillips 2019-03-12 16:28:59 +00:00 committed by Skia Commit-Bot
parent 692147fccd
commit 60dd62ba20
6 changed files with 27 additions and 29 deletions

View File

@ -32,7 +32,7 @@ protected:
GrRecordingContext(GrBackendApi, const GrContextOptions&, uint32_t contextID);
bool init(sk_sp<const GrCaps>, sk_sp<GrSkSLFPFactoryCache>) override;
void setupDrawingManager(bool explicitlyAllocate, bool sortOpLists, bool reduceOpListSplitting);
void setupDrawingManager(bool explicitlyAllocate, bool sortOpLists);
void abandonContext() override;

View File

@ -52,10 +52,9 @@ protected:
return false;
}
// DDL contexts/drawing managers always sort the oplists and reduce opList splitting.
// This, in turn, implies that explicit resource allocation is always on (regardless
// of how Skia is compiled).
this->setupDrawingManager(true, true, true);
// DDL contexts/drawing managers always sort the oplists. This, in turn, implies that
// explicit resource allocation is always on (regardless of how Skia is compiled).
this->setupDrawingManager(true, true);
SkASSERT(this->caps());

View File

@ -145,7 +145,7 @@ GrDrawingManager::GrDrawingManager(GrRecordingContext* context,
const GrTextContext::Options& optionsForTextContext,
bool explicitlyAllocating,
bool sortOpLists,
bool reduceOpListSplitting)
GrContextOptions::Enable reduceOpListSplitting)
: fContext(context)
, fOptionsForPathRendererChain(optionsForPathRendererChain)
, fOptionsForTextContext(optionsForTextContext)
@ -153,8 +153,16 @@ GrDrawingManager::GrDrawingManager(GrRecordingContext* context,
, fTextContext(nullptr)
, fPathRendererChain(nullptr)
, fSoftwarePathRenderer(nullptr)
, fFlushing(false)
, fReduceOpListSplitting(reduceOpListSplitting) {
, fFlushing(false) {
if (GrContextOptions::Enable::kNo == reduceOpListSplitting) {
fReduceOpListSplitting = false;
} else if (GrContextOptions::Enable::kYes == reduceOpListSplitting) {
fReduceOpListSplitting = true;
} else {
// For now, this is only turned on when explicitly enabled. Once mini-flushes are
// implemented it should be enabled whenever sorting is enabled.
fReduceOpListSplitting = false; // sortOpLists
}
}
void GrDrawingManager::cleanup() {

View File

@ -140,7 +140,7 @@ private:
const GrTextContext::Options&,
bool explicitlyAllocating,
bool sortOpLists,
bool reduceOpListSplitting);
GrContextOptions::Enable reduceOpListSplitting);
bool wasAbandoned() const;

View File

@ -86,18 +86,7 @@ protected:
sortOpLists = true;
}
// 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);
this->setupDrawingManager(this->explicitlyAllocateGPUResources(), sortOpLists);
SkASSERT(this->caps());

View File

@ -64,9 +64,7 @@ bool GrRecordingContext::init(sk_sp<const GrCaps> caps, sk_sp<GrSkSLFPFactoryCac
return true;
}
void GrRecordingContext::setupDrawingManager(bool explicitlyAllocate,
bool sortOpLists,
bool reduceOpListSplitting) {
void GrRecordingContext::setupDrawingManager(bool explicitlyAllocate, bool sortOpLists) {
GrPathRendererChain::Options prcOptions;
prcOptions.fAllowPathMaskCaching = this->options().fAllowPathMaskCaching;
#if GR_TEST_UTILS
@ -96,12 +94,16 @@ void GrRecordingContext::setupDrawingManager(bool explicitlyAllocate,
}
#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,
explicitlyAllocate,
sortOpLists,
reduceOpListSplitting));
prcOptions,
textContextOptions,
explicitlyAllocate,
sortOpLists,
this->options().fReduceOpListSplitting));
}
void GrRecordingContext::abandonContext() {