| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef CompositorProxiedPropertySet_h | 5 #ifndef CompositorProxiedPropertySet_h |
| 6 #define CompositorProxiedPropertySet_h | 6 #define CompositorProxiedPropertySet_h |
| 7 | 7 |
| 8 #include <memory> |
| 8 #include "platform/graphics/CompositorMutableProperties.h" | 9 #include "platform/graphics/CompositorMutableProperties.h" |
| 9 #include "wtf/Allocator.h" | 10 #include "platform/wtf/Allocator.h" |
| 10 #include "wtf/Forward.h" | 11 #include "platform/wtf/Forward.h" |
| 11 #include "wtf/Noncopyable.h" | 12 #include "platform/wtf/Noncopyable.h" |
| 12 #include <memory> | |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 | 15 |
| 16 // Keeps track of the number of proxies bound to each property. | 16 // Keeps track of the number of proxies bound to each property. |
| 17 class CompositorProxiedPropertySet final { | 17 class CompositorProxiedPropertySet final { |
| 18 WTF_MAKE_NONCOPYABLE(CompositorProxiedPropertySet); | 18 WTF_MAKE_NONCOPYABLE(CompositorProxiedPropertySet); |
| 19 USING_FAST_MALLOC(CompositorProxiedPropertySet); | 19 USING_FAST_MALLOC(CompositorProxiedPropertySet); |
| 20 | 20 |
| 21 public: | 21 public: |
| 22 static std::unique_ptr<CompositorProxiedPropertySet> Create(); | 22 static std::unique_ptr<CompositorProxiedPropertySet> Create(); |
| 23 virtual ~CompositorProxiedPropertySet(); | 23 virtual ~CompositorProxiedPropertySet(); |
| 24 | 24 |
| 25 bool IsEmpty() const; | 25 bool IsEmpty() const; |
| 26 void Increment(uint32_t mutable_properties); | 26 void Increment(uint32_t mutable_properties); |
| 27 void Decrement(uint32_t mutable_properties); | 27 void Decrement(uint32_t mutable_properties); |
| 28 uint32_t ProxiedProperties() const; | 28 uint32_t ProxiedProperties() const; |
| 29 | 29 |
| 30 private: | 30 private: |
| 31 CompositorProxiedPropertySet(); | 31 CompositorProxiedPropertySet(); |
| 32 | 32 |
| 33 unsigned short counts_[CompositorMutableProperty::kNumProperties]; | 33 unsigned short counts_[CompositorMutableProperty::kNumProperties]; |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 } // namespace blink | 36 } // namespace blink |
| 37 | 37 |
| 38 #endif // CompositorProxiedPropertySet_h | 38 #endif // CompositorProxiedPropertySet_h |
| OLD | NEW |