Skip to content

Commit e3ad74e

Browse files
bradwerthweb-flow
authored andcommittedJun 16, 2024
Bug 1899898: Relax the opaque backdrop requirement for WebRender underlay surfaces. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D213464
1 parent 9c7e53a commit e3ad74e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎webrender/src/picture.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -2540,8 +2540,10 @@ impl TileCacheInstance {
25402540
CompositorSurfaceKind::Underlay => {
25412541
// If a mask is needed, there are some restrictions.
25422542
if prim_clip_chain.needs_mask {
2543-
// Need an opaque backdrop.
2544-
if self.backdrop.kind.is_none() {
2543+
// Need an opaque region behind this prim. The opaque region doesn't
2544+
// need to span the entire visible region of the TileCacheInstance,
2545+
// which would set self.backdrop.kind, but that also qualifies.
2546+
if !self.backdrop.opaque_rect.contains_box(&pic_coverage_rect) {
25452547
return Err(UnderlayAlphaBackdrop);
25462548
}
25472549

0 commit comments

Comments
 (0)
Please sign in to comment.