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