| 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 "platform/graphics/CompositorMutableProperties.h" | 8 #include "platform/graphics/CompositorMutableProperties.h" |
| 9 #include "wtf/Allocator.h" | 9 #include "wtf/Allocator.h" |
| 10 #include "wtf/Forward.h" | 10 #include "wtf/Forward.h" |
| 11 #include "wtf/Noncopyable.h" | 11 #include "wtf/Noncopyable.h" |
| 12 #include <memory> |
| 12 | 13 |
| 13 namespace blink { | 14 namespace blink { |
| 14 | 15 |
| 15 // Keeps track of the number of proxies bound to each property. | 16 // Keeps track of the number of proxies bound to each property. |
| 16 class CompositorProxiedPropertySet final { | 17 class CompositorProxiedPropertySet final { |
| 17 WTF_MAKE_NONCOPYABLE(CompositorProxiedPropertySet); | 18 WTF_MAKE_NONCOPYABLE(CompositorProxiedPropertySet); |
| 18 USING_FAST_MALLOC(CompositorProxiedPropertySet); | 19 USING_FAST_MALLOC(CompositorProxiedPropertySet); |
| 19 public: | 20 public: |
| 20 static PassOwnPtr<CompositorProxiedPropertySet> create(); | 21 static std::unique_ptr<CompositorProxiedPropertySet> create(); |
| 21 virtual ~CompositorProxiedPropertySet(); | 22 virtual ~CompositorProxiedPropertySet(); |
| 22 | 23 |
| 23 bool isEmpty() const; | 24 bool isEmpty() const; |
| 24 void increment(uint32_t mutableProperties); | 25 void increment(uint32_t mutableProperties); |
| 25 void decrement(uint32_t mutableProperties); | 26 void decrement(uint32_t mutableProperties); |
| 26 uint32_t proxiedProperties() const; | 27 uint32_t proxiedProperties() const; |
| 27 | 28 |
| 28 private: | 29 private: |
| 29 CompositorProxiedPropertySet(); | 30 CompositorProxiedPropertySet(); |
| 30 | 31 |
| 31 unsigned short m_counts[CompositorMutableProperty::kNumProperties]; | 32 unsigned short m_counts[CompositorMutableProperty::kNumProperties]; |
| 32 }; | 33 }; |
| 33 | 34 |
| 34 } // namespace blink | 35 } // namespace blink |
| 35 | 36 |
| 36 #endif // CompositorProxiedPropertySet_h | 37 #endif // CompositorProxiedPropertySet_h |
| OLD | NEW |