Commit aabe89e6 authored by Chris Harrelson's avatar Chris Harrelson Committed by Commit Bot

When determining slow viewport regions, use direct compositing reasons

Since fixed and sticky positioned elements are always composited,
this will be correct. This removes one dependency on compositing state.

Bug: 1100711

Change-Id: I310b25cff1dd7ead16e6fa4b95e12ed7a3de255b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2280588
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: Philip Rogers <pdr@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Auto-Submit: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
Reviewed-by: default avatarXianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#786063}
parent 9fadcefd
...@@ -1074,10 +1074,8 @@ bool LayoutBoxModelObject::IsSlowRepaintConstrainedObject() const { ...@@ -1074,10 +1074,8 @@ bool LayoutBoxModelObject::IsSlowRepaintConstrainedObject() const {
return false; return false;
// We're only smart enough to scroll viewport-constrainted objects // We're only smart enough to scroll viewport-constrainted objects
// in the compositor if they have their own backing or they paint // in the compositor if they are directly composited.
// into a grouped back (which necessarily all have the same viewport return !layer->CanBeCompositedForDirectReasons();
// constraints).
return (layer->GetCompositingState() == kNotComposited);
} }
PhysicalRect LayoutBoxModelObject::ComputeStickyConstrainingRect() const { PhysicalRect LayoutBoxModelObject::ComputeStickyConstrainingRect() const {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment