diff options
author | Brian Osman <brianosman@google.com> | 2017-05-26 16:30:19 -0400 |
---|---|---|
committer | Brian Osman <brianosman@google.com> | 2017-05-26 20:40:22 +0000 |
commit | 988adb495da924e37049eeaa4682addf4692cf27 (patch) | |
tree | dd9e3b58189e4897d7047c3143a478c69bd5ee06 /tests | |
parent | 4e1868c7f7878123c52cade16741010bcfeb7c73 (diff) |
Reduce tree depth on iOS too
Bug: skia:6627
Change-Id: Ib92b62bf1191170a46e63f61fa9502ca2f9ee771
Reviewed-on: https://skia-review.googlesource.com/18072
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/GLProgramsTest.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp index 26df90e8e0..51259781f2 100644 --- a/tests/GLProgramsTest.cpp +++ b/tests/GLProgramsTest.cpp @@ -218,7 +218,11 @@ static void set_random_color_coverage_stages(GrPaint* paint, if (d->fRandom->nextF() < procTreeProbability) { // A full tree with 5 levels (31 nodes) may cause a program that exceeds shader limits // (e.g. uniform or varying limits); maxTreeLevels should be a number from 1 to 4 inclusive. - const int maxTreeLevels = 4; + int maxTreeLevels = 4; + // On iOS we can exceed the maximum number of varyings. http://skbug.com/6627. +#ifdef SK_BUILD_FOR_IOS + maxTreeLevels = 2; +#endif sk_sp<GrFragmentProcessor> fp(create_random_proc_tree(d, 2, maxTreeLevels)); paint->addColorFragmentProcessor(std::move(fp)); } else { |