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

Unified Diff: src/gpu/gl/GrGLVertexArray.h

Issue 1137093002: Remove GrGLVertexArray from GrGpuResource hierarchy. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix nit Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLGpu.cpp ('k') | src/gpu/gl/GrGLVertexArray.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLVertexArray.h
diff --git a/src/gpu/gl/GrGLVertexArray.h b/src/gpu/gl/GrGLVertexArray.h
index 77f4fd0eecea1401c5e633d2d6ef608bc9d485dd..a8feb73087583796ed4d71b200754925059f3327 100644
--- a/src/gpu/gl/GrGLVertexArray.h
+++ b/src/gpu/gl/GrGLVertexArray.h
@@ -8,11 +8,9 @@
#ifndef GrGLVertexArray_DEFINED
#define GrGLVertexArray_DEFINED
-#include "GrGpuResource.h"
#include "GrTypesPriv.h"
#include "gl/GrGLDefines.h"
#include "gl/GrGLFunctions.h"
-
#include "SkTArray.h"
class GrGLVertexBuffer;
@@ -134,22 +132,22 @@ private:
* This class represents an OpenGL vertex array object. It manages the lifetime of the vertex array
* and is used to track the state of the vertex array to avoid redundant GL calls.
*/
-class GrGLVertexArray : public GrGpuResource {
+class GrGLVertexArray {
public:
- GrGLVertexArray(GrGLGpu* gpu, GrGLint id, int attribCount);
+ GrGLVertexArray(GrGLint id, int attribCount);
/**
* Binds this vertex array. If the ID has been deleted or abandoned then NULL is returned.
* Otherwise, the GrGLAttribArrayState that is tracking this vertex array's attrib bindings is
* returned.
*/
- GrGLAttribArrayState* bind();
+ GrGLAttribArrayState* bind(GrGLGpu*);
/**
* This is a version of the above function that also binds an index buffer to the vertex
* array object.
*/
- GrGLAttribArrayState* bindWithIndexBuffer(const GrGLIndexBuffer* indexBuffer);
+ GrGLAttribArrayState* bindWithIndexBuffer(GrGLGpu* gpu, const GrGLIndexBuffer*);
void notifyIndexBufferDelete(GrGLuint bufferID);
@@ -161,20 +159,11 @@ public:
void invalidateCachedState();
-protected:
- size_t onGpuMemorySize() const override { return 0; }
-
- void onAbandon() override;
-
- void onRelease() override;
-
private:
GrGLuint fID;
GrGLAttribArrayState fAttribArrays;
GrGLuint fIndexBufferID;
bool fIndexBufferIDIsValid;
-
- typedef GrGpuResource INHERITED;
};
#endif
« no previous file with comments | « src/gpu/gl/GrGLGpu.cpp ('k') | src/gpu/gl/GrGLVertexArray.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698