Skip to content

Commit

Permalink
Backed out changeset ce5bb779d929 (bug 1769953) for causing webrender…
Browse files Browse the repository at this point in the history
… failures in overflow-top-left.html CLOSED TREE
  • Loading branch information
nerli1 committed May 26, 2022
1 parent 81467fe commit 71bfa62
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
10 changes: 6 additions & 4 deletions gfx/wr/webrender_api/src/display_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,20 @@ bitflags! {
const IS_BACKFACE_VISIBLE = 1 << 0;
/// If set, this primitive represents a scroll bar container
const IS_SCROLLBAR_CONTAINER = 1 << 1;
/// If set, this primitive represents a scroll bar thumb
const IS_SCROLLBAR_THUMB = 1 << 2;
/// This is used as a performance hint - this primitive may be promoted to a native
/// compositor surface under certain (implementation specific) conditions. This
/// is typically used for large videos, and canvas elements.
const PREFER_COMPOSITOR_SURFACE = 1 << 2;
const PREFER_COMPOSITOR_SURFACE = 1 << 3;
/// If set, this primitive can be passed directly to the compositor via its
/// ExternalImageId, and the compositor will use the native image directly.
/// Used as a further extension on top of PREFER_COMPOSITOR_SURFACE.
const SUPPORTS_EXTERNAL_COMPOSITOR_SURFACE = 1 << 3;
const SUPPORTS_EXTERNAL_COMPOSITOR_SURFACE = 1 << 4;
/// This flags disables snapping and forces anti-aliasing even if the primitive is axis-aligned.
const ANTIALISED = 1 << 4;
const ANTIALISED = 1 << 5;
/// If true, this primitive is used as a background for checkerboarding
const CHECKERBOARD_BACKGROUND = 1 << 5;
const CHECKERBOARD_BACKGROUND = 1 << 6;
}
}

Expand Down
5 changes: 4 additions & 1 deletion layout/painting/nsDisplayList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5254,9 +5254,12 @@ bool nsDisplayOwnLayer::CreateWebRenderCommands(
params.animation = prop.ptrOr(nullptr);
params.clip =
wr::WrStackingContextClip::ClipChain(aBuilder.CurrentClipChainId());
if (IsScrollbarContainer() && IsRootScrollbarContainer()) {
if (IsScrollbarContainer()) {
params.prim_flags |= wr::PrimitiveFlags::IS_SCROLLBAR_CONTAINER;
}
if (IsScrollThumbLayer()) {
params.prim_flags |= wr::PrimitiveFlags::IS_SCROLLBAR_THUMB;
}
if (IsZoomingLayer() ||
((IsFixedPositionLayer() && HasDynamicToolbar()) ||
(IsStickyPositionLayer() && HasDynamicToolbar()) ||
Expand Down

0 comments on commit 71bfa62

Please sign in to comment.