| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/logging.h" | 10 #include "base/logging.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 GLsizei count_; | 88 GLsizei count_; |
| 89 GLenum type_; | 89 GLenum type_; |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 ~BufferInfo(); | 92 ~BufferInfo(); |
| 93 | 93 |
| 94 GLenum target() const { | 94 GLenum target() const { |
| 95 return target_; | 95 return target_; |
| 96 } | 96 } |
| 97 | 97 |
| 98 void set_target(GLenum target) { | 98 void set_target(GLenum target); |
| 99 DCHECK_EQ(target_, 0u); // you can only set this once. | |
| 100 target_ = target; | |
| 101 } | |
| 102 | 99 |
| 103 bool shadowed() const { | 100 bool shadowed() const { |
| 104 return shadowed_; | 101 return shadowed_; |
| 105 } | 102 } |
| 106 | 103 |
| 107 void MarkAsDeleted() { | 104 void MarkAsDeleted() { |
| 108 service_id_ = 0; | 105 service_id_ = 0; |
| 109 shadow_.reset(); | 106 shadow_.reset(); |
| 110 ClearCache(); | 107 ClearCache(); |
| 111 } | 108 } |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 // Whether or not buffers can be bound to multiple targets. | 172 // Whether or not buffers can be bound to multiple targets. |
| 176 bool allow_buffers_on_multiple_targets_; | 173 bool allow_buffers_on_multiple_targets_; |
| 177 | 174 |
| 178 DISALLOW_COPY_AND_ASSIGN(BufferManager); | 175 DISALLOW_COPY_AND_ASSIGN(BufferManager); |
| 179 }; | 176 }; |
| 180 | 177 |
| 181 } // namespace gles2 | 178 } // namespace gles2 |
| 182 } // namespace gpu | 179 } // namespace gpu |
| 183 | 180 |
| 184 #endif // GPU_COMMAND_BUFFER_SERVICE_BUFFER_MANAGER_H_ | 181 #endif // GPU_COMMAND_BUFFER_SERVICE_BUFFER_MANAGER_H_ |
| 185 | |
| 186 | |
| OLD | NEW |