Commit b5a76458 authored by Klaus Weidner's avatar Klaus Weidner Committed by Commit Bot

Ensure that detached GraphicsLayers trigger invalidation

GraphicsLayers in this state will not have GraphicsLayer::Paint called on them,
and Paint updates the GraphicsLayer's display item's references back to the
layout tree.

Bug: 991747
Change-Id: I468c0b691fdc8c85414e56dcc6c8a733e666ccc3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1802823
Commit-Queue: Klaus Weidner <klausw@chromium.org>
Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#696449}
parent be9157bd
......@@ -209,6 +209,13 @@ void GraphicsLayer::RemoveFromParent() {
SetParent(nullptr);
}
// Avoid inconsistencies for detached content since GraphicsLayers in that
// state will not have GraphicsLayer::Paint called on them, and Paint updates
// the GraphicsLayer's display item's references back to the layout tree.
// Only do this if there's a paint controller.
if (PaintsContentOrHitTest())
GetPaintController().InvalidateAll();
// cc::Layers are created and removed in PaintArtifactCompositor so ensure it
// is notified that something has changed.
client_.GraphicsLayersDidChange();
......
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