Repository navigation
Commit 67d7e55
authored
Fixes for texture-backed gradients (flutter#191925)
Two fixes for texture-backed gradients:
1. Fix incorrect ending coord check in IPSampleLinearWithTileMode for
decal mode. This fixes an issue where decal gradients end a pixel early.
2. Make CreateGradientBuffer compatible with overlapping color stops
Related: flutter#190401
This re-implements part of
flutter#190874. That PR was reverted
because it didn't handle wide gamut colors properly. I will re-implement
a fixed version of it in multiple parts. In the original reviews for
that PR, it was suggested that these self-contained gradient fixes could
be put in their own separate PR. Now that the PR is reverted, we get our
chance to put these fixes in their own PR.
## Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel
on [Discord].
If this change needs to override an active code freeze, provide a
comment explaining why. The code freeze workflow can be overridden by
code reviewers. See pinned issues for any active code freezes with
guidance.
**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.
<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md1 parent cbb8915 commit 67d7e55
4 files changed
Lines changed: 85 additions & 63 deletions
File tree
- engine/src/flutter/impeller
- compiler/shader_lib/impeller
- geometry
- tools
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
102 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
103 | 107 | | |
104 | 108 | | |
105 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1834 | 1834 | | |
1835 | 1835 | | |
1836 | 1836 | | |
1837 | | - | |
| 1837 | + | |
1838 | 1838 | | |
1839 | 1839 | | |
1840 | 1840 | | |
1841 | 1841 | | |
1842 | 1842 | | |
1843 | | - | |
| 1843 | + | |
| 1844 | + | |
| 1845 | + | |
| 1846 | + | |
| 1847 | + | |
| 1848 | + | |
| 1849 | + | |
| 1850 | + | |
| 1851 | + | |
| 1852 | + | |
| 1853 | + | |
| 1854 | + | |
| 1855 | + | |
| 1856 | + | |
| 1857 | + | |
| 1858 | + | |
1844 | 1859 | | |
1845 | 1860 | | |
1846 | 1861 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
| |||
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
29 | 36 | | |
30 | 37 | | |
31 | | - | |
32 | | - | |
33 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
34 | 41 | | |
35 | 42 | | |
36 | 43 | | |
37 | 44 | | |
38 | 45 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
52 | | - | |
| 54 | + | |
| 55 | + | |
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
| |||
79 | 82 | | |
80 | 83 | | |
81 | 84 | | |
82 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
83 | 89 | | |
84 | 90 | | |
85 | 91 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
744 | 744 | | |
745 | 745 | | |
746 | 746 | | |
747 | | - | |
| 747 | + | |
748 | 748 | | |
749 | 749 | | |
750 | 750 | | |
| |||
778 | 778 | | |
779 | 779 | | |
780 | 780 | | |
781 | | - | |
| 781 | + | |
782 | 782 | | |
783 | | - | |
| 783 | + | |
784 | 784 | | |
785 | 785 | | |
786 | 786 | | |
| |||
816 | 816 | | |
817 | 817 | | |
818 | 818 | | |
819 | | - | |
820 | | - | |
| 819 | + | |
| 820 | + | |
821 | 821 | | |
822 | 822 | | |
823 | 823 | | |
| |||
834 | 834 | | |
835 | 835 | | |
836 | 836 | | |
| 837 | + | |
| 838 | + | |
837 | 839 | | |
838 | 840 | | |
839 | 841 | | |
840 | | - | |
841 | | - | |
842 | | - | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
843 | 845 | | |
844 | 846 | | |
845 | 847 | | |
| |||
850 | 852 | | |
851 | 853 | | |
852 | 854 | | |
853 | | - | |
| 855 | + | |
854 | 856 | | |
855 | | - | |
| 857 | + | |
856 | 858 | | |
857 | 859 | | |
858 | 860 | | |
| |||
889 | 891 | | |
890 | 892 | | |
891 | 893 | | |
892 | | - | |
| 894 | + | |
893 | 895 | | |
894 | 896 | | |
895 | 897 | | |
| |||
922 | 924 | | |
923 | 925 | | |
924 | 926 | | |
925 | | - | |
| 927 | + | |
926 | 928 | | |
927 | | - | |
| 929 | + | |
928 | 930 | | |
929 | 931 | | |
930 | 932 | | |
| |||
9365 | 9367 | | |
9366 | 9368 | | |
9367 | 9369 | | |
| 9370 | + | |
| 9371 | + | |
9368 | 9372 | | |
9369 | 9373 | | |
9370 | 9374 | | |
9371 | 9375 | | |
9372 | | - | |
9373 | | - | |
9374 | | - | |
| 9376 | + | |
| 9377 | + | |
| 9378 | + | |
9375 | 9379 | | |
9376 | 9380 | | |
9377 | 9381 | | |
| |||
9390 | 9394 | | |
9391 | 9395 | | |
9392 | 9396 | | |
9393 | | - | |
9394 | | - | |
9395 | | - | |
| 9397 | + | |
| 9398 | + | |
| 9399 | + | |
9396 | 9400 | | |
9397 | 9401 | | |
9398 | 9402 | | |
| |||
9403 | 9407 | | |
9404 | 9408 | | |
9405 | 9409 | | |
9406 | | - | |
9407 | | - | |
9408 | | - | |
| 9410 | + | |
| 9411 | + | |
| 9412 | + | |
9409 | 9413 | | |
9410 | 9414 | | |
9411 | 9415 | | |
| |||
9906 | 9910 | | |
9907 | 9911 | | |
9908 | 9912 | | |
9909 | | - | |
| 9913 | + | |
9910 | 9914 | | |
9911 | 9915 | | |
9912 | 9916 | | |
9913 | | - | |
9914 | 9917 | | |
| 9918 | + | |
9915 | 9919 | | |
9916 | 9920 | | |
9917 | 9921 | | |
| |||
9930 | 9934 | | |
9931 | 9935 | | |
9932 | 9936 | | |
9933 | | - | |
9934 | | - | |
9935 | | - | |
| 9937 | + | |
| 9938 | + | |
| 9939 | + | |
9936 | 9940 | | |
9937 | 9941 | | |
9938 | 9942 | | |
| |||
9943 | 9947 | | |
9944 | 9948 | | |
9945 | 9949 | | |
9946 | | - | |
9947 | | - | |
9948 | | - | |
| 9950 | + | |
| 9951 | + | |
| 9952 | + | |
9949 | 9953 | | |
9950 | 9954 | | |
9951 | 9955 | | |
| |||
10884 | 10888 | | |
10885 | 10889 | | |
10886 | 10890 | | |
10887 | | - | |
10888 | | - | |
10889 | | - | |
| 10891 | + | |
| 10892 | + | |
| 10893 | + | |
10890 | 10894 | | |
10891 | 10895 | | |
10892 | 10896 | | |
| |||
10903 | 10907 | | |
10904 | 10908 | | |
10905 | 10909 | | |
10906 | | - | |
10907 | | - | |
| 10910 | + | |
10908 | 10911 | | |
10909 | 10912 | | |
10910 | | - | |
10911 | | - | |
10912 | | - | |
| 10913 | + | |
| 10914 | + | |
| 10915 | + | |
10913 | 10916 | | |
10914 | 10917 | | |
10915 | 10918 | | |
| |||
10920 | 10923 | | |
10921 | 10924 | | |
10922 | 10925 | | |
10923 | | - | |
10924 | | - | |
10925 | | - | |
| 10926 | + | |
| 10927 | + | |
| 10928 | + | |
10926 | 10929 | | |
10927 | 10930 | | |
10928 | 10931 | | |
| |||
0 commit comments