| 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 } |
| 99 | 102 |
| 100 bool shadowed() const { | 103 bool shadowed() const { |
| 101 return shadowed_; | 104 return shadowed_; |
| 102 } | 105 } |
| 103 | 106 |
| 104 void MarkAsDeleted() { | 107 void MarkAsDeleted() { |
| 105 service_id_ = 0; | 108 service_id_ = 0; |
| 106 shadow_.reset(); | 109 shadow_.reset(); |
| 107 ClearCache(); | 110 ClearCache(); |
| 108 } | 111 } |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 // Whether or not buffers can be bound to multiple targets. | 175 // Whether or not buffers can be bound to multiple targets. |
| 173 bool allow_buffers_on_multiple_targets_; | 176 bool allow_buffers_on_multiple_targets_; |
| 174 | 177 |
| 175 DISALLOW_COPY_AND_ASSIGN(BufferManager); | 178 DISALLOW_COPY_AND_ASSIGN(BufferManager); |
| 176 }; | 179 }; |
| 177 | 180 |
| 178 } // namespace gles2 | 181 } // namespace gles2 |
| 179 } // namespace gpu | 182 } // namespace gpu |
| 180 | 183 |
| 181 #endif // GPU_COMMAND_BUFFER_SERVICE_BUFFER_MANAGER_H_ | 184 #endif // GPU_COMMAND_BUFFER_SERVICE_BUFFER_MANAGER_H_ |
| 185 |
| 186 |
| OLD | NEW |