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 CC_TREES_SURFACE_SEQUENCE_GENERATOR_H_ | 5 #ifndef CC_SURFACES_SURFACE_SEQUENCE_GENERATOR_H_ |
6 #define CC_TREES_SURFACE_SEQUENCE_GENERATOR_H_ | 6 #define CC_SURFACES_SURFACE_SEQUENCE_GENERATOR_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <tuple> | 10 #include <tuple> |
11 | 11 |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "cc/base/cc_export.h" | |
14 | 13 |
15 #include "cc/surfaces/frame_sink_id.h" | 14 #include "cc/surfaces/frame_sink_id.h" |
16 | 15 |
17 namespace cc { | 16 namespace cc { |
| 17 |
18 struct SurfaceSequence; | 18 struct SurfaceSequence; |
19 | 19 |
20 // Generates unique surface sequences for a surface client id. | 20 // Generates unique surface sequences for a surface client id. |
21 class CC_EXPORT SurfaceSequenceGenerator { | 21 class SurfaceSequenceGenerator { |
22 public: | 22 public: |
23 SurfaceSequenceGenerator(); | 23 SurfaceSequenceGenerator(); |
24 ~SurfaceSequenceGenerator(); | 24 ~SurfaceSequenceGenerator(); |
25 | 25 |
26 void set_frame_sink_id(const FrameSinkId& frame_sink_id) { | 26 void set_frame_sink_id(const FrameSinkId& frame_sink_id) { |
27 frame_sink_id_ = frame_sink_id; | 27 frame_sink_id_ = frame_sink_id; |
28 } | 28 } |
29 | 29 |
30 SurfaceSequence CreateSurfaceSequence(); | 30 SurfaceSequence CreateSurfaceSequence(); |
31 | 31 |
32 private: | 32 private: |
33 FrameSinkId frame_sink_id_; | 33 FrameSinkId frame_sink_id_; |
34 uint32_t next_surface_sequence_; | 34 uint32_t next_surface_sequence_; |
35 | 35 |
36 DISALLOW_COPY_AND_ASSIGN(SurfaceSequenceGenerator); | 36 DISALLOW_COPY_AND_ASSIGN(SurfaceSequenceGenerator); |
37 }; | 37 }; |
38 | 38 |
39 } // namespace cc | 39 } // namespace cc |
40 | 40 |
41 #endif // CC_TREES_SURFACE_SEQUENCE_GENERATOR_H_ | 41 #endif // CC_SURFACES_SURFACE_SEQUENCE_GENERATOR_H_ |
OLD | NEW |