Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Side by Side Diff: gpu/command_buffer/service/buffer_manager.h

Issue 8515023: Allow deleted resources to be used (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | gpu/command_buffer/service/buffer_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698