Revert "Have DDLs honor the reduceOpsTaskSplittingFlag"
This reverts commit d7b59c091d
.
Reason for revert: Regression in chrome:1146701
Original change's description:
> Have DDLs honor the reduceOpsTaskSplittingFlag
>
> Especially while I'm fiddling with the implementation, we don't
> want the user to be surprised when using DDLs also triggers
> this other codepath.
>
> Bug: skia:10877
> Change-Id: I660ea08189fff45acd7a45df12e15c45f607758a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332720
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Auto-Submit: Adlai Holler <adlai@google.com>
TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: skia:10877 chromium:1146701
Change-Id: Ieab2853b54663e7633bec6d71929db9885251ed2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/346659
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
This commit is contained in:
parent
36129133f1
commit
6e9bf51dd8
@ -128,8 +128,7 @@ protected:
|
||||
};
|
||||
|
||||
GrRecordingContext(sk_sp<GrContextThreadSafeProxy>);
|
||||
|
||||
bool init() override;
|
||||
void setupDrawingManager(bool reduceOpsTaskSplitting);
|
||||
|
||||
void abandonContext() override;
|
||||
|
||||
|
@ -32,6 +32,17 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
bool init() override {
|
||||
if (!INHERITED::init()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// DDL contexts/drawing managers always attempt to reduce opsTask splitting.
|
||||
this->setupDrawingManager(/* reduceOpsTaskSplitting */true);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Add to the set of unique program infos required by this DDL
|
||||
void recordProgramInfo(const GrProgramInfo* programInfo) final {
|
||||
if (!programInfo) {
|
||||
|
@ -49,6 +49,12 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef SK_DISABLE_REDUCE_OPLIST_SPLITTING
|
||||
static const bool kDefaultReduceOpsTaskSplitting = false;
|
||||
#else
|
||||
static const bool kDefaultReduceOpsTaskSplitting = false;
|
||||
#endif
|
||||
|
||||
#define ASSERT_SINGLE_OWNER GR_ASSERT_SINGLE_OWNER(this->singleOwner())
|
||||
|
||||
GrDirectContext::GrDirectContext(GrBackendApi backend, const GrContextOptions& options)
|
||||
@ -207,6 +213,15 @@ bool GrDirectContext::init() {
|
||||
fShaderErrorHandler = GrShaderUtils::DefaultShaderErrorHandler();
|
||||
}
|
||||
|
||||
bool reduceOpsTaskSplitting = kDefaultReduceOpsTaskSplitting;
|
||||
if (GrContextOptions::Enable::kNo == this->options().fReduceOpsTaskSplitting) {
|
||||
reduceOpsTaskSplitting = false;
|
||||
} else if (GrContextOptions::Enable::kYes == this->options().fReduceOpsTaskSplitting) {
|
||||
reduceOpsTaskSplitting = true;
|
||||
}
|
||||
|
||||
this->setupDrawingManager(reduceOpsTaskSplitting);
|
||||
|
||||
GrDrawOpAtlas::AllowMultitexturing allowMultitexturing;
|
||||
if (GrContextOptions::Enable::kNo == this->options().fAllowMultipleGlyphCacheTextures ||
|
||||
// multitexturing supported only if range can represent the index + texcoords fully
|
||||
|
@ -182,7 +182,7 @@ private:
|
||||
|
||||
GrTokenTracker fTokenTracker;
|
||||
bool fFlushing;
|
||||
const bool fReduceOpsTaskSplitting;
|
||||
bool fReduceOpsTaskSplitting;
|
||||
|
||||
SkTArray<GrOnFlushCallbackObject*> fOnFlushCBObjects;
|
||||
|
||||
|
@ -50,11 +50,7 @@ int GrRecordingContext::maxSurfaceSampleCountForColorType(SkColorType colorType)
|
||||
return this->caps()->maxRenderTargetSampleCount(format);
|
||||
}
|
||||
|
||||
bool GrRecordingContext::init() {
|
||||
if (!INHERITED::init()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void GrRecordingContext::setupDrawingManager(bool reduceOpsTaskSplitting) {
|
||||
GrPathRendererChain::Options prcOptions;
|
||||
prcOptions.fAllowPathMaskCaching = this->options().fAllowPathMaskCaching;
|
||||
#if GR_TEST_UTILS
|
||||
@ -68,16 +64,9 @@ bool GrRecordingContext::init() {
|
||||
prcOptions.fGpuPathRenderers &= ~GpuPathRenderers::kSmall;
|
||||
}
|
||||
|
||||
bool reduceOpsTaskSplitting = false;
|
||||
if (GrContextOptions::Enable::kYes == this->options().fReduceOpsTaskSplitting) {
|
||||
reduceOpsTaskSplitting = true;
|
||||
} else if (GrContextOptions::Enable::kNo == this->options().fReduceOpsTaskSplitting) {
|
||||
reduceOpsTaskSplitting = false;
|
||||
}
|
||||
fDrawingManager.reset(new GrDrawingManager(this,
|
||||
prcOptions,
|
||||
reduceOpsTaskSplitting));
|
||||
return true;
|
||||
}
|
||||
|
||||
void GrRecordingContext::abandonContext() {
|
||||
|
Loading…
Reference in New Issue
Block a user