Skip to content

Commit 6410665

Browse files
committed
Bug 1905611 - apply clipping to PictureCompositeMode::SVGFEGraph r=gfx-reviewers,gw
Differential Revision: https://phabricator.services.mozilla.com/D216637 UltraBlame original commit: ebe6cedc1f12804df683c9f2eb5b68ed12e51a83
1 parent 2c21c0e commit 6410665

File tree

12 files changed

+2306
-2405
lines changed

12 files changed

+2306
-2405
lines changed

gfx/wr/webrender/src/picture.rs

Lines changed: 1004 additions & 456 deletions
Large diffs are not rendered by default.

gfx/wr/webrender/src/render_task.rs

Lines changed: 964 additions & 1873 deletions
Large diffs are not rendered by default.

gfx/wr/webrender/src/scene_building.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,10 @@ use
540540
api
541541
:
542542
:
543+
{
543544
FilterOpGraphPictureBufferId
545+
SVGFE_GRAPH_MAX
546+
}
544547
;
545548
use
546549
api
@@ -19993,7 +19996,7 @@ BUFFER_LIMIT
1999319996
:
1999419997
usize
1999519998
=
19996-
256
19999+
SVGFE_GRAPH_MAX
1999720000
;
1999820001
/
1999920002
/

gfx/wr/webrender_api/src/display_item.rs

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8336,6 +8336,77 @@ subregion
83368336
:
83378337
LayoutRect
83388338
}
8339+
/
8340+
/
8341+
/
8342+
Maximum
8343+
number
8344+
of
8345+
SVGFE
8346+
filters
8347+
in
8348+
one
8349+
graph
8350+
this
8351+
is
8352+
constant
8353+
size
8354+
to
8355+
avoid
8356+
/
8357+
/
8358+
/
8359+
allocating
8360+
anything
8361+
and
8362+
the
8363+
SVG
8364+
spec
8365+
allows
8366+
us
8367+
to
8368+
drop
8369+
all
8370+
filters
8371+
on
8372+
an
8373+
/
8374+
/
8375+
/
8376+
item
8377+
if
8378+
the
8379+
graph
8380+
is
8381+
excessively
8382+
complex
8383+
-
8384+
a
8385+
graph
8386+
this
8387+
large
8388+
will
8389+
never
8390+
be
8391+
/
8392+
/
8393+
/
8394+
a
8395+
good
8396+
user
8397+
experience
8398+
performance
8399+
-
8400+
wise
8401+
.
8402+
pub
8403+
const
8404+
SVGFE_GRAPH_MAX
8405+
:
8406+
usize
8407+
=
8408+
256
8409+
;
83398410
#
83408411
[
83418412
repr

gfx/wr/wrench/reftests/filters/reftest.list

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,33 @@ ref
107107
yaml
108108
fuzzy
109109
(
110+
12
111+
10000
112+
)
113+
=
114+
=
115+
svgfe
116+
-
117+
dropshadow
118+
-
119+
offscreen
120+
-
121+
source
122+
.
123+
yaml
124+
svgfe
125+
-
126+
dropshadow
127+
-
128+
offscreen
129+
-
130+
source
131+
-
132+
ref
133+
.
134+
yaml
135+
fuzzy
136+
(
110137
2
111138
10000
112139
)
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
-
2+
-
3+
-
4+
root
5+
:
6+
items
7+
:
8+
-
9+
type
10+
:
11+
stacking
12+
-
13+
context
14+
bounds
15+
:
16+
[
17+
-
18+
130
19+
-
20+
94
21+
510
22+
510
23+
]
24+
filters
25+
:
26+
drop
27+
-
28+
shadow
29+
(
30+
[
31+
40
32+
40
33+
]
34+
10
35+
red
36+
)
37+
items
38+
:
39+
-
40+
type
41+
:
42+
stacking
43+
-
44+
context
45+
bounds
46+
:
47+
[
48+
10
49+
10
50+
200
51+
200
52+
]
53+
items
54+
:
55+
-
56+
type
57+
:
58+
rect
59+
bounds
60+
:
61+
[
62+
10
63+
10
64+
100
65+
100
66+
]
67+
color
68+
:
69+
[
70+
127
71+
127
72+
127
73+
1
74+
]
75+
-
76+
type
77+
:
78+
rect
79+
bounds
80+
:
81+
[
82+
50
83+
30
84+
100
85+
60
86+
]
87+
color
88+
:
89+
[
90+
192
91+
192
92+
192
93+
1
94+
]
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
-
2+
-
3+
-
4+
root
5+
:
6+
items
7+
:
8+
-
9+
type
10+
:
11+
stacking
12+
-
13+
context
14+
bounds
15+
:
16+
[
17+
-
18+
130
19+
-
20+
94
21+
510
22+
510
23+
]
24+
filters
25+
:
26+
-
27+
svgfe
28+
:
29+
SourceGraphic
30+
-
31+
svgfe
32+
:
33+
SourceAlpha
34+
-
35+
svgfe
36+
:
37+
dropshadow
38+
linear
39+
:
40+
false
41+
subregion
42+
:
43+
[
44+
-
45+
200
46+
-
47+
200
48+
510
49+
510
50+
]
51+
color
52+
:
53+
red
54+
dx
55+
:
56+
40
57+
dy
58+
:
59+
40
60+
std_deviation_x
61+
:
62+
10
63+
std_deviation_y
64+
:
65+
10
66+
in
67+
:
68+
0
69+
items
70+
:
71+
-
72+
type
73+
:
74+
stacking
75+
-
76+
context
77+
bounds
78+
:
79+
[
80+
10
81+
10
82+
200
83+
200
84+
]
85+
items
86+
:
87+
-
88+
type
89+
:
90+
rect
91+
bounds
92+
:
93+
[
94+
10
95+
10
96+
100
97+
100
98+
]
99+
color
100+
:
101+
[
102+
127
103+
127
104+
127
105+
1
106+
]
107+
-
108+
type
109+
:
110+
rect
111+
bounds
112+
:
113+
[
114+
50
115+
30
116+
100
117+
60
118+
]
119+
color
120+
:
121+
[
122+
192
123+
192
124+
192
125+
1
126+
]

layout/reftests/image-element/reftest.list

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,10 +295,10 @@ if
295295
gfxSVGFE
296296
0
297297
-
298-
201
298+
255
299299
0
300300
-
301-
1486
301+
1983
302302
)
303303
=
304304
=

0 commit comments

Comments
 (0)