| Index: cc/layers/layer_impl.cc
|
| diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
|
| index bd9a2d7b21e220c3ff93f4e866d2599d8b709a6f..e6e60f5f3ef7cc1e474c2b5c4a2aef192906b3b7 100644
|
| --- a/cc/layers/layer_impl.cc
|
| +++ b/cc/layers/layer_impl.cc
|
| @@ -64,6 +64,7 @@ LayerImpl::LayerImpl(LayerTreeImpl* tree_impl, int id)
|
| background_color_(0),
|
| opacity_(1.0),
|
| blend_mode_(SkXfermode::kSrcOver_Mode),
|
| + num_descendants_that_draw_content_(0),
|
| draw_depth_(0.f),
|
| needs_push_properties_(false),
|
| num_dependents_need_push_properties_(0),
|
| @@ -176,6 +177,13 @@ void LayerImpl::SetScrollChildren(std::set<LayerImpl*>* children) {
|
| SetNeedsPushProperties();
|
| }
|
|
|
| +void LayerImpl::SetNumDescendantsThatDrawContent(int num_descendants) {
|
| + if (num_descendants_that_draw_content_ == num_descendants)
|
| + return;
|
| + num_descendants_that_draw_content_ = num_descendants;
|
| + SetNeedsPushProperties();
|
| +}
|
| +
|
| void LayerImpl::SetClipParent(LayerImpl* ancestor) {
|
| if (clip_parent_ == ancestor)
|
| return;
|
| @@ -532,6 +540,7 @@ void LayerImpl::PushPropertiesTo(LayerImpl* layer) {
|
| scroll_offset_, layer->ScrollDelta() - layer->sent_scroll_delta());
|
| layer->SetSentScrollDelta(gfx::Vector2d());
|
| layer->Set3dSortingContextId(sorting_context_id_);
|
| + layer->SetNumDescendantsThatDrawContent(num_descendants_that_draw_content_);
|
|
|
| LayerImpl* scroll_parent = NULL;
|
| if (scroll_parent_) {
|
| @@ -1521,6 +1530,10 @@ void LayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) {
|
| benchmark->RunOnLayer(this);
|
| }
|
|
|
| +int LayerImpl::NumDescendantsThatDrawContent() const {
|
| + return num_descendants_that_draw_content_;
|
| +}
|
| +
|
| void LayerImpl::NotifyAnimationFinished(
|
| base::TimeTicks monotonic_time,
|
| Animation::TargetProperty target_property) {
|
|
|