Commit e206d86
authored
Add oval drawing support to the SDF uber shader (flutter#184903)
Adds Oval rendering to the UberSDF shader, uses UberSDF oval rendering
in the canvas behind the feature flag.
The SDF doesn't actually find the minimum distance to the oval, it find
the distance from the test point to the center of the oval along a
straight line - visually looks good though.
Fixes flutter#183037.
Before this change:
<img width="803" height="628" alt="before"
src="https://github.com/user-attachments/assets/2a662e3b-3cb2-4ff5-81b1-14dd16457304"
/>
After this change:
<img width="803" height="628" alt="after"
src="https://github.com/user-attachments/assets/52985b3d-f2a1-41ff-a05a-c35d9f0198c6"
/>
Diffs highlighted:
<img width="803" height="628" alt="diff"
src="https://github.com/user-attachments/assets/fdfdda2a-d9f9-4f18-8cd5-50f96c09718c"
/>
## Pre-launch Checklist
- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.1 parent 0911a6e commit e206d86
8 files changed
Lines changed: 199 additions & 32 deletions
File tree
- engine/src/flutter
- impeller
- display_list
- entity
- contents
- shaders
- tools
- sky/packages/sky_engine
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
884 | 884 | | |
885 | 885 | | |
886 | 886 | | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
887 | 905 | | |
888 | 906 | | |
889 | 907 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
50 | 64 | | |
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
40 | 46 | | |
41 | 47 | | |
42 | 48 | | |
| |||
46 | 52 | | |
47 | 53 | | |
48 | 54 | | |
49 | | - | |
50 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
51 | 58 | | |
52 | 59 | | |
53 | 60 | | |
| |||
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
74 | 103 | | |
75 | 104 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
26 | 38 | | |
27 | 39 | | |
28 | 40 | | |
| |||
32 | 44 | | |
33 | 45 | | |
34 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
35 | 108 | | |
36 | 109 | | |
37 | 110 | | |
| |||
51 | 124 | | |
52 | 125 | | |
53 | 126 | | |
54 | | - | |
| 127 | + | |
55 | 128 | | |
56 | | - | |
| 129 | + | |
57 | 130 | | |
| 131 | + | |
| 132 | + | |
58 | 133 | | |
59 | 134 | | |
60 | 135 | | |
| |||
63 | 138 | | |
64 | 139 | | |
65 | 140 | | |
66 | | - | |
| 141 | + | |
67 | 142 | | |
68 | 143 | | |
69 | | - | |
| 144 | + | |
70 | 145 | | |
71 | 146 | | |
72 | 147 | | |
| |||
80 | 155 | | |
81 | 156 | | |
82 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
83 | 161 | | |
84 | 162 | | |
85 | 163 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8680 | 8680 | | |
8681 | 8681 | | |
8682 | 8682 | | |
8683 | | - | |
| 8683 | + | |
8684 | 8684 | | |
8685 | 8685 | | |
8686 | 8686 | | |
8687 | 8687 | | |
8688 | 8688 | | |
8689 | 8689 | | |
8690 | 8690 | | |
8691 | | - | |
8692 | | - | |
8693 | | - | |
8694 | | - | |
| 8691 | + | |
| 8692 | + | |
| 8693 | + | |
| 8694 | + | |
8695 | 8695 | | |
8696 | 8696 | | |
8697 | 8697 | | |
| |||
8723 | 8723 | | |
8724 | 8724 | | |
8725 | 8725 | | |
8726 | | - | |
8727 | | - | |
8728 | | - | |
8729 | | - | |
| 8726 | + | |
| 8727 | + | |
| 8728 | + | |
| 8729 | + | |
8730 | 8730 | | |
8731 | 8731 | | |
8732 | 8732 | | |
8733 | 8733 | | |
8734 | 8734 | | |
8735 | 8735 | | |
8736 | 8736 | | |
8737 | | - | |
8738 | | - | |
| 8737 | + | |
| 8738 | + | |
8739 | 8739 | | |
8740 | 8740 | | |
8741 | 8741 | | |
| |||
8752 | 8752 | | |
8753 | 8753 | | |
8754 | 8754 | | |
8755 | | - | |
| 8755 | + | |
8756 | 8756 | | |
8757 | 8757 | | |
8758 | 8758 | | |
| |||
8765 | 8765 | | |
8766 | 8766 | | |
8767 | 8767 | | |
8768 | | - | |
| 8768 | + | |
8769 | 8769 | | |
8770 | 8770 | | |
8771 | 8771 | | |
8772 | 8772 | | |
8773 | 8773 | | |
8774 | 8774 | | |
8775 | 8775 | | |
8776 | | - | |
| 8776 | + | |
8777 | 8777 | | |
8778 | 8778 | | |
8779 | 8779 | | |
8780 | 8780 | | |
8781 | 8781 | | |
8782 | 8782 | | |
8783 | | - | |
| 8783 | + | |
8784 | 8784 | | |
8785 | 8785 | | |
8786 | 8786 | | |
| |||
12088 | 12088 | | |
12089 | 12089 | | |
12090 | 12090 | | |
12091 | | - | |
| 12091 | + | |
12092 | 12092 | | |
12093 | 12093 | | |
12094 | 12094 | | |
12095 | 12095 | | |
12096 | 12096 | | |
12097 | 12097 | | |
12098 | 12098 | | |
12099 | | - | |
12100 | | - | |
12101 | | - | |
12102 | | - | |
| 12099 | + | |
| 12100 | + | |
| 12101 | + | |
| 12102 | + | |
12103 | 12103 | | |
12104 | 12104 | | |
12105 | 12105 | | |
| |||
12132 | 12132 | | |
12133 | 12133 | | |
12134 | 12134 | | |
12135 | | - | |
12136 | | - | |
12137 | | - | |
12138 | | - | |
| 12135 | + | |
| 12136 | + | |
| 12137 | + | |
| 12138 | + | |
12139 | 12139 | | |
12140 | 12140 | | |
12141 | 12141 | | |
12142 | 12142 | | |
12143 | 12143 | | |
12144 | 12144 | | |
12145 | 12145 | | |
12146 | | - | |
12147 | | - | |
| 12146 | + | |
| 12147 | + | |
12148 | 12148 | | |
12149 | 12149 | | |
12150 | 12150 | | |
| |||
0 commit comments