| 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 #ifndef GPU_COMMAND_BUFFER_CLIENT_BUFFER_TRACKER_H_ | 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_BUFFER_TRACKER_H_ |
| 6 #define GPU_COMMAND_BUFFER_CLIENT_BUFFER_TRACKER_H_ | 6 #define GPU_COMMAND_BUFFER_CLIENT_BUFFER_TRACKER_H_ |
| 7 | 7 |
| 8 #include <GLES2/gl2.h> | 8 #include <GLES2/gl2.h> |
| 9 | 9 |
| 10 #include <queue> | 10 #include <queue> |
| 11 #include "base/containers/hash_tables.h" |
| 11 #include "gles2_impl_export.h" | 12 #include "gles2_impl_export.h" |
| 12 #include "gpu/command_buffer/client/hash_tables.h" | |
| 13 #include "gpu/command_buffer/common/gles2_cmd_format.h" | 13 #include "gpu/command_buffer/common/gles2_cmd_format.h" |
| 14 | 14 |
| 15 namespace gpu { | 15 namespace gpu { |
| 16 | 16 |
| 17 class CommandBufferHelper; | 17 class CommandBufferHelper; |
| 18 class MappedMemoryManager; | 18 class MappedMemoryManager; |
| 19 | 19 |
| 20 namespace gles2 { | 20 namespace gles2 { |
| 21 | 21 |
| 22 // Tracks buffer objects for client side of command buffer. | 22 // Tracks buffer objects for client side of command buffer. |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 92 |
| 93 Buffer* CreateBuffer(GLuint id, GLsizeiptr size); | 93 Buffer* CreateBuffer(GLuint id, GLsizeiptr size); |
| 94 Buffer* GetBuffer(GLuint id); | 94 Buffer* GetBuffer(GLuint id); |
| 95 void RemoveBuffer(GLuint id); | 95 void RemoveBuffer(GLuint id); |
| 96 | 96 |
| 97 // Frees the block of memory associated with buffer, pending the passage | 97 // Frees the block of memory associated with buffer, pending the passage |
| 98 // of a token. | 98 // of a token. |
| 99 void FreePendingToken(Buffer*, int32 token); | 99 void FreePendingToken(Buffer*, int32 token); |
| 100 | 100 |
| 101 private: | 101 private: |
| 102 typedef gpu::hash_map<GLuint, Buffer*> BufferMap; | 102 typedef base::hash_map<GLuint, Buffer*> BufferMap; |
| 103 | 103 |
| 104 MappedMemoryManager* mapped_memory_; | 104 MappedMemoryManager* mapped_memory_; |
| 105 BufferMap buffers_; | 105 BufferMap buffers_; |
| 106 | 106 |
| 107 DISALLOW_COPY_AND_ASSIGN(BufferTracker); | 107 DISALLOW_COPY_AND_ASSIGN(BufferTracker); |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 } // namespace gles2 | 110 } // namespace gles2 |
| 111 } // namespace gpu | 111 } // namespace gpu |
| 112 | 112 |
| 113 #endif // GPU_COMMAND_BUFFER_CLIENT_BUFFER_TRACKER_H_ | 113 #endif // GPU_COMMAND_BUFFER_CLIENT_BUFFER_TRACKER_H_ |
| OLD | NEW |