engine icon indicating copy to clipboard operation
engine copied to clipboard

[dart:ui] Adds FragmentShaderBuilder

Open zanderso opened this issue 3 years ago • 2 comments

zanderso avatar Aug 09 '22 03:08 zanderso

@jonahwilliams wdyt?

zanderso avatar Aug 09 '22 14:08 zanderso

From offline discussion: really like that we can dramatically cut down on typed data copying, and love the additional documentation. My only potential concern is that multiple shaders created from the same builder will have the same backing data, which may or may not be surprising. What if the Shader was more like a paint object and had mutable uniforms? Might be more obvious how that behaves - but this is an educated guess since the shader APIs aren't widely used.

jonahwilliams avatar Aug 09 '22 15:08 jonahwilliams

The InkSparkle in the framework will look roughly like this https://github.com/flutter/flutter/pull/110552.

zanderso avatar Aug 30 '22 01:08 zanderso

I will take an indepth pass on this tomorrow, but so far I really like this API

jonahwilliams avatar Aug 30 '22 01:08 jonahwilliams