Index: cc/layers/layer_impl.cc |
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc |
index e5ea46ffb0247ebe0bbcf1b0ce747138a934782f..d59bb079f73a225de62ee345b458c31739b9882e 100644 |
--- a/cc/layers/layer_impl.cc |
+++ b/cc/layers/layer_impl.cc |
@@ -83,7 +83,8 @@ LayerImpl::LayerImpl(LayerTreeImpl* tree_impl, int id) |
mutable_properties_(MutableProperty::kNone), |
debug_info_(nullptr), |
scrolls_drawn_descendant_(false), |
- layer_or_descendant_has_touch_handler_(false) { |
+ layer_or_descendant_has_touch_handler_(false), |
+ has_will_change_transform_hint_(false) { |
DCHECK_GT(layer_id_, 0); |
DCHECK(layer_tree_impl_); |
@@ -146,6 +147,13 @@ void LayerImpl::ClearLinksToOtherLayers() { |
replica_layer_ = nullptr; |
} |
+void LayerImpl::SetHasWillChangeTransformHint(bool has_will_change) { |
+ if (has_will_change_transform_hint_ == has_will_change) |
+ return; |
+ has_will_change_transform_hint_ = has_will_change; |
+ SetNeedsPushProperties(); |
+} |
+ |
void LayerImpl::SetDebugInfo( |
std::unique_ptr<base::trace_event::ConvertableToTraceFormat> debug_info) { |
owned_debug_info_ = std::move(debug_info); |
@@ -493,6 +501,8 @@ void LayerImpl::PushPropertiesTo(LayerImpl* layer) { |
if (owned_debug_info_) |
layer->SetDebugInfo(std::move(owned_debug_info_)); |
+ layer->SetHasWillChangeTransformHint(has_will_change_transform_hint()); |
danakj
2016/05/10 22:05:30
move this up with other simple setters. line 477?
vmpstr
2016/05/13 00:13:34
Done.
|
+ |
// Reset any state that should be cleared for the next update. |
layer_property_changed_ = false; |
update_rect_ = gfx::Rect(); |
@@ -1252,6 +1262,9 @@ void LayerImpl::AsValueInto(base::trace_event::TracedValue* state) const { |
state->SetBoolean("has_animation_bounds", |
layer_tree_impl_->HasAnimationThatInflatesBounds(this)); |
+ state->SetBoolean("has_will_change_transform_hint", |
+ has_will_change_transform_hint()); |
+ |
gfx::BoxF box; |
if (LayerUtils::GetAnimationBounds(*this, &box)) |
MathUtil::AddToTracedValue("animation_bounds", box, state); |