-Updated StretchEffect to null out the child texture
of the SkRuntimeEffectBuilder after the shader is created
-Release optional mask surface used for
stretching the hole punch
-Release SkRuntimeEffectBuilder instance on RenderNode's
StretchEffect
Fixes: 183592264
Test: manual + re-ran cts tests
Change-Id: I90952666d7489985de9ce798ab792cf3fd7f6087
If an SkImageFilter is used, create an image
snapshot with the filter applied to avoid
re-computing it on each draw invocation
Bug: 188450217
Test: Re-ran CTS tests
Change-Id: Ib790669e14ada9d4ebbfac958d699e2b5242f2d7
Refactor stretch shader to always work in
skia's coordinate system instead of normalizing
the input coordinates.
Improves performance on coral by approximately 10-20% across
various use cases on top of the branching refactoring
perf improvements
~1k fps to ~1.1k fps on non-surfaceview cases
~500 fps to ~600 fps o surfaceview cases
Bug: 187718492
Test: manual
Change-Id: I0b36f48699739979948bfec160a8aa64fc80b7a7
Refactor stretch shader to return within
conditional blocks instead of falling
through to main function body.
Improves performance on coral by approximately 60%
~600 fps to ~1k fps on non-surfaceview case
~300 fps to 500 fps on surfaceview case
Bug: 187718492
Test: manual
Change-Id: Ida0d0dee9c94b0ac210a024708100283fecc2a5c
Added logic to StretchEffect to be able to calculate the
stretched position of a pixel on an input texture based
on the current stretch parameters.
Updated shader to leverage linear easing instead of
cubic in order to have a reversible method that
can be used to map input textures to the corresponding
stretch position.
Bug: 179047472
Test: manual
Change-Id: Id32afcf0df1cca03e68ac0c594d307a1090264f2
--Updated HWUI holepunch logic for SurfaceView to
also apply the stretch to the hole punch
--Updated RenderNode callbacks to also include
an offset from the ancestor RenderNode that also
has a stretch configured on it
--Added new test activity to verify hole punch
logic
Bug: 179047472
Test: manual
Change-Id: Ibbaf8248a31839ba9dc352ecb9fef54e1276918e
This enforces stricter rules on the SkSL at effect creation time, and
ensures it's valid as an SkShader (vs. an SkColorFilter). Also updated
some SkSL that was already (or would become) illegal:
- Child shaders must be declared 'uniform', not 'in'
- sampling a child requires coordinates
Bug: skia:11813
Change-Id: I743b985b5012723186a43e58e9e3ccf29d809d2b
(cherry picked from commit 7556777511)
Updated stretch intensity to 0.016 and added a new uniform to control
the intensity of the interpoloation
Bug: 183768138
Test: ran EdgeEffectTest and visual
Change-Id: Iac10bee5980802fffe838ed83e02b7c41dee6f71
Refactor stretch implementation to manually
draw the shader as a rect instead of using
SkImageFilter
Bug: 184184033
Test: Re-ran stretch tests
Change-Id: I6263f5474b185b3f81ef9fd1bec3e43e86da49f2
Updated inverse stretch affected distance to
be inverse the affected distance not the actual
stretch in the x/y direction
Bug: 183768138
Test: Re-ran CTS tests
Change-Id: Id3784e8902aa7dc199e10f228eeee5c24f968831
Updated SKSL shader to use cubic easing
instead of smoothstep. Fixed issue where
max stretch distances were not being normalized
Fixes: 184198532
Bug: 183768138
Test: re-ran EdgeEffect tests + manual
Change-Id: I1c4811e71c09b5e807235e3fb30755d8d6430a54
Work around GPU driver issues on Wembley.
Refactor the overscroll stretch shader to
explicitly return values in the helper methodsd
instead of using out parameters to store the
result.
Fixes: 182566543
Test: manual
Change-Id: Ib9c57d7cb3de06bc7155fa2af364d70cbf2ea812
Added dampening logic to caluclate the distance to
overscroll.
Updated StretchEffect to support independent
maximum stretch amounts for the x/y axis
Removed debugging parameters to configure
stretch distance since they are no longer
used. Removed hidden API calls to configure
stretch distance in ScrollView/HorizontalScrollView
Bug: 179047472
Test: re-ran EdgeEffectTests
Change-Id: I4698669273d364695a21c2cce00ec2cfec41b2cc
--Ported SKSL based stretch shader from OpenGL prototype
--Hooked up the stretch APIs in RenderNode to the stretch
shader.
--Updated RenderNode layer logic to promote the RenderNode to
a layer if there is a stretch to be applied to it in order
to feed the layer as input to the stretch shader
Bug: 179047472
Test: builds + sample overscroll stretches + updated CTS test
Change-Id: I744ff70099fe251ce07f23d067bf13444a468c08