skia2/tools/flags
Brian Osman 4af42fcca1 Fix precompiling shaders on GLES / Android
We need to specify attribute locations and (sometimes) frag shader
output locations. Desktop GL worked fine without this, but Flutter
ran into this problem, and a Pixel 2 reproduced the issue.

Note that both APIs (BindFragDataLocation and BindAttribLocation)
don't take effect until the next time the program is linked, so
we have to relink the program after applying those changes.

I was afraid that re-linking would eliminate the perf benefits of
pre-compiling the shaders, but (at least on Pixel 2) that's not
the case. I traced the life of a single program, and the initial
link (during precompile) was 4.4 ms. The re-link took 0.23 ms.

Change-Id: Iadb3b425a8cf9f6a52e015c2e37f875c0fd73d6d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241758
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-09-16 17:13:23 +00:00
..
CommandLineFlags.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
CommandLineFlags.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
CommonFlags.h Reland "Merge GrOpList and GrRTOpList and rename to GrOpsTask." 2019-08-22 20:52:09 +00:00
CommonFlagsAA.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
CommonFlagsConfig.cpp Fix precompiling shaders on GLES / Android 2019-09-16 17:13:23 +00:00
CommonFlagsConfig.h Add support for pre-compiling cached SkSL shaders 2019-09-06 19:45:09 +00:00
CommonFlagsGpu.cpp Rename GrContextOption fReduceOpListSplitting to fReduceOpsTaskSplitting. 2019-08-23 18:43:27 +00:00
CommonFlagsImages.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00