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

Unified Diff: Source/core/html/canvas/OESVertexArrayObject.cpp

Issue 15876011: Make WebGL extensions get lost when context is lost. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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 | « Source/core/html/canvas/OESVertexArrayObject.h ('k') | Source/core/html/canvas/WebGLCompressedTextureATC.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..4123a5f92b497e6e2170e43deb54775ac4140b87 100644
--- a/Source/core/html/canvas/OESVertexArrayObject.cpp
+++ b/Source/core/html/canvas/OESVertexArrayObject.cpp
@@ -49,14 +49,14 @@ WebGLExtension::ExtensionName OESVertexArrayObject::getName() const
return OESVertexArrayObjectName;
}
-PassOwnPtr<OESVertexArrayObject> OESVertexArrayObject::create(WebGLRenderingContext* context)
+PassRefPtr<OESVertexArrayObject> OESVertexArrayObject::create(WebGLRenderingContext* context)
{
- return adoptPtr(new OESVertexArrayObject(context));
+ return adoptRef(new OESVertexArrayObject(context));
}
PassRefPtr<WebGLVertexArrayObjectOES> OESVertexArrayObject::createVertexArrayOES()
{
- if (m_context->isContextLost())
+ if (isLost())
return 0;
RefPtr<WebGLVertexArrayObjectOES> o = WebGLVertexArrayObjectOES::create(m_context, WebGLVertexArrayObjectOES::VaoTypeUser);
@@ -66,7 +66,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 +77,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 +90,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()))) {
« no previous file with comments | « Source/core/html/canvas/OESVertexArrayObject.h ('k') | Source/core/html/canvas/WebGLCompressedTextureATC.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698