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

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

Issue 16293004: Update gpu/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 months 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
OLDNEW
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_VERTEX_ATTRIB_MANAGER_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_VERTEX_ATTRIB_MANAGER_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_VERTEX_ATTRIB_MANAGER_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_VERTEX_ATTRIB_MANAGER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <vector> 9 #include <vector>
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 17 matching lines...) Expand all
28 class GPU_EXPORT VertexAttrib { 28 class GPU_EXPORT VertexAttrib {
29 public: 29 public:
30 typedef std::list<VertexAttrib*> VertexAttribList; 30 typedef std::list<VertexAttrib*> VertexAttribList;
31 31
32 VertexAttrib(); 32 VertexAttrib();
33 ~VertexAttrib(); 33 ~VertexAttrib();
34 34
35 // Returns true if this VertexAttrib can access index. 35 // Returns true if this VertexAttrib can access index.
36 bool CanAccess(GLuint index) const; 36 bool CanAccess(GLuint index) const;
37 37
38 Buffer* buffer() const { 38 Buffer* buffer() const { return buffer_.get(); }
39 return buffer_;
40 }
41 39
42 GLsizei offset() const { 40 GLsizei offset() const {
43 return offset_; 41 return offset_;
44 } 42 }
45 43
46 GLuint index() const { 44 GLuint index() const {
47 return index_; 45 return index_;
48 } 46 }
49 47
50 GLint size() const { 48 GLint size() const {
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 214
217 void SetDivisor(GLuint index, GLuint divisor) { 215 void SetDivisor(GLuint index, GLuint divisor) {
218 VertexAttrib* attrib = GetVertexAttrib(index); 216 VertexAttrib* attrib = GetVertexAttrib(index);
219 if (attrib) { 217 if (attrib) {
220 attrib->SetDivisor(divisor); 218 attrib->SetDivisor(divisor);
221 } 219 }
222 } 220 }
223 221
224 void SetElementArrayBuffer(Buffer* buffer); 222 void SetElementArrayBuffer(Buffer* buffer);
225 223
226 Buffer* element_array_buffer() const { 224 Buffer* element_array_buffer() const { return element_array_buffer_.get(); }
227 return element_array_buffer_;
228 }
229 225
230 GLuint service_id() const { 226 GLuint service_id() const {
231 return service_id_; 227 return service_id_;
232 } 228 }
233 229
234 void Unbind(Buffer* buffer); 230 void Unbind(Buffer* buffer);
235 231
236 bool IsDeleted() const { 232 bool IsDeleted() const {
237 return deleted_; 233 return deleted_;
238 } 234 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 287
292 // Service side vertex array object id. 288 // Service side vertex array object id.
293 GLuint service_id_; 289 GLuint service_id_;
294 }; 290 };
295 291
296 } // namespace gles2 292 } // namespace gles2
297 } // namespace gpu 293 } // namespace gpu
298 294
299 #endif // GPU_COMMAND_BUFFER_SERVICE_VERTEX_ATTRIB_MANAGER_H_ 295 #endif // GPU_COMMAND_BUFFER_SERVICE_VERTEX_ATTRIB_MANAGER_H_
300 296
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/vertex_array_manager.cc ('k') | gpu/command_buffer/service/vertex_attrib_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698