Commit 4b0f5dca authored by Daniel Libby's avatar Daniel Libby Committed by Commit Bot

Remove DisableCompositingQueryAsserts in PaintLayer

In CAP, compositing state/group mapping is not known until after
painting, so this information can't be used to isolate NeedsRepaint
operations in  MarkCompositingContainerChainForNeedsRepaint.
Scope the querying to a non-CAP codepath.

This was the last assert disabler in CAP codepaths, so add a DCHECK
to the DisableCompositingQueryAsserts constructor so no further ones
are added.

Bug: 1007989

Change-Id: I72e4a82ccf856c9ace3f3714d5e3bd0c6ccc7b86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2247322Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
Commit-Queue: Daniel Libby <dlibby@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#779879}
parent 9b955d94
......@@ -3398,20 +3398,22 @@ void PaintLayer::SetSelfNeedsRepaint() {
}
void PaintLayer::MarkCompositingContainerChainForNeedsRepaint() {
// Need to access compositingState(). We've ensured correct flag setting when
// compositingState() changes.
DisableCompositingQueryAsserts disabler;
PaintLayer* layer = this;
while (true) {
if (layer->GetCompositingState() == kPaintsIntoOwnBacking)
return;
if (CompositedLayerMapping* grouped_mapping = layer->GroupedMapping()) {
// TODO(wkorman): As we clean up the CompositedLayerMapping needsRepaint
// logic to delegate to scrollbars, we may be able to remove the line
// below as well.
grouped_mapping->OwningLayer().SetNeedsRepaint();
return;
if (!RuntimeEnabledFeatures::CompositeAfterPaintEnabled()) {
// Need to access compositingState(). We've ensured correct flag setting
// when compositingState() changes.
DisableCompositingQueryAsserts disabler;
if (layer->GetCompositingState() == kPaintsIntoOwnBacking)
return;
if (CompositedLayerMapping* grouped_mapping = layer->GroupedMapping()) {
// TODO(wkorman): As we clean up the CompositedLayerMapping needsRepaint
// logic to delegate to scrollbars, we may be able to remove the line
// below as well.
grouped_mapping->OwningLayer().SetNeedsRepaint();
return;
}
}
// For a non-self-painting layer having self-painting descendant, the
......@@ -3504,7 +3506,9 @@ void PaintLayer::DirtyStackingContextZOrderLists() {
}
DisableCompositingQueryAsserts::DisableCompositingQueryAsserts()
: disabler_(&g_compositing_query_mode, kCompositingQueriesAreAllowed) {}
: disabler_(&g_compositing_query_mode, kCompositingQueriesAreAllowed) {
DCHECK(!RuntimeEnabledFeatures::CompositeAfterPaintEnabled());
}
} // namespace blink
......
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