OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This file contains the definition of the IdAllocator class. | 5 // This file contains the definition of the IdAllocator class. |
6 | 6 |
7 #ifndef GPU_COMMAND_BUFFER_CLIENT_ID_ALLOCATOR_H_ | 7 #ifndef GPU_COMMAND_BUFFER_CLIENT_ID_ALLOCATOR_H_ |
8 #define GPU_COMMAND_BUFFER_CLIENT_ID_ALLOCATOR_H_ | 8 #define GPU_COMMAND_BUFFER_CLIENT_ID_ALLOCATOR_H_ |
9 | 9 |
10 #include <set> | 10 #include <set> |
11 #include <utility> | 11 #include <utility> |
12 | 12 |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 | 14 #include "gpu/command_buffer/common/types.h" |
15 #include "../../gpu_export.h" | 15 #include "gpu/gpu_export.h" |
16 #include "../common/types.h" | |
17 | 16 |
18 namespace gpu { | 17 namespace gpu { |
19 | 18 |
20 // A resource ID, key to the resource maps. | 19 // A resource ID, key to the resource maps. |
21 typedef uint32 ResourceId; | 20 typedef uint32 ResourceId; |
22 // Invalid resource ID. | 21 // Invalid resource ID. |
23 static const ResourceId kInvalidResource = 0u; | 22 static const ResourceId kInvalidResource = 0u; |
24 | 23 |
25 class GPU_EXPORT IdAllocatorInterface { | 24 class GPU_EXPORT IdAllocatorInterface { |
26 public: | 25 public: |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 89 |
91 private: | 90 private: |
92 ResourceId last_id_; | 91 ResourceId last_id_; |
93 | 92 |
94 DISALLOW_COPY_AND_ASSIGN(NonReusedIdAllocator); | 93 DISALLOW_COPY_AND_ASSIGN(NonReusedIdAllocator); |
95 }; | 94 }; |
96 | 95 |
97 } // namespace gpu | 96 } // namespace gpu |
98 | 97 |
99 #endif // GPU_COMMAND_BUFFER_CLIENT_ID_ALLOCATOR_H_ | 98 #endif // GPU_COMMAND_BUFFER_CLIENT_ID_ALLOCATOR_H_ |
OLD | NEW |