skia2/modules/canvaskit/tests
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
..
assets [canvaskit] Quick fix for older skp format 2020-07-15 12:30:50 +00:00
canvas2d.spec.js [canvaskit] Add gm helper functions to tests. 2020-04-03 19:12:02 +00:00
canvas.spec.js Accept Flat Uint32Array, Float32Array, or 2d Float32Array as the color argument to MakeLinearGradient 2020-06-11 13:51:53 +00:00
canvaskitinit.js Added CanvasKit.MakeImageFromCanvasImageSource which is useful as an alternative to 2020-06-15 19:35:09 +00:00
core.spec.js fix heap-buffer-overflow by not returning string from reportBackendType 2020-07-17 16:42:30 +00:00
font.spec.js [CanvasKit] Expose TypefaceFontProvider. 2020-08-04 20:55:21 +00:00
matrix.spec.js Helper function for camera setup 2020-07-07 00:30:03 +00:00
paragraph.spec.js [CanvasKit] Expose TypefaceFontProvider. 2020-08-04 20:55:21 +00:00
path.spec.js Replace arcTo with three functions for it's overloads. 2020-07-17 19:08:03 +00:00
rtshader.spec.js SkRuntimeEffect SkSL has a new signature for main() 2020-08-25 13:36:28 +00:00
skottie.spec.js Add a gm for ManagedAnimation.setColor 2020-06-08 13:12:49 +00:00
util.js Added CanvasKit.MakeImageFromCanvasImageSource which is useful as an alternative to 2020-06-15 19:35:09 +00:00