feat(android): improve borderRadius, resorting and reflection code#14451
Open
m1ga wants to merge 1 commit into
Open
feat(android): improve borderRadius, resorting and reflection code#14451m1ga wants to merge 1 commit into
m1ga wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
1. Reuse Path objects in TiBorderWrapperView (TiBorderWrapperView.java:44-45, 95-96)
2. Border without wrapper via ViewOutlineProvider (TiUIView.java:37,65,476-520,913-917,1565-1574,1639-1645)
3. Only re-sort on zIndex change (TiCompositeLayout.java:369-375)
4. Eliminate reflection in TiBackgroundColorWrapper (TiBackgroundColorWrapper.java - entire file)
5. Batch invalidate-only properties (TiUIView.java:665)
Test code
Test borderRadius and toImage()
Performance benchmark
Results
13.2.0:

13.3.0:

(border parts are a little slower but produce less UI so the it should benefit scrolling)
TiBorderWrapper is gone now and a border on a image will just generate:

Sorry had to blur usernames but in a listview it currently looks like this (13.2.0):

each round image is producing a borderWrapperView + an imageview
with 13.3.0 it will just be a single image, no nested element for each of the rows:

Custom borderRadius with an array still works fine too:

Fixes #13464