| 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 22 matching lines...) Expand all Loading... |
| 33 #include "modules/webgl/WebGLRenderingContextBase.h" | 33 #include "modules/webgl/WebGLRenderingContextBase.h" |
| 34 | 34 |
| 35 namespace blink { | 35 namespace blink { |
| 36 | 36 |
| 37 ANGLEInstancedArrays::ANGLEInstancedArrays(WebGLRenderingContextBase* context) | 37 ANGLEInstancedArrays::ANGLEInstancedArrays(WebGLRenderingContextBase* context) |
| 38 : WebGLExtension(context) { | 38 : WebGLExtension(context) { |
| 39 context->extensionsUtil()->ensureExtensionEnabled( | 39 context->extensionsUtil()->ensureExtensionEnabled( |
| 40 "GL_ANGLE_instanced_arrays"); | 40 "GL_ANGLE_instanced_arrays"); |
| 41 } | 41 } |
| 42 | 42 |
| 43 ANGLEInstancedArrays::~ANGLEInstancedArrays() {} | |
| 44 | |
| 45 WebGLExtensionName ANGLEInstancedArrays::name() const { | 43 WebGLExtensionName ANGLEInstancedArrays::name() const { |
| 46 return ANGLEInstancedArraysName; | 44 return ANGLEInstancedArraysName; |
| 47 } | 45 } |
| 48 | 46 |
| 49 ANGLEInstancedArrays* ANGLEInstancedArrays::create( | 47 ANGLEInstancedArrays* ANGLEInstancedArrays::create( |
| 50 WebGLRenderingContextBase* context) { | 48 WebGLRenderingContextBase* context) { |
| 51 return new ANGLEInstancedArrays(context); | 49 return new ANGLEInstancedArrays(context); |
| 52 } | 50 } |
| 53 | 51 |
| 54 bool ANGLEInstancedArrays::supported(WebGLRenderingContextBase* context) { | 52 bool ANGLEInstancedArrays::supported(WebGLRenderingContextBase* context) { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 void ANGLEInstancedArrays::vertexAttribDivisorANGLE(GLuint index, | 85 void ANGLEInstancedArrays::vertexAttribDivisorANGLE(GLuint index, |
| 88 GLuint divisor) { | 86 GLuint divisor) { |
| 89 WebGLExtensionScopedContext scoped(this); | 87 WebGLExtensionScopedContext scoped(this); |
| 90 if (scoped.isLost()) | 88 if (scoped.isLost()) |
| 91 return; | 89 return; |
| 92 | 90 |
| 93 scoped.context()->vertexAttribDivisorANGLE(index, divisor); | 91 scoped.context()->vertexAttribDivisorANGLE(index, divisor); |
| 94 } | 92 } |
| 95 | 93 |
| 96 } // namespace blink | 94 } // namespace blink |
| OLD | NEW |