OLD | NEW |
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 #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" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 DCHECK_EQ(target_, 0u); // you can only set this once. | 108 DCHECK_EQ(target_, 0u); // you can only set this once. |
109 target_ = target; | 109 target_ = target; |
110 } | 110 } |
111 | 111 |
112 bool shadowed() const { | 112 bool shadowed() const { |
113 return shadowed_; | 113 return shadowed_; |
114 } | 114 } |
115 | 115 |
116 void MarkAsDeleted() { | 116 void MarkAsDeleted() { |
117 service_id_ = 0; | 117 service_id_ = 0; |
118 shadow_.reset(); | |
119 ClearCache(); | |
120 } | 118 } |
121 | 119 |
122 void SetInfo(GLsizeiptr size, GLenum usage, bool shadow); | 120 void SetInfo(GLsizeiptr size, GLenum usage, bool shadow); |
123 | 121 |
124 // Clears any cache of index ranges. | 122 // Clears any cache of index ranges. |
125 void ClearCache(); | 123 void ClearCache(); |
126 | 124 |
127 // Service side buffer id. | 125 // Service side buffer id. |
128 GLuint service_id_; | 126 GLuint service_id_; |
129 | 127 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 // Whether or not buffers can be bound to multiple targets. | 184 // Whether or not buffers can be bound to multiple targets. |
187 bool allow_buffers_on_multiple_targets_; | 185 bool allow_buffers_on_multiple_targets_; |
188 | 186 |
189 DISALLOW_COPY_AND_ASSIGN(BufferManager); | 187 DISALLOW_COPY_AND_ASSIGN(BufferManager); |
190 }; | 188 }; |
191 | 189 |
192 } // namespace gles2 | 190 } // namespace gles2 |
193 } // namespace gpu | 191 } // namespace gpu |
194 | 192 |
195 #endif // GPU_COMMAND_BUFFER_SERVICE_BUFFER_MANAGER_H_ | 193 #endif // GPU_COMMAND_BUFFER_SERVICE_BUFFER_MANAGER_H_ |
OLD | NEW |