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 #ifndef CompositorMutableStateProvider_h | 5 #ifndef CompositorMutableStateProvider_h |
6 #define CompositorMutableStateProvider_h | 6 #define CompositorMutableStateProvider_h |
7 | 7 |
8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
9 #include "wtf/PassOwnPtr.h" | |
10 | 9 |
11 #include <cstdint> | 10 #include <cstdint> |
| 11 #include <memory> |
12 | 12 |
13 namespace cc { | 13 namespace cc { |
14 class LayerTreeImpl; | 14 class LayerTreeImpl; |
15 } // namespace cc | 15 } // namespace cc |
16 | 16 |
17 namespace blink { | 17 namespace blink { |
18 | 18 |
19 class CompositorMutableState; | 19 class CompositorMutableState; |
20 struct CompositorMutations; | 20 struct CompositorMutations; |
21 | 21 |
22 // This class is a window onto compositor-owned state. It vends out wrappers | 22 // This class is a window onto compositor-owned state. It vends out wrappers |
23 // around per-element bits of this state. | 23 // around per-element bits of this state. |
24 class PLATFORM_EXPORT CompositorMutableStateProvider { | 24 class PLATFORM_EXPORT CompositorMutableStateProvider { |
25 public: | 25 public: |
26 CompositorMutableStateProvider(cc::LayerTreeImpl*, CompositorMutations*); | 26 CompositorMutableStateProvider(cc::LayerTreeImpl*, CompositorMutations*); |
27 ~CompositorMutableStateProvider(); | 27 ~CompositorMutableStateProvider(); |
28 | 28 |
29 PassOwnPtr<CompositorMutableState> getMutableStateFor(uint64_t elementId); | 29 std::unique_ptr<CompositorMutableState> getMutableStateFor(uint64_t elementI
d); |
| 30 |
30 private: | 31 private: |
31 cc::LayerTreeImpl* m_state; | 32 cc::LayerTreeImpl* m_tree; |
32 CompositorMutations* m_mutations; | 33 CompositorMutations* m_mutations; |
33 }; | 34 }; |
34 | 35 |
35 } // namespace blink | 36 } // namespace blink |
36 | 37 |
37 #endif // CompositorMutableStateProvider_h | 38 #endif // CompositorMutableStateProvider_h |
OLD | NEW |