forked from flutter/flutter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support arbitrary shaped Material. (flutter#14367)
For backward compatibility we keep supporting specifying the shape as a combination of MaterialType and borderRadius, and we just use that as a default when shapeBorder is null. To cleanup the implementation if shapeBorder was not specified we just translate the specified shape to a shapeBorder internally. I benchmarked paint, layout and hit testing, with the specialized shape clippers vs. the equivalent path clippers and did not see any significant performance difference. For testing, I extended the clippers/physicalShape matchers to match either the specialized shape or the equivalent shape.
- Loading branch information
Showing
10 changed files
with
475 additions
and
98 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.