Commit 2902364f authored by Xianzhu Wang's avatar Xianzhu Wang Committed by Commit Bot

Output more meaningful information on compositing layer paint offset mismatch

Bug: 890598
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I2aee8bf37891a163ce8182ef1c4e620eab5dcf2a
Reviewed-on: https://chromium-review.googlesource.com/c/1276890Reviewed-by: default avatarvmpstr <vmpstr@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#598891}
parent f8b7bd73
...@@ -42,14 +42,18 @@ void CompositingLayerPropertyUpdater::Update(const LayoutObject& object) { ...@@ -42,14 +42,18 @@ void CompositingLayerPropertyUpdater::Update(const LayoutObject& object) {
fragment_data.PaintOffset() - mapping->SubpixelAccumulation(); fragment_data.PaintOffset() - mapping->SubpixelAccumulation();
IntPoint snapped_paint_offset = RoundedIntPoint(layout_snapped_paint_offset); IntPoint snapped_paint_offset = RoundedIntPoint(layout_snapped_paint_offset);
#if DCHECK_IS_ON()
// A layer without visible contents can be composited due to animation. // A layer without visible contents can be composited due to animation.
// Since the layer itself has no visible subtree, there is no guarantee // 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 // 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 // visible subtree can be non-composited despite we expected it to, this
// resulted in the paint offset used by CompositedLayerMapping to mismatch. // resulted in the paint offset used by CompositedLayerMapping to mismatch.
bool subpixel_accumulation_may_be_bogus = paint_layer->SubtreeIsInvisible(); bool subpixel_accumulation_may_be_bogus = paint_layer->SubtreeIsInvisible();
DCHECK(layout_snapped_paint_offset == snapped_paint_offset || if (!subpixel_accumulation_may_be_bogus) {
subpixel_accumulation_may_be_bogus); DCHECK_EQ(layout_snapped_paint_offset, snapped_paint_offset)
<< object.DebugName();
}
#endif
base::Optional<PropertyTreeState> container_layer_state; base::Optional<PropertyTreeState> container_layer_state;
auto SetContainerLayerState = 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