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

[CI] Remove useless SPv2 check in CompositingInputsUpdater

The code is not reachable in SPv2 mode. This check is a leftover
from an earlier iteration of the SPv2 implementation.

Change-Id: I3cbeb1f7e085bfab493130c1f2fe3aa1486a33e6
Reviewed-on: https://chromium-review.googlesource.com/c/1351807Reviewed-by: default avatarvmpstr <vmpstr@chromium.org>
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611864}
parent f81b6329
......@@ -292,46 +292,44 @@ void CompositingInputsUpdater::UpdateAncestorDependentCompositingInputs(
PaintLayer::AncestorDependentCompositingInputs properties;
LayoutBoxModelObject& layout_object = layer->GetLayoutObject();
if (!RuntimeEnabledFeatures::SlimmingPaintV2Enabled()) {
// The final value for |unclipped_absolute_bounding_box| needs to be
// in absolute, unscrolled space, without any scroll applied.
properties.unclipped_absolute_bounding_box =
EnclosingIntRect(geometry_map_.AbsoluteRect(
FloatRect(layer->BoundingBoxForCompositingOverlapTest())));
bool affected_by_scroll = root_layer_->GetScrollableArea() &&
layer->IsAffectedByScrollOf(root_layer_);
// At ths point, |unclipped_absolute_bounding_box| is in viewport space.
// To convert to absolute space, add scroll offset for non-fixed layers.
if (affected_by_scroll) {
properties.unclipped_absolute_bounding_box.Move(
RoundedIntSize(root_layer_->GetScrollableArea()->GetScrollOffset()));
}
ClipRect clip_rect;
layer->Clipper(PaintLayer::kDoNotUseGeometryMapper)
.CalculateBackgroundClipRect(
ClipRectsContext(root_layer_,
&root_layer_->GetLayoutObject().FirstFragment(),
kAbsoluteClipRectsIgnoringViewportClip,
kIgnorePlatformOverlayScrollbarSize,
kIgnoreOverflowClipAndScroll),
clip_rect);
IntRect snapped_clip_rect = PixelSnappedIntRect(clip_rect.Rect());
// |snapped_clip_rect| is in absolute space space, but with scroll applied.
// To convert to absolute, unscrolled space, subtract scroll offsets for
// fixed layers.
if (root_layer_->GetScrollableArea() && !affected_by_scroll) {
snapped_clip_rect.Move(
RoundedIntSize(-root_layer_->GetScrollableArea()->GetScrollOffset()));
}
// The final value for |unclipped_absolute_bounding_box| needs to be
// in absolute, unscrolled space, without any scroll applied.
properties.unclipped_absolute_bounding_box =
EnclosingIntRect(geometry_map_.AbsoluteRect(
FloatRect(layer->BoundingBoxForCompositingOverlapTest())));
bool affected_by_scroll = root_layer_->GetScrollableArea() &&
layer->IsAffectedByScrollOf(root_layer_);
// At ths point, |unclipped_absolute_bounding_box| is in viewport space.
// To convert to absolute space, add scroll offset for non-fixed layers.
if (affected_by_scroll) {
properties.unclipped_absolute_bounding_box.Move(
RoundedIntSize(root_layer_->GetScrollableArea()->GetScrollOffset()));
}
properties.clipped_absolute_bounding_box =
properties.unclipped_absolute_bounding_box;
properties.clipped_absolute_bounding_box.Intersect(snapped_clip_rect);
ClipRect clip_rect;
layer->Clipper(PaintLayer::kDoNotUseGeometryMapper)
.CalculateBackgroundClipRect(
ClipRectsContext(root_layer_,
&root_layer_->GetLayoutObject().FirstFragment(),
kAbsoluteClipRectsIgnoringViewportClip,
kIgnorePlatformOverlayScrollbarSize,
kIgnoreOverflowClipAndScroll),
clip_rect);
IntRect snapped_clip_rect = PixelSnappedIntRect(clip_rect.Rect());
// |snapped_clip_rect| is in absolute space space, but with scroll applied.
// To convert to absolute, unscrolled space, subtract scroll offsets for
// fixed layers.
if (root_layer_->GetScrollableArea() && !affected_by_scroll) {
snapped_clip_rect.Move(
RoundedIntSize(-root_layer_->GetScrollableArea()->GetScrollOffset()));
}
properties.clipped_absolute_bounding_box =
properties.unclipped_absolute_bounding_box;
properties.clipped_absolute_bounding_box.Intersect(snapped_clip_rect);
const PaintLayer* parent = layer->Parent();
properties.opacity_ancestor =
parent->IsTransparent() ? parent : parent->OpacityAncestor();
......
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