skia2/tests/sksl/inliner/ExponentialGrowth.sksl
John Stiles 053739dfa8 Add unit test for O(n^3) behavior in the inliner.
In practice, the inline threshold does a good job of limiting the
blast radius here.

Change-Id: I495184116e733262ea9d84fec30885ea047ca116
Bug: skia:10945
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/334597
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-11-13 22:13:21 +00:00

25 lines
873 B
Plaintext

void fn1() { sk_FragColor.x = 0; }
void fn2() { fn1(); fn1(); fn1(); }
void fn3() { fn2(); fn2(); fn2(); }
void fn4() { fn3(); fn3(); fn3(); }
void fn5() { fn4(); fn4(); fn4(); }
void fn6() { fn5(); fn5(); fn5(); }
void fn7() { fn6(); fn6(); fn6(); }
void fn8() { fn7(); fn7(); fn7(); }
void fn9() { fn8(); fn8(); fn8(); }
void fnA() { fn9(); fn9(); fn9(); }
void fnB() { fnA(); fnA(); fnA(); }
void fnC() { fnB(); fnB(); fnB(); }
void fnD() { fnC(); fnC(); fnC(); }
void fnE() { fnD(); fnD(); fnD(); }
void fnF() { fnE(); fnE(); fnE(); }
void fnG() { fnF(); fnF(); fnF(); }
void fnH() { fnG(); fnG(); fnG(); }
void fnI() { fnH(); fnH(); fnH(); }
void fnJ() { fnI(); fnI(); fnI(); }
void fnK() { fnJ(); fnJ(); fnJ(); }
void fnL() { fnK(); fnK(); fnK(); }
void fnM() { fnL(); fnL(); fnL(); }
void fnN() { fnM(); fnM(); fnM(); }
void main() { fnN(); }