Skip to content

Commit 21eeb17

Browse files
author
bors-servo
authored
Auto merge of #1792 - glennw:gradients, r=mstange
Add more premultiplied gradient reftests. The existing gradient tests don't have any coverage for whether the input color is correctly pre-multiplied. Additionally, the angle test wasn't actually triggering the angle gradient shader, and was running the aligned shader. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/1792) <!-- Reviewable:end -->
2 parents ca80ecb + e46a4e4 commit 21eeb17

9 files changed

+30
-4
lines changed
Loading
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
root:
3+
items:
4+
- type: gradient
5+
bounds: 50 50 200 200
6+
start: 0 100
7+
end: 200 100
8+
stops: [0.0, [255.0, 0.0, 0.0, 0.5], 0.5, [0.0, 255.0, 0.0, 0.5], 1.0, [0.0, 0.0, 255.0, 0.5]]
Loading
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
root:
3+
items:
4+
- type: gradient
5+
bounds: 50 50 200 200
6+
start: 0 0
7+
end: 200 200
8+
stops: [0.0, [255.0, 0.0, 0.0, 0.5], 0.5, [0.0, 255.0, 0.0, 0.5], 1.0, [0.0, 0.0, 255.0, 0.5]]
-8.76 KB
Loading

wrench/reftests/gradient/premultiplied-angle.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ root:
33
items:
44
- type: gradient
55
bounds: 50 50 200 200
6-
# offset the start and end points slightly so
7-
# we force the angle gradient shader
8-
start: 0 100
9-
end: 200 100.000001
6+
start: 0 0
7+
end: 200 200
108
stops: [0.0, red, 0.5, [0.0, 0.0, 0.0, 0.0], 1.0, green]
Loading
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
root:
3+
items:
4+
- type: radial-gradient
5+
bounds: 50 50 200 200
6+
center: 100 100
7+
radius: 100 100
8+
stops: [0.0, [255.0, 0.0, 0.0, 0.5], 0.5, [0.0, 255.0, 0.0, 0.5], 1.0, [0.0, 0.0, 255.0, 0.5]]

wrench/reftests/gradient/reftest.list

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
== premultiplied-angle.yaml premultiplied-angle.png
33
== premultiplied-radial.yaml premultiplied-radial.png
44

5+
== premultiplied-aligned-2.yaml premultiplied-aligned-2.png
6+
== premultiplied-angle-2.yaml premultiplied-angle-2.png
7+
== premultiplied-radial-2.yaml premultiplied-radial-2.png
8+
59
== linear.yaml linear-ref.png
610
== linear-reverse.yaml linear-ref.png
711
fuzzy(1,35000) == linear-stops.yaml linear-stops-ref.png

0 commit comments

Comments
 (0)