| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cc/test/push_properties_counting_layer.h" | 5 #include "cc/test/push_properties_counting_layer.h" |
| 6 | 6 |
| 7 #include "cc/test/push_properties_counting_layer_impl.h" | 7 #include "cc/test/push_properties_counting_layer_impl.h" |
| 8 #include "cc/trees/layer_tree_host.h" |
| 8 | 9 |
| 9 namespace cc { | 10 namespace cc { |
| 10 | 11 |
| 11 // static | 12 // static |
| 12 scoped_refptr<PushPropertiesCountingLayer> | 13 scoped_refptr<PushPropertiesCountingLayer> |
| 13 PushPropertiesCountingLayer::Create() { | 14 PushPropertiesCountingLayer::Create() { |
| 14 return new PushPropertiesCountingLayer(); | 15 return new PushPropertiesCountingLayer(); |
| 15 } | 16 } |
| 16 | 17 |
| 17 PushPropertiesCountingLayer::PushPropertiesCountingLayer() | 18 PushPropertiesCountingLayer::PushPropertiesCountingLayer() |
| (...skipping 13 matching lines...) Expand all Loading... |
| 31 return PushPropertiesCountingLayerImpl::Create(tree_impl, Layer::id()); | 32 return PushPropertiesCountingLayerImpl::Create(tree_impl, Layer::id()); |
| 32 } | 33 } |
| 33 | 34 |
| 34 void PushPropertiesCountingLayer::MakePushProperties() { | 35 void PushPropertiesCountingLayer::MakePushProperties() { |
| 35 SetContentsOpaque(!contents_opaque()); | 36 SetContentsOpaque(!contents_opaque()); |
| 36 } | 37 } |
| 37 | 38 |
| 38 void PushPropertiesCountingLayer::AddPushPropertiesCount() { | 39 void PushPropertiesCountingLayer::AddPushPropertiesCount() { |
| 39 push_properties_count_++; | 40 push_properties_count_++; |
| 40 if (persist_needs_push_properties_) { | 41 if (persist_needs_push_properties_) { |
| 41 GetLayerTree()->AddLayerShouldPushProperties(this); | 42 layer_tree_host()->AddLayerShouldPushProperties(this); |
| 42 } | 43 } |
| 43 } | 44 } |
| 44 | 45 |
| 45 } // namespace cc | 46 } // namespace cc |
| OLD | NEW |