Skip to content

Commit

Permalink
Don't update paint invalidation container in CAP
Browse files Browse the repository at this point in the history
Paint invalidation container information is no available in CAP, as it
requires querying the compositing state to see whether a GraphicsLayer
is created in a PaintLayer's ancestor chain.

UpdatePaintInvalidationContainer should therefore be a no-op in CAP.
This is an incremental change in pursuit of adding a DCHECK(!CAP) in
LayoutObject::EnclosingCompositedContainer and removing that
DisableCompositingQueryAssert from CAP codepaths.

Bug: 1007989
Change-Id: I0ecd12fdf907f1746d54a67437143cb5ce7eb5fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2118212
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#753061}
  • Loading branch information
dlibby- authored and Commit Bot committed Mar 25, 2020
1 parent f6f1fb5 commit 689603b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions third_party/blink/renderer/core/paint/paint_invalidator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ void PaintInvalidator::UpdatePaintingLayer(const LayoutObject& object,
void PaintInvalidator::UpdatePaintInvalidationContainer(
const LayoutObject& object,
PaintInvalidatorContext& context) {
if (RuntimeEnabledFeatures::CompositeAfterPaintEnabled())
return;

if (object.IsPaintInvalidationContainer()) {
context.paint_invalidation_container = ToLayoutBoxModelObject(&object);
if (object.StyleRef().IsStackingContext() || object.IsSVGRoot())
Expand Down

0 comments on commit 689603b

Please sign in to comment.