skia2/site/user
Brian Osman 767f444feb SkRuntimeEffect SkSL has a new signature for main()
There is no more 'inout half4 color'. Effects return their output color.
If an effect wants the input color, it must use the (already existing)
approach of sampling a nullptr input shader.

The change is guarded for Chromium (so we can update their runtime color
filters in skia_renderer.cc).

For the GPU backend, FPs can now override usesExplicitReturn to indicate
that their emitCode will generate a return statement. If that's true,
then writeProcessorFunction doesn't inject the automatic return of the
output color, and emitFragProc will *always* wrap that FP in a helper
function, even as a top-level FP. GrSkSLFP opts in to this behavior, so
that the user-supplied return becomes the actual return in the FP's
emitCode.

Adapting the skvm code to this wasn't too bad: It looks fragile (what
happens if there are multiple returns?), but that's not really possible
today, without varying control flow.

Bug: skia:10613

Change-Id: I205b81fd87dd32bab30b6d6d5fc78853485da036
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310756
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-25 13:36:28 +00:00
..
api Remove "dummy" to comply with Android's inclusive language guidance 2020-07-31 19:11:23 +00:00
modules SkRuntimeEffect SkSL has a new signature for main() 2020-08-25 13:36:28 +00:00
release add M86 branch release notes 2020-08-20 20:38:02 +00:00
sample Remove references to Golden/Diamond Master 2020-07-27 20:06:31 +00:00
special remove superfluous skia_vulkan_sdk 2019-01-15 18:53:02 +00:00
build.md Clarify quickstart documentation. 2020-07-30 19:09:12 +00:00
color.md add a color management page to skia.org 2020-03-25 13:31:06 +00:00
download.md rewrite docs to explicitly use python2 2019-05-13 19:21:47 +00:00
index.md Add link annotation support to SkSVGDevice. 2018-02-06 23:35:16 +00:00
issue-tracker.md Expand Issue Tracking docs to include triage, Chrome instructions 2016-08-18 18:32:17 -07:00
METADATA Add release section for milestones and rel notes 2019-09-09 20:34:38 +00:00
privacy.md Add link to general Google privacy policy. 2019-01-09 16:10:31 +00:00
tips.md Docs: fix @text_shadow, use blob, font. 2018-12-28 19:42:29 +00:00