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

Side by Side Diff: gpu/command_buffer/service/buffer_manager.h

Issue 9581018: GPU: Build most of the gpu as a single DLL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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
« no previous file with comments | « gpu/command_buffer/common/id_allocator.h ('k') | gpu/command_buffer/service/cmd_parser.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef GPU_COMMAND_BUFFER_SERVICE_BUFFER_MANAGER_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_BUFFER_MANAGER_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_BUFFER_MANAGER_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_BUFFER_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/hash_tables.h" 10 #include "base/hash_tables.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "gpu/command_buffer/service/gl_utils.h" 14 #include "gpu/command_buffer/service/gl_utils.h"
15 #include "gpu/gpu_export.h"
15 16
16 namespace gpu { 17 namespace gpu {
17 namespace gles2 { 18 namespace gles2 {
18 19
19 // This class keeps track of the buffers and their sizes so we can do 20 // This class keeps track of the buffers and their sizes so we can do
20 // bounds checking. 21 // bounds checking.
21 // 22 //
22 // NOTE: To support shared resources an instance of this class will need to be 23 // NOTE: To support shared resources an instance of this class will need to be
23 // shared by multiple GLES2Decoders. 24 // shared by multiple GLES2Decoders.
24 class BufferManager { 25 class GPU_EXPORT BufferManager {
25 public: 26 public:
26 // Info about Buffers currently in the system. 27 // Info about Buffers currently in the system.
27 class BufferInfo : public base::RefCounted<BufferInfo> { 28 class GPU_EXPORT BufferInfo : public base::RefCounted<BufferInfo> {
28 public: 29 public:
29 typedef scoped_refptr<BufferInfo> Ref; 30 typedef scoped_refptr<BufferInfo> Ref;
30 31
31 BufferInfo(BufferManager* manager, GLuint service_id); 32 BufferInfo(BufferManager* manager, GLuint service_id);
32 33
33 GLuint service_id() const { 34 GLuint service_id() const {
34 return service_id_; 35 return service_id_;
35 } 36 }
36 37
37 GLsizeiptr size() const { 38 GLsizeiptr size() const {
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 size_t mem_represented_; 195 size_t mem_represented_;
195 size_t last_reported_mem_represented_; 196 size_t last_reported_mem_represented_;
196 197
197 DISALLOW_COPY_AND_ASSIGN(BufferManager); 198 DISALLOW_COPY_AND_ASSIGN(BufferManager);
198 }; 199 };
199 200
200 } // namespace gles2 201 } // namespace gles2
201 } // namespace gpu 202 } // namespace gpu
202 203
203 #endif // GPU_COMMAND_BUFFER_SERVICE_BUFFER_MANAGER_H_ 204 #endif // GPU_COMMAND_BUFFER_SERVICE_BUFFER_MANAGER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/id_allocator.h ('k') | gpu/command_buffer/service/cmd_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698