From 988adb495da924e37049eeaa4682addf4692cf27 Mon Sep 17 00:00:00 2001 From: Brian Osman Date: Fri, 26 May 2017 16:30:19 -0400 Subject: Reduce tree depth on iOS too Bug: skia:6627 Change-Id: Ib92b62bf1191170a46e63f61fa9502ca2f9ee771 Reviewed-on: https://skia-review.googlesource.com/18072 Reviewed-by: Mike Klein Commit-Queue: Brian Osman --- tests/GLProgramsTest.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/GLProgramsTest.cpp') 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 fp(create_random_proc_tree(d, 2, maxTreeLevels)); paint->addColorFragmentProcessor(std::move(fp)); } else { -- cgit v1.2.3