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

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

Issue 798233005: Merge 185069 "Enforce context refrence guards in WebGL extensions." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/2214/
Patch Set: Created 6 years 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 | « no previous file | Source/core/html/canvas/OESVertexArrayObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/canvas/ANGLEInstancedArrays.cpp
===================================================================
--- Source/core/html/canvas/ANGLEInstancedArrays.cpp (revision 187498)
+++ Source/core/html/canvas/ANGLEInstancedArrays.cpp (working copy)
@@ -68,26 +68,29 @@
void ANGLEInstancedArrays::drawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei primcount)
{
- if (isLost())
+ WebGLExtensionScopedContext scoped(this);
+ if (scoped.isLost())
return;
- m_context->drawArraysInstancedANGLE(mode, first, count, primcount);
+ scoped.context()->drawArraysInstancedANGLE(mode, first, count, primcount);
}
void ANGLEInstancedArrays::drawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, long long offset, GLsizei primcount)
{
- if (isLost())
+ WebGLExtensionScopedContext scoped(this);
+ if (scoped.isLost())
return;
- m_context->drawElementsInstancedANGLE(mode, count, type, offset, primcount);
+ scoped.context()->drawElementsInstancedANGLE(mode, count, type, offset, primcount);
}
void ANGLEInstancedArrays::vertexAttribDivisorANGLE(GLuint index, GLuint divisor)
{
- if (isLost())
+ WebGLExtensionScopedContext scoped(this);
+ if (scoped.isLost())
return;
- m_context->vertexAttribDivisorANGLE(index, divisor);
+ scoped.context()->vertexAttribDivisorANGLE(index, divisor);
}
} // namespace blink
« no previous file with comments | « no previous file | Source/core/html/canvas/OESVertexArrayObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698