Chromium Code Reviews| Index: Source/core/html/canvas/OESVertexArrayObject.cpp |
| diff --git a/Source/core/html/canvas/OESVertexArrayObject.cpp b/Source/core/html/canvas/OESVertexArrayObject.cpp |
| index 7b8df7fb629e2f18d195f4cccea6779765fc8f15..bc8e17f2a649c4f76a990b07fab0acad178aebe9 100644 |
| --- a/Source/core/html/canvas/OESVertexArrayObject.cpp |
| +++ b/Source/core/html/canvas/OESVertexArrayObject.cpp |
| @@ -37,13 +37,17 @@ OESVertexArrayObject::OESVertexArrayObject(WebGLRenderingContext* context) |
| : WebGLExtension(context) |
| { |
| ScriptWrappable::init(this); |
|
Ken Russell (switch to Gerrit)
2013/06/05 00:46:38
Missing call to enable()?
|
| - context->graphicsContext3D()->getExtensions()->ensureEnabled("GL_OES_vertex_array_object"); |
| } |
| OESVertexArrayObject::~OESVertexArrayObject() |
| { |
| } |
| +void OESVertexArrayObject::enable() |
| +{ |
| + m_context->graphicsContext3D()->getExtensions()->ensureEnabled("GL_OES_vertex_array_object"); |
| +} |
| + |
| WebGLExtension::ExtensionName OESVertexArrayObject::getName() const |
| { |
| return OESVertexArrayObjectName; |
| @@ -56,7 +60,7 @@ PassOwnPtr<OESVertexArrayObject> OESVertexArrayObject::create(WebGLRenderingCont |
| PassRefPtr<WebGLVertexArrayObjectOES> OESVertexArrayObject::createVertexArrayOES() |
| { |
| - if (m_context->isContextLost()) |
| + if (isLost()) |
| return 0; |
| RefPtr<WebGLVertexArrayObjectOES> o = WebGLVertexArrayObjectOES::create(m_context, WebGLVertexArrayObjectOES::VaoTypeUser); |
| @@ -66,7 +70,7 @@ PassRefPtr<WebGLVertexArrayObjectOES> OESVertexArrayObject::createVertexArrayOES |
| void OESVertexArrayObject::deleteVertexArrayOES(WebGLVertexArrayObjectOES* arrayObject) |
| { |
| - if (!arrayObject || m_context->isContextLost()) |
| + if (!arrayObject || isLost()) |
| return; |
| if (!arrayObject->isDefaultObject() && arrayObject == m_context->m_boundVertexArrayObject) |
| @@ -77,7 +81,7 @@ void OESVertexArrayObject::deleteVertexArrayOES(WebGLVertexArrayObjectOES* array |
| GC3Dboolean OESVertexArrayObject::isVertexArrayOES(WebGLVertexArrayObjectOES* arrayObject) |
| { |
| - if (!arrayObject || m_context->isContextLost()) |
| + if (!arrayObject || isLost()) |
| return 0; |
| if (!arrayObject->hasEverBeenBound()) |
| @@ -90,7 +94,7 @@ GC3Dboolean OESVertexArrayObject::isVertexArrayOES(WebGLVertexArrayObjectOES* ar |
| void OESVertexArrayObject::bindVertexArrayOES(WebGLVertexArrayObjectOES* arrayObject, ExceptionCode& ec) |
| { |
| UNUSED_PARAM(ec); |
| - if (m_context->isContextLost()) |
| + if (isLost()) |
| return; |
| if (arrayObject && (arrayObject->isDeleted() || !arrayObject->validate(0, context()))) { |