Commit 3f926dff authored by Philip Rogers's avatar Philip Rogers Committed by Commit Bot

[BlinkGenPropertyTrees] Remove more cc::Layer hierarchy changes

This patch is a followup to https://crrev.com/605470 and removes more
cc::Layer hierarchy modifications from GraphicsLayers. We rely on
cc::Layers being updated in PaintArtifactCompositor (PAC).

Bug: 898668
Change-Id: I021119d3ddd3314bba03614f2fb4ce9f07ea62eb
Reviewed-on: https://chromium-review.googlesource.com/c/1337288Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Commit-Queue: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608508}
parent 2dc40ed9
......@@ -241,7 +241,12 @@ void GraphicsLayer::RemoveFromParent() {
SetParent(nullptr);
}
CcLayer()->RemoveFromParent();
// When using layer lists, cc::Layers are created and removed in
// PaintArtifactCompositor.
if (!RuntimeEnabledFeatures::BlinkGenPropertyTreesEnabled() &&
!RuntimeEnabledFeatures::SlimmingPaintV2Enabled()) {
CcLayer()->RemoveFromParent();
}
}
void GraphicsLayer::SetOffsetFromLayoutObject(const IntSize& offset) {
......@@ -519,7 +524,10 @@ void GraphicsLayer::SetupContentsLayer(cc::Layer* contents_layer) {
// Insert the content layer first. Video elements require this, because they
// have shadow content that must display in front of the video.
CcLayer()->InsertChild(contents_layer_, 0);
if (!RuntimeEnabledFeatures::BlinkGenPropertyTreesEnabled() &&
!RuntimeEnabledFeatures::SlimmingPaintV2Enabled()) {
CcLayer()->InsertChild(contents_layer_, 0);
}
cc::PictureLayer* border_cc_layer =
contents_clipping_mask_layer_ ? contents_clipping_mask_layer_->CcLayer()
: nullptr;
......
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