| Index: Source/modules/webgl/WebGLVertexArrayObjectBase.cpp
|
| diff --git a/Source/modules/webgl/WebGLVertexArrayObjectBase.cpp b/Source/modules/webgl/WebGLVertexArrayObjectBase.cpp
|
| index 5f3d0c2ae6d61eff2c86d4bd3f2caebb5dcc2a0c..49ba53c46834c260a0e85b7c2109d7c872456fc2 100644
|
| --- a/Source/modules/webgl/WebGLVertexArrayObjectBase.cpp
|
| +++ b/Source/modules/webgl/WebGLVertexArrayObjectBase.cpp
|
| @@ -15,9 +15,7 @@ WebGLVertexArrayObjectBase::WebGLVertexArrayObjectBase(WebGLRenderingContextBase
|
| , m_object(0)
|
| , m_type(type)
|
| , m_hasEverBeenBound(false)
|
| -#if ENABLE(OILPAN)
|
| , m_destructionInProgress(false)
|
| -#endif
|
| , m_boundElementArrayBuffer(nullptr)
|
| {
|
| m_vertexAttribState.reserveCapacity(ctx->maxVertexAttribs());
|
| @@ -33,9 +31,7 @@ WebGLVertexArrayObjectBase::WebGLVertexArrayObjectBase(WebGLRenderingContextBase
|
|
|
| WebGLVertexArrayObjectBase::~WebGLVertexArrayObjectBase()
|
| {
|
| -#if ENABLE(OILPAN)
|
| m_destructionInProgress = true;
|
| -#endif
|
|
|
| // Delete the platform framebuffer resource. Explicit detachment
|
| // is for the benefit of Oilpan, where this vertex array object
|
| @@ -71,7 +67,6 @@ void WebGLVertexArrayObjectBase::deleteObjectImpl(WebGraphicsContext3D* context3
|
| break;
|
| }
|
|
|
| -#if ENABLE(OILPAN)
|
| // These m_boundElementArrayBuffer and m_vertexAttribState heap
|
| // objects must not be accessed during destruction in the oilpan
|
| // build. They could have been already finalized. The finalizers
|
| @@ -79,12 +74,9 @@ void WebGLVertexArrayObjectBase::deleteObjectImpl(WebGraphicsContext3D* context3
|
| // detachment.
|
| if (!m_destructionInProgress)
|
| dispatchDetached(context3d);
|
| -#else
|
| - dispatchDetached(context3d);
|
| -#endif
|
| }
|
|
|
| -void WebGLVertexArrayObjectBase::setElementArrayBuffer(PassRefPtrWillBeRawPtr<WebGLBuffer> buffer)
|
| +void WebGLVertexArrayObjectBase::setElementArrayBuffer(WebGLBuffer* buffer)
|
| {
|
| if (buffer)
|
| buffer->onAttached();
|
| @@ -98,12 +90,12 @@ WebGLVertexArrayObjectBase::VertexAttribState* WebGLVertexArrayObjectBase::getVe
|
| ASSERT(index < context()->maxVertexAttribs());
|
| // Lazily create the vertex attribute states.
|
| for (size_t i = m_vertexAttribState.size(); i <= index; i++)
|
| - m_vertexAttribState.append(adoptPtrWillBeNoop(new VertexAttribState()));
|
| + m_vertexAttribState.append(new VertexAttribState);
|
| return m_vertexAttribState[index].get();
|
| }
|
|
|
| void WebGLVertexArrayObjectBase::setVertexAttribState(
|
| - GLuint index, GLsizei bytesPerElement, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset, PassRefPtrWillBeRawPtr<WebGLBuffer> buffer)
|
| + GLuint index, GLsizei bytesPerElement, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset, WebGLBuffer* buffer)
|
| {
|
| GLsizei validatedStride = stride ? stride : bytesPerElement;
|
| VertexAttribState* state = getVertexAttribState(index);
|
| @@ -123,7 +115,7 @@ void WebGLVertexArrayObjectBase::setVertexAttribState(
|
| state->offset = offset;
|
| }
|
|
|
| -void WebGLVertexArrayObjectBase::unbindBuffer(PassRefPtrWillBeRawPtr<WebGLBuffer> buffer)
|
| +void WebGLVertexArrayObjectBase::unbindBuffer(WebGLBuffer* buffer)
|
| {
|
| if (m_boundElementArrayBuffer == buffer) {
|
| m_boundElementArrayBuffer->onDetached(context()->webContext());
|
| @@ -131,7 +123,7 @@ void WebGLVertexArrayObjectBase::unbindBuffer(PassRefPtrWillBeRawPtr<WebGLBuffer
|
| }
|
|
|
| for (size_t i = 0; i < m_vertexAttribState.size(); ++i) {
|
| - VertexAttribState* state = m_vertexAttribState[i].get();
|
| + VertexAttribState* state = m_vertexAttribState[i];
|
| if (state->bufferBinding == buffer) {
|
| buffer->onDetached(context()->webContext());
|
| state->bufferBinding = nullptr;
|
|
|