Revert "Run the inliner on GLES devices only."
This reverts commit 759bbf7b60372d381152a0f4461e3db2f81aebbc.
Reason for revert: Pinpoint regressions when the inliner is off
http://go/crb/1194808#c7
Original change's description:
> Run the inliner on GLES devices only.
>
> We've found that the inliner only gives tangible gains in draw
> performance on GLES devices. (See go/optimization-in-sksl-inliner)
> On other devices, we can skip it and still get the same draw performance
> regardless. A caps bit has been added to indicate a device that will
> benefit from inlining, and the inliner is now disabled on platforms that
> don't set this bit.
>
> Change-Id: I61dfafd7e919deabf81529cea832bb11496410cc
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/390300
> Auto-Submit: John Stiles <johnstiles@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=brianosman@google.com,johnstiles@google.com
Change-Id: Ia9ab4db3c3e8a088afa84d4ad3105aa089bf5084
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/391858
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
diff --git a/src/sksl/SkSLCompiler.cpp b/src/sksl/SkSLCompiler.cpp
index f89ec2f..cc01495 100644
--- a/src/sksl/SkSLCompiler.cpp
+++ b/src/sksl/SkSLCompiler.cpp
@@ -701,11 +701,9 @@
ProgramUsage* usage = program.fUsage.get();
if (fErrorCount == 0) {
- if (fContext->fCaps.enableSkSLInliner() || sInliner == OverrideFlag::kOn) {
- // Run the inliner only once; it is expensive! Multiple passes can very occasionally
- // shake out more wins, but it's diminishing returns.
- fInliner.analyze(program.ownedElements(), program.fSymbols, usage);
- }
+ // Run the inliner only once; it is expensive! Multiple passes can occasionally shake out
+ // more wins, but it's diminishing returns.
+ fInliner.analyze(program.ownedElements(), program.fSymbols, usage);
while (this->removeDeadFunctions(program, usage)) {
// Removing dead functions may cause more functions to become unreferenced. Try again.