Commit 9b39d74b authored by Tien-Ren Chen's avatar Tien-Ren Chen Committed by Commit Bot

[Blink/SPv175] Re-enable snapping DCHECK in CompositingLayerPropertyUpdater

This CL detects the case that a invisible composited layer may have bogus
subpixel accumulation on it, and ignore the DCHECK in such case.

BUG=816490

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Iba98cb3a57dfe24f8a69f1f7469bf78482530d7e
Reviewed-on: https://chromium-review.googlesource.com/1012441Reviewed-by: default avatarXianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Tien-Ren Chen <trchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551521}
parent 0b3099a6
......@@ -31,8 +31,15 @@ void CompositingLayerPropertyUpdater::Update(const LayoutObject& object) {
LayoutPoint layout_snapped_paint_offset =
fragment_data.PaintOffset() - mapping->SubpixelAccumulation();
IntPoint snapped_paint_offset = RoundedIntPoint(layout_snapped_paint_offset);
// TODO(crbug.com/816490): Re-enable this check once it is fixed.
// DCHECK(layout_snapped_paint_offset == snapped_paint_offset);
// A layer without visible contents can be composited due to animation.
// Since the layer itself has no visible subtree, there is no guarantee
// that all of its ancestors have a visible subtree. An ancestor with no
// visible subtree can be non-composited despite we expected it to, this
// resulted in the paint offset used by CompositedLayerMapping to mismatch.
bool subpixel_accumulation_may_be_bogus = paint_layer->SubtreeIsInvisible();
DCHECK(layout_snapped_paint_offset == snapped_paint_offset ||
subpixel_accumulation_may_be_bogus);
Optional<PropertyTreeState> container_layer_state;
auto SetContainerLayerState =
......
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