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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/html/canvas/OESVertexArrayObject.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 return context->extensionsUtil()->supportsExtension("GL_ANGLE_instanced_arra ys"); 61 return context->extensionsUtil()->supportsExtension("GL_ANGLE_instanced_arra ys");
62 } 62 }
63 63
64 const char* ANGLEInstancedArrays::extensionName() 64 const char* ANGLEInstancedArrays::extensionName()
65 { 65 {
66 return "ANGLE_instanced_arrays"; 66 return "ANGLE_instanced_arrays";
67 } 67 }
68 68
69 void ANGLEInstancedArrays::drawArraysInstancedANGLE(GLenum mode, GLint first, GL sizei count, GLsizei primcount) 69 void ANGLEInstancedArrays::drawArraysInstancedANGLE(GLenum mode, GLint first, GL sizei count, GLsizei primcount)
70 { 70 {
71 if (isLost()) 71 WebGLExtensionScopedContext scoped(this);
72 if (scoped.isLost())
72 return; 73 return;
73 74
74 m_context->drawArraysInstancedANGLE(mode, first, count, primcount); 75 scoped.context()->drawArraysInstancedANGLE(mode, first, count, primcount);
75 } 76 }
76 77
77 void ANGLEInstancedArrays::drawElementsInstancedANGLE(GLenum mode, GLsizei count , GLenum type, long long offset, GLsizei primcount) 78 void ANGLEInstancedArrays::drawElementsInstancedANGLE(GLenum mode, GLsizei count , GLenum type, long long offset, GLsizei primcount)
78 { 79 {
79 if (isLost()) 80 WebGLExtensionScopedContext scoped(this);
81 if (scoped.isLost())
80 return; 82 return;
81 83
82 m_context->drawElementsInstancedANGLE(mode, count, type, offset, primcount); 84 scoped.context()->drawElementsInstancedANGLE(mode, count, type, offset, prim count);
83 } 85 }
84 86
85 void ANGLEInstancedArrays::vertexAttribDivisorANGLE(GLuint index, GLuint divisor ) 87 void ANGLEInstancedArrays::vertexAttribDivisorANGLE(GLuint index, GLuint divisor )
86 { 88 {
87 if (isLost()) 89 WebGLExtensionScopedContext scoped(this);
90 if (scoped.isLost())
88 return; 91 return;
89 92
90 m_context->vertexAttribDivisorANGLE(index, divisor); 93 scoped.context()->vertexAttribDivisorANGLE(index, divisor);
91 } 94 }
92 95
93 } // namespace blink 96 } // namespace blink
OLDNEW
« 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