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

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

Issue 7633060: Add option to not generate resources on bind in OpenGL ES (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nacl fix Created 9 years, 4 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "../common/types.h" 12 #include "../common/types.h"
13 13
14 // TODO(apatrick): Having regular GL flush semantics on the client side, it
15 // probably isn't necessary to round trip to the service to allocate IDs.
16 // Retire this code.
17
18 namespace gpu { 14 namespace gpu {
19 15
20 // A resource ID, key to the resource maps. 16 // A resource ID, key to the resource maps.
21 typedef uint32 ResourceId; 17 typedef uint32 ResourceId;
22 // Invalid resource ID. 18 // Invalid resource ID.
23 static const ResourceId kInvalidResource = 0u; 19 static const ResourceId kInvalidResource = 0u;
24 20
25 class IdAllocatorInterface { 21 class IdAllocatorInterface {
26 public: 22 public:
27 virtual ~IdAllocatorInterface(); 23 virtual ~IdAllocatorInterface();
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 86
91 private: 87 private:
92 ResourceId last_id_; 88 ResourceId last_id_;
93 89
94 DISALLOW_COPY_AND_ASSIGN(NonReusedIdAllocator); 90 DISALLOW_COPY_AND_ASSIGN(NonReusedIdAllocator);
95 }; 91 };
96 92
97 } // namespace gpu 93 } // namespace gpu
98 94
99 #endif // GPU_COMMAND_BUFFER_CLIENT_ID_ALLOCATOR_H_ 95 #endif // GPU_COMMAND_BUFFER_CLIENT_ID_ALLOCATOR_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation_unittest.cc ('k') | gpu/command_buffer/service/context_group.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698