Chromium Code Reviews| Index: cc/surfaces/frame_sink_id_allocator.h |
| diff --git a/cc/surfaces/frame_sink_id_allocator.h b/cc/surfaces/frame_sink_id_allocator.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a477829c9bbc00940a735fd38b26a97129df2a8f |
| --- /dev/null |
| +++ b/cc/surfaces/frame_sink_id_allocator.h |
| @@ -0,0 +1,22 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CC_SURFACES_FRAME_SINK_ID_ALLOCATOR_H_ |
| +#define CC_SURFACES_FRAME_SINK_ID_ALLOCATOR_H_ |
| + |
| +#include "cc/surfaces/frame_sink_id.h" |
| + |
| +namespace cc { |
| + |
| +class FrameSinkIdAllocator { |
|
Fady Samuel
2017/02/15 20:20:59
Class level comment explaining the purpose of this
xlai (Olivia)
2017/02/15 22:38:36
Done.
|
| + public: |
| + FrameSinkId NextFrameSinkId() { return FrameSinkId(0, next_sink_id_++); } |
|
boliu
2017/02/15 19:59:20
should have a comment here why the first part must
danakj
2017/02/15 20:18:10
It seems very action-at-a-distance to decide 0 her
Fady Samuel
2017/02/15 20:20:59
Actually I'd prefer that the client_id be a param
xlai (Olivia)
2017/02/15 22:38:36
Done.
|
| + |
| + private: |
| + uint32_t next_sink_id_ = 1u; |
|
boliu
2017/02/15 19:59:20
DISALLOW_COPY_AND_ASSIGN?
xlai (Olivia)
2017/02/15 22:38:36
Done.
|
| +}; |
| + |
| +} // namespace cc |
| + |
| +#endif // CC_SURFACES_FRAME_SINK_ID_ALLOCATOR_H_ |