mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 08:45:46 +00:00
Bug 1561447 - Include picture shadow in local rect when building clip chain r=nical
Differential Revision: https://phabricator.services.mozilla.com/D42244 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
25d9b05653
commit
97f0a1af4b
@ -2037,12 +2037,13 @@ impl PrimitiveStore {
|
||||
}
|
||||
|
||||
// Inflate the local rect for this primitive by the inflation factor of
|
||||
// the picture context. This ensures that even if the primitive itself
|
||||
// is not visible, any effects from the blur radius will be correctly
|
||||
// taken into account.
|
||||
// the picture context and include the shadow offset. This ensures that
|
||||
// even if the primitive itself is not visible, any effects from the
|
||||
// blur radius or shadow will be correctly taken into account.
|
||||
let inflation_factor = surface.inflation_factor;
|
||||
let local_rect = prim_local_rect
|
||||
.inflate(inflation_factor, inflation_factor)
|
||||
.union(&prim_shadow_rect)
|
||||
.intersection(&prim_instance.local_clip_rect);
|
||||
let local_rect = match local_rect {
|
||||
Some(local_rect) => local_rect,
|
||||
|
BIN
gfx/wr/wrench/reftests/filters/filter-drop-shadow-clip-2.png
Normal file
BIN
gfx/wr/wrench/reftests/filters/filter-drop-shadow-clip-2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.0 KiB |
@ -0,0 +1,17 @@
|
||||
# Bug 1561447: If a clip task is created for a picture, it should take into account the rect of the drop shadow
|
||||
---
|
||||
root:
|
||||
items:
|
||||
- type: clip
|
||||
id: 2
|
||||
bounds: 10 0 300 300
|
||||
clip-rect: 10 0 300 300
|
||||
- type: stacking-context
|
||||
bounds: 30 30 0 0
|
||||
transform: rotate-z(45)
|
||||
filters: drop-shadow([15, 0], 0, red)
|
||||
clip-node: 2
|
||||
items:
|
||||
- type: rect
|
||||
bounds: 0 0 100 100
|
||||
color: blue
|
@ -35,6 +35,7 @@ platform(linux,mac) == filter-drop-shadow.yaml filter-drop-shadow.png
|
||||
platform(linux,mac) == filter-drop-shadow-on-viewport-edge.yaml filter-drop-shadow-on-viewport-edge.png
|
||||
platform(linux,mac) == blend-clipped.yaml blend-clipped.png
|
||||
platform(linux,mac) == filter-drop-shadow-clip.yaml filter-drop-shadow-clip.png
|
||||
platform(linux,mac) == filter-drop-shadow-clip-2.yaml filter-drop-shadow-clip-2.png
|
||||
== filter-segments.yaml filter-segments-ref.yaml
|
||||
== iframe-dropshadow.yaml iframe-dropshadow-ref.yaml
|
||||
skip_on(android) == filter-mix-blend-mode.yaml filter-mix-blend-mode-ref.yaml # Android debug: GL error 502 at blit_framebuffer (emulator) or draw_elements_instanced (Pixel2); Android opt: fails
|
||||
|
Loading…
Reference in New Issue
Block a user