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

Unified Diff: src/gpu/gl/debug/GrDebugGL.cpp

Issue 12379025: Add support to GrGLInterface for vertex array objects (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/debug/GrDebugGL.h ('k') | src/gpu/gl/debug/GrGLCreateDebugInterface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/debug/GrDebugGL.cpp
===================================================================
--- src/gpu/gl/debug/GrDebugGL.cpp (revision 7907)
+++ src/gpu/gl/debug/GrDebugGL.cpp (working copy)
@@ -14,8 +14,8 @@
#include "GrShaderObj.h"
#include "GrProgramObj.h"
#include "GrTextureUnitObj.h"
+#include "GrVertexArrayObj.h"
-
GrDebugGL* GrDebugGL::gObj = NULL;
int GrDebugGL::gStaticRefCount = 0;
GrDebugGL::Create GrDebugGL::gFactoryFunc[kObjTypeCount] = {
@@ -26,6 +26,7 @@
GrShaderObj::createGrShaderObj,
GrProgramObj::createGrProgramObj,
GrTextureUnitObj::createGrTextureUnitObj,
+ GrVertexArrayObj::createGrVertexArrayObj,
};
@@ -38,7 +39,8 @@
, fFrameBuffer(NULL)
, fRenderBuffer(NULL)
, fProgram(NULL)
- , fTexture(NULL) {
+ , fTexture(NULL)
+ , fVertexArray(NULL) {
for (int i = 0; i < kDefaultMaxTextureUnits; ++i) {
@@ -70,6 +72,7 @@
fRenderBuffer = NULL;
fProgram = NULL;
fTexture = NULL;
+ fVertexArray = NULL;
}
GrFakeRefObj *GrDebugGL::findObject(GrGLuint ID, GrObjTypes type) {
@@ -107,6 +110,13 @@
}
}
+void GrDebugGL::setVertexArray(GrVertexArrayObj* vertexArray) {
+ if (NULL != vertexArray) {
+ GrAssert(!vertexArray->getDeleted());
+ }
+ SkRefCnt_SafeAssign(fVertexArray, vertexArray);
+}
+
void GrDebugGL::setElementArrayBuffer(GrBufferObj *elementArrayBuffer) {
if (fElementArrayBuffer) {
// automatically break the binding of the old buffer
« no previous file with comments | « src/gpu/gl/debug/GrDebugGL.h ('k') | src/gpu/gl/debug/GrGLCreateDebugInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698