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 3 // found in the LICENSE file. 4 5 #ifndef CC_TEST_PUSH_PROPERTIES_COUNTING_LAYER_IMPL_H_ 6 #define CC_TEST_PUSH_PROPERTIES_COUNTING_LAYER_IMPL_H_ 7 8 #include <memory> 9 10 #include "cc/layers/layer_impl.h" 11 12 namespace cc { 13 14 class LayerTreeImpl; 15 16 class PushPropertiesCountingLayerImpl : public LayerImpl { 17 public: 18 static std::unique_ptr<PushPropertiesCountingLayerImpl> Create( 19 LayerTreeImpl* tree_impl, 20 int id); 21 PushPropertiesCountingLayerImpl(const PushPropertiesCountingLayerImpl&) = 22 delete; 23 ~PushPropertiesCountingLayerImpl() override; 24 25 PushPropertiesCountingLayerImpl& operator=( 26 const PushPropertiesCountingLayerImpl&) = delete; 27 28 // LayerImpl implementation. 29 void PushPropertiesTo(LayerImpl* layer) override; 30 std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; 31 push_properties_count()32 size_t push_properties_count() const { return push_properties_count_; } reset_push_properties_count()33 void reset_push_properties_count() { push_properties_count_ = 0; } 34 35 private: 36 PushPropertiesCountingLayerImpl(LayerTreeImpl* tree_impl, int id); 37 38 size_t push_properties_count_; 39 }; 40 41 } // namespace cc 42 43 #endif // CC_TEST_PUSH_PROPERTIES_COUNTING_LAYER_IMPL_H_ 44