uniforms are no longer set as single block of bytes where the caller
has to know the offset, but instead by the string identfier in the
shader. This CL only supports floats, but future expansions of this
will provide helpers for ints, colors, and byte[].
Also by storing the shaders and uniforms in the RuntimeShaderBuilder
we can more easily copy them. This enables Canvas.drawRipple to not
just copy the compiled SkSL effect, but also all the uniforms and
other input shaders set on the RuntimeShader.
Bug: 177051137
Test: HwAccelerationTest
Change-Id: I4733f42ba662546be6bebc37f0b89832778e66ce
This also adds the ability for RenderThread to animate a few
predefined shader uniforms.
Bug: 177051137
Test: demo in ag/13296877
Change-Id: I6e58e671ad1242a07ecb1cf4cdb48031f85c2088
This adds the ability for Java RuntimeShaders to provide other
shaders as inputs. This is a first pass API and should be updated
to mirror the SkRuntimeShaderBuilder API that enable callers to set
the uniforms and inputs shaders by name instead of passing arrays.
Test: HwAccelerationTests
Bug: n/a
Change-Id: I53a15ad864bede2fecc1e2459dca983d224114a0
Bug: 156636925
Test: make
Remove UnsupportedAppUsage false-positives from Shader and BitmapShader.
Change public/package-protected methods that should only be called by
subclasses to protected and mark them @hide.
Document why other @hide methods must be @hide.
Remove unnecessary if statement in BitmapShader constructor.
Change-Id: If3e87c45cbbab1df180387dd6ccfda1ec2ecb153
The old API was a shim over the new API, and will be deleted soon.
The new API is actually public, simpler, and more powerful.
Test: Everything still builds.
Change-Id: I11af8da9132e23a070e87dd5a7401c4854dd102a
Add RuntimeShader hidden API, which calculates pixel output with
a fragment shader running on GPU.
Extend ColorFiltersMutateActivity HWUI test to use new API and
show how to animate uniforms on UI thread.
Test: Updated HwAccelerationTest
Change-Id: Ia26e44259b12099924facba250880cbbd9be21c7