Commit c8cb2000 authored by Philip Rogers's avatar Philip Rogers Committed by Commit Bot

Do not mark active LayerImpls as needing to push layer properties.

Active LayerImpl properties are never pushed. This patch enforces this
by making LayerImpl::SetNeedsPushProperties only work on the pending tree.

The existing VerifyLayerChangesAreTrackedProperly test has been modified
to work on the pending tree instead of the active tree. The existing
mask_to_bounds tests have been updated as they were intended for
another era when SetBounds did depend on mask_to_bounds.

An additional test has been added for active layer change tracking.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I711109df86e6c644333a8e14a5540a4b22675894
Reviewed-on: https://chromium-review.googlesource.com/516826
Commit-Queue: Philip Rogers <pdr@chromium.org>
Reviewed-by: default avatarenne <enne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#475779}
parent dcc8b89e
...@@ -771,7 +771,8 @@ gfx::Vector2dF LayerImpl::ClampScrollToMaxScrollOffset() { ...@@ -771,7 +771,8 @@ gfx::Vector2dF LayerImpl::ClampScrollToMaxScrollOffset() {
} }
void LayerImpl::SetNeedsPushProperties() { void LayerImpl::SetNeedsPushProperties() {
if (layer_tree_impl_ && !needs_push_properties_) { // There's no need to push layer properties on the active tree.
if (!needs_push_properties_ && !layer_tree_impl()->IsActiveTree()) {
needs_push_properties_ = true; needs_push_properties_ = true;
layer_tree_impl()->AddLayerShouldPushProperties(this); layer_tree_impl()->AddLayerShouldPushProperties(this);
} }
......
This diff is collapsed.
...@@ -1247,6 +1247,7 @@ void LayerTreeImpl::ClearSurfaceLayerIds() { ...@@ -1247,6 +1247,7 @@ void LayerTreeImpl::ClearSurfaceLayerIds() {
} }
void LayerTreeImpl::AddLayerShouldPushProperties(LayerImpl* layer) { void LayerTreeImpl::AddLayerShouldPushProperties(LayerImpl* layer) {
DCHECK(!IsActiveTree()) << "The active tree does not push layer properties";
layers_that_should_push_properties_.insert(layer); layers_that_should_push_properties_.insert(layer);
} }
......
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