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

Side by Side Diff: src/gpu/gl/GrGLVertexArray.cpp

Issue 251013002: Split GrResource into GrCacheable/GrGpuObject (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 6 years, 7 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
« no previous file with comments | « src/gpu/gl/GrGLVertexArray.h ('k') | src/gpu/gl/GrGLVertexBuffer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrGLVertexArray.h" 8 #include "GrGLVertexArray.h"
9 #include "GrGpuGL.h" 9 #include "GrGpuGL.h"
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 SkASSERT(fAttribArrayStates[i].fEnableIsValid && fAttribArrayStates[ i].fEnabled); 62 SkASSERT(fAttribArrayStates[i].fEnableIsValid && fAttribArrayStates[ i].fEnabled);
63 } 63 }
64 // if the count is greater than 64 then this will become 0 and we will d isable arrays 64+. 64 // if the count is greater than 64 then this will become 0 and we will d isable arrays 64+.
65 usedMask >>= 1; 65 usedMask >>= 1;
66 } 66 }
67 } 67 }
68 68
69 //////////////////////////////////////////////////////////////////////////////// /////////////////// 69 //////////////////////////////////////////////////////////////////////////////// ///////////////////
70 70
71 GrGLVertexArray::GrGLVertexArray(GrGpuGL* gpu, GrGLint id, int attribCount) 71 GrGLVertexArray::GrGLVertexArray(GrGpuGL* gpu, GrGLint id, int attribCount)
72 : GrResource(gpu, false) 72 : INHERITED(gpu, false)
73 , fID(id) 73 , fID(id)
74 , fAttribArrays(attribCount) 74 , fAttribArrays(attribCount)
75 , fIndexBufferIDIsValid(false) { 75 , fIndexBufferIDIsValid(false) {
76 } 76 }
77 77
78 void GrGLVertexArray::onAbandon() { 78 void GrGLVertexArray::onAbandon() {
79 fID = 0; 79 fID = 0;
80 INHERITED::onAbandon(); 80 INHERITED::onAbandon();
81 } 81 }
82 82
(...skipping 30 matching lines...) Expand all
113 void GrGLVertexArray::notifyIndexBufferDelete(GrGLuint bufferID) { 113 void GrGLVertexArray::notifyIndexBufferDelete(GrGLuint bufferID) {
114 if (fIndexBufferIDIsValid && bufferID == fIndexBufferID) { 114 if (fIndexBufferIDIsValid && bufferID == fIndexBufferID) {
115 fIndexBufferID = 0; 115 fIndexBufferID = 0;
116 } 116 }
117 } 117 }
118 118
119 void GrGLVertexArray::invalidateCachedState() { 119 void GrGLVertexArray::invalidateCachedState() {
120 fAttribArrays.invalidate(); 120 fAttribArrays.invalidate();
121 fIndexBufferIDIsValid = false; 121 fIndexBufferIDIsValid = false;
122 } 122 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLVertexArray.h ('k') | src/gpu/gl/GrGLVertexBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698