| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 WebGLVertexArrayObjectBase_h | 5 #ifndef WebGLVertexArrayObjectBase_h |
| 6 #define WebGLVertexArrayObjectBase_h | 6 #define WebGLVertexArrayObjectBase_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/TraceWrapperMember.h" | 8 #include "bindings/core/v8/TraceWrapperMember.h" |
| 9 #include "modules/webgl/WebGLBuffer.h" | 9 #include "modules/webgl/WebGLBuffer.h" |
| 10 #include "modules/webgl/WebGLContextObject.h" | 10 #include "modules/webgl/WebGLContextObject.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 WebGLBuffer* getArrayBufferForAttrib(size_t); | 36 WebGLBuffer* getArrayBufferForAttrib(size_t); |
| 37 void setArrayBufferForAttrib(GLuint, WebGLBuffer*); | 37 void setArrayBufferForAttrib(GLuint, WebGLBuffer*); |
| 38 void setAttribEnabled(GLuint, bool); | 38 void setAttribEnabled(GLuint, bool); |
| 39 bool getAttribEnabled(GLuint) const; | 39 bool getAttribEnabled(GLuint) const; |
| 40 bool isAllEnabledAttribBufferBound() const { | 40 bool isAllEnabledAttribBufferBound() const { |
| 41 return m_isAllEnabledAttribBufferBound; | 41 return m_isAllEnabledAttribBufferBound; |
| 42 } | 42 } |
| 43 void unbindBuffer(WebGLBuffer*); | 43 void unbindBuffer(WebGLBuffer*); |
| 44 | 44 |
| 45 virtual void visitChildDOMWrappers(v8::Isolate*, | |
| 46 const v8::Persistent<v8::Object>&); | |
| 47 | |
| 48 DECLARE_VIRTUAL_TRACE(); | 45 DECLARE_VIRTUAL_TRACE(); |
| 49 DECLARE_VIRTUAL_TRACE_WRAPPERS(); | 46 DECLARE_VIRTUAL_TRACE_WRAPPERS(); |
| 50 | 47 |
| 51 protected: | 48 protected: |
| 52 WebGLVertexArrayObjectBase(WebGLRenderingContextBase*, VaoType); | 49 WebGLVertexArrayObjectBase(WebGLRenderingContextBase*, VaoType); |
| 53 | 50 |
| 54 private: | 51 private: |
| 55 void dispatchDetached(gpu::gles2::GLES2Interface*); | 52 void dispatchDetached(gpu::gles2::GLES2Interface*); |
| 56 bool hasObject() const override { return m_object != 0; } | 53 bool hasObject() const override { return m_object != 0; } |
| 57 void deleteObjectImpl(gpu::gles2::GLES2Interface*) override; | 54 void deleteObjectImpl(gpu::gles2::GLES2Interface*) override; |
| 58 | 55 |
| 59 void updateAttribBufferBoundStatus(); | 56 void updateAttribBufferBoundStatus(); |
| 60 | 57 |
| 61 GLuint m_object; | 58 GLuint m_object; |
| 62 | 59 |
| 63 VaoType m_type; | 60 VaoType m_type; |
| 64 bool m_hasEverBeenBound; | 61 bool m_hasEverBeenBound; |
| 65 TraceWrapperMember<WebGLBuffer> m_boundElementArrayBuffer; | 62 TraceWrapperMember<WebGLBuffer> m_boundElementArrayBuffer; |
| 66 HeapVector<TraceWrapperMember<WebGLBuffer>> m_arrayBufferList; | 63 HeapVector<TraceWrapperMember<WebGLBuffer>> m_arrayBufferList; |
| 67 Vector<bool> m_attribEnabled; | 64 Vector<bool> m_attribEnabled; |
| 68 bool m_isAllEnabledAttribBufferBound; | 65 bool m_isAllEnabledAttribBufferBound; |
| 69 }; | 66 }; |
| 70 | 67 |
| 71 } // namespace blink | 68 } // namespace blink |
| 72 | 69 |
| 73 #endif // WebGLVertexArrayObjectBase_h | 70 #endif // WebGLVertexArrayObjectBase_h |
| OLD | NEW |