| Index: cc/surfaces/surface_sequence_generator.h
|
| diff --git a/cc/surfaces/surface_sequence_generator.h b/cc/surfaces/surface_sequence_generator.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..4969b25a6919fb87ab63c159ba1ad6ea151dec17
|
| --- /dev/null
|
| +++ b/cc/surfaces/surface_sequence_generator.h
|
| @@ -0,0 +1,37 @@
|
| +// Copyright 2016 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_SURFACE_SEQUENCE_GENERATOR_H_
|
| +#define CC_SURFACES_SURFACE_SEQUENCE_GENERATOR_H_
|
| +
|
| +#include <stdint.h>
|
| +
|
| +#include "base/macros.h"
|
| +#include "cc/surfaces/surfaces_export.h"
|
| +
|
| +namespace cc {
|
| +struct SurfaceSequence;
|
| +
|
| +// Generates unique surface sequences for a surface client id.
|
| +class CC_SURFACES_EXPORT SurfaceSequenceGenerator {
|
| + public:
|
| + SurfaceSequenceGenerator();
|
| + ~SurfaceSequenceGenerator();
|
| +
|
| + void set_surface_client_id(uint32_t client_id) {
|
| + surface_client_id_ = client_id;
|
| + }
|
| +
|
| + SurfaceSequence CreateSurfaceSequence();
|
| +
|
| + private:
|
| + uint32_t surface_client_id_;
|
| + uint32_t next_surface_sequence_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(SurfaceSequenceGenerator);
|
| +};
|
| +
|
| +} // namespace cc
|
| +
|
| +#endif // CC_SURFACES_SURFACE_SEQUENCE_GENERATOR_H_
|
|
|