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

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGLVertexArrayObjectBase.h

Issue 1555523002: WebGL: remove validation code for vertexAttribPointer and vertexAttribIPointer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed feedback from zmo and kbr: remove VertexAttribState Created 4 years, 11 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
Index: third_party/WebKit/Source/modules/webgl/WebGLVertexArrayObjectBase.h
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLVertexArrayObjectBase.h b/third_party/WebKit/Source/modules/webgl/WebGLVertexArrayObjectBase.h
index e9192af45b402a3f22e6ea59cca2579bccb29689..ba6b1b2fe183ed324a62bf550ea04a01bd290be1 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLVertexArrayObjectBase.h
+++ b/third_party/WebKit/Source/modules/webgl/WebGLVertexArrayObjectBase.h
@@ -22,36 +22,6 @@ public:
Platform3DObject object() const { return m_object; }
- // Cached values for vertex attrib range checks
- class VertexAttribState final : public GarbageCollected<VertexAttribState> {
- public:
- VertexAttribState()
- : enabled(false)
- , bytesPerElement(0)
- , size(4)
- , type(GL_FLOAT)
- , normalized(false)
- , stride(16)
- , originalStride(0)
- , offset(0)
- , divisor(0)
- {
- }
-
- DECLARE_TRACE();
-
- bool enabled;
- Member<WebGLBuffer> bufferBinding;
- GLsizei bytesPerElement;
- GLint size;
- GLenum type;
- bool normalized;
- GLsizei stride;
- GLsizei originalStride;
- GLintptr offset;
- GLuint divisor;
- };
-
bool isDefaultObject() const { return m_type == VaoTypeDefault; }
bool hasEverBeenBound() const { return object() && m_hasEverBeenBound; }
@@ -60,10 +30,9 @@ public:
WebGLBuffer* boundElementArrayBuffer() const { return m_boundElementArrayBuffer; }
void setElementArrayBuffer(WebGLBuffer*);
- VertexAttribState* getVertexAttribState(size_t);
- void setVertexAttribState(GLuint, GLsizei, GLint, GLenum, GLboolean, GLsizei, GLintptr, WebGLBuffer*);
+ WebGLBuffer* getArrayBufferForAttrib(size_t);
+ void setArrayBufferForAttrib(GLuint, WebGLBuffer*);
void unbindBuffer(WebGLBuffer*);
- void setVertexAttribDivisor(GLuint index, GLuint divisor);
DECLARE_VIRTUAL_TRACE();
@@ -81,7 +50,7 @@ private:
bool m_hasEverBeenBound;
bool m_destructionInProgress;
Member<WebGLBuffer> m_boundElementArrayBuffer;
- HeapVector<Member<VertexAttribState>> m_vertexAttribState;
+ HeapVector<Member<WebGLBuffer>> m_arrayBufferList;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698