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_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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 | 152 |
153 // Whether or not the data is shadowed. | 153 // Whether or not the data is shadowed. |
154 bool shadowed_; | 154 bool shadowed_; |
155 | 155 |
156 // Whether or not this Buffer is not uploaded to the GPU but just | 156 // Whether or not this Buffer is not uploaded to the GPU but just |
157 // sitting in local memory. | 157 // sitting in local memory. |
158 bool is_client_side_array_; | 158 bool is_client_side_array_; |
159 | 159 |
160 // A copy of the data in the buffer. This data is only kept if the target | 160 // A copy of the data in the buffer. This data is only kept if the target |
161 // is backed_ = true. | 161 // is backed_ = true. |
162 scoped_array<int8> shadow_; | 162 scoped_ptr<int8[]> shadow_; |
163 | 163 |
164 // A map of ranges to the highest value in that range of a certain type. | 164 // A map of ranges to the highest value in that range of a certain type. |
165 typedef std::map<Range, GLuint, Range::Less> RangeToMaxValueMap; | 165 typedef std::map<Range, GLuint, Range::Less> RangeToMaxValueMap; |
166 RangeToMaxValueMap range_set_; | 166 RangeToMaxValueMap range_set_; |
167 }; | 167 }; |
168 | 168 |
169 // This class keeps track of the buffers and their sizes so we can do | 169 // This class keeps track of the buffers and their sizes so we can do |
170 // bounds checking. | 170 // bounds checking. |
171 // | 171 // |
172 // NOTE: To support shared resources an instance of this class will need to be | 172 // NOTE: To support shared resources an instance of this class will need to be |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 bool have_context_; | 249 bool have_context_; |
250 bool use_client_side_arrays_for_stream_buffers_; | 250 bool use_client_side_arrays_for_stream_buffers_; |
251 | 251 |
252 DISALLOW_COPY_AND_ASSIGN(BufferManager); | 252 DISALLOW_COPY_AND_ASSIGN(BufferManager); |
253 }; | 253 }; |
254 | 254 |
255 } // namespace gles2 | 255 } // namespace gles2 |
256 } // namespace gpu | 256 } // namespace gpu |
257 | 257 |
258 #endif // GPU_COMMAND_BUFFER_SERVICE_BUFFER_MANAGER_H_ | 258 #endif // GPU_COMMAND_BUFFER_SERVICE_BUFFER_MANAGER_H_ |
OLD | NEW |