| OLD | NEW | 
|---|
| (Empty) |  | 
|  | 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_H_ | 
|  | 6 #define CC_TEST_PUSH_PROPERTIES_COUNTING_LAYER_H_ | 
|  | 7 | 
|  | 8 #include <memory> | 
|  | 9 | 
|  | 10 #include "base/macros.h" | 
|  | 11 #include "base/memory/ref_counted.h" | 
|  | 12 #include "cc/layers/layer.h" | 
|  | 13 #include "cc/proto/layer.pb.h" | 
|  | 14 | 
|  | 15 namespace cc { | 
|  | 16 | 
|  | 17 class LayerImpl; | 
|  | 18 class LayerTreeImpl; | 
|  | 19 | 
|  | 20 class PushPropertiesCountingLayer : public Layer { | 
|  | 21  public: | 
|  | 22   static scoped_refptr<PushPropertiesCountingLayer> Create(); | 
|  | 23 | 
|  | 24   // Layer implementation. | 
|  | 25   void PushPropertiesTo(LayerImpl* layer) override; | 
|  | 26   std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; | 
|  | 27   void ToLayerPropertiesProto(proto::LayerUpdate* layer_update, | 
|  | 28                               bool inputs_only) override; | 
|  | 29   void SetTypeForProtoSerialization(proto::LayerNode* proto) const override; | 
|  | 30 | 
|  | 31   // Something to make this layer push properties, but no other layer. | 
|  | 32   void MakePushProperties(); | 
|  | 33 | 
|  | 34   size_t push_properties_count() const { return push_properties_count_; } | 
|  | 35   void reset_push_properties_count() { push_properties_count_ = 0; } | 
|  | 36 | 
|  | 37   void set_persist_needs_push_properties(bool persist) { | 
|  | 38     persist_needs_push_properties_ = persist; | 
|  | 39   } | 
|  | 40 | 
|  | 41  private: | 
|  | 42   PushPropertiesCountingLayer(); | 
|  | 43   ~PushPropertiesCountingLayer() override; | 
|  | 44 | 
|  | 45   void AddPushPropertiesCount(); | 
|  | 46 | 
|  | 47   size_t push_properties_count_; | 
|  | 48   bool persist_needs_push_properties_; | 
|  | 49 | 
|  | 50   DISALLOW_COPY_AND_ASSIGN(PushPropertiesCountingLayer); | 
|  | 51 }; | 
|  | 52 | 
|  | 53 }  // namespace cc | 
|  | 54 | 
|  | 55 #endif  // CC_TEST_PUSH_PROPERTIES_COUNTING_LAYER_H_ | 
| OLD | NEW | 
|---|