| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |