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

Side by Side Diff: gpu/command_buffer/client/gpu_memory_buffer_tracker.h

Issue 58913003: command_buffer: Remove hash_tables.h, simplify atomicops.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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/client/buffer_tracker.h ('k') | gpu/command_buffer/client/hash_tables.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_CLIENT_GPU_MEMORY_BUFFER_TRACKER_H_ 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_TRACKER_H_
6 #define GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_TRACKER_H_ 6 #define GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_TRACKER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/containers/hash_tables.h"
9 #include "gles2_impl_export.h" 10 #include "gles2_impl_export.h"
10 #include "gpu/command_buffer/client/hash_tables.h"
11 11
12 namespace gfx { 12 namespace gfx {
13 class GpuMemoryBuffer; 13 class GpuMemoryBuffer;
14 } 14 }
15 15
16 namespace gpu { 16 namespace gpu {
17 class GpuControl; 17 class GpuControl;
18 18
19 namespace gles2 { 19 namespace gles2 {
20 20
21 // Tracks GPU memory buffer objects on the client side. 21 // Tracks GPU memory buffer objects on the client side.
22 class GLES2_IMPL_EXPORT GpuMemoryBufferTracker { 22 class GLES2_IMPL_EXPORT GpuMemoryBufferTracker {
23 public: 23 public:
24 explicit GpuMemoryBufferTracker(GpuControl* gpu_control); 24 explicit GpuMemoryBufferTracker(GpuControl* gpu_control);
25 virtual ~GpuMemoryBufferTracker(); 25 virtual ~GpuMemoryBufferTracker();
26 26
27 int32 CreateBuffer(size_t width, size_t height, int32 internalformat); 27 int32 CreateBuffer(size_t width, size_t height, int32 internalformat);
28 gfx::GpuMemoryBuffer* GetBuffer(int32 image_id); 28 gfx::GpuMemoryBuffer* GetBuffer(int32 image_id);
29 void RemoveBuffer(int32 image_id); 29 void RemoveBuffer(int32 image_id);
30 30
31 private: 31 private:
32 typedef gpu::hash_map<int32, gfx::GpuMemoryBuffer*> BufferMap; 32 typedef base::hash_map<int32, gfx::GpuMemoryBuffer*> BufferMap;
33 BufferMap buffers_; 33 BufferMap buffers_;
34 GpuControl* gpu_control_; 34 GpuControl* gpu_control_;
35 35
36 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferTracker); 36 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferTracker);
37 }; 37 };
38 38
39 } // namespace gles2 39 } // namespace gles2
40 } // namespace gpu 40 } // namespace gpu
41 41
42 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_TRACKER_H_ 42 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_TRACKER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/buffer_tracker.h ('k') | gpu/command_buffer/client/hash_tables.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698