Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: gpu/command_buffer/common/id_allocator.h

Issue 268063002: Remove command_buffer/common/types.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 <stdint.h>
11
10 #include <set> 12 #include <set>
11 #include <utility> 13 #include <utility>
12 14
13 #include "base/compiler_specific.h" 15 #include "base/compiler_specific.h"
14 #include "gpu/command_buffer/common/types.h" 16 #include "base/macros.h"
15 #include "gpu/gpu_export.h" 17 #include "gpu/gpu_export.h"
16 18
17 namespace gpu { 19 namespace gpu {
18 20
19 // A resource ID, key to the resource maps. 21 // A resource ID, key to the resource maps.
20 typedef uint32 ResourceId; 22 typedef uint32_t ResourceId;
21 // Invalid resource ID. 23 // Invalid resource ID.
22 static const ResourceId kInvalidResource = 0u; 24 static const ResourceId kInvalidResource = 0u;
23 25
24 class GPU_EXPORT IdAllocatorInterface { 26 class GPU_EXPORT IdAllocatorInterface {
25 public: 27 public:
26 virtual ~IdAllocatorInterface(); 28 virtual ~IdAllocatorInterface();
27 29
28 // Allocates a new resource ID. 30 // Allocates a new resource ID.
29 virtual ResourceId AllocateID() = 0; 31 virtual ResourceId AllocateID() = 0;
30 32
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 91
90 private: 92 private:
91 ResourceId last_id_; 93 ResourceId last_id_;
92 94
93 DISALLOW_COPY_AND_ASSIGN(NonReusedIdAllocator); 95 DISALLOW_COPY_AND_ASSIGN(NonReusedIdAllocator);
94 }; 96 };
95 97
96 } // namespace gpu 98 } // namespace gpu
97 99
98 #endif // GPU_COMMAND_BUFFER_CLIENT_ID_ALLOCATOR_H_ 100 #endif // GPU_COMMAND_BUFFER_CLIENT_ID_ALLOCATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698