⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 178674 in webkit


Ignore:
Timestamp:
Jan 19, 2015, 2:15:16 PM (12 years ago)
Author:
roger_fong@apple.com
Message:

WebGL2: Support webgl2 context creation.
https://bugs.webkit.org/show_bug.cgi?id=126408
<rdar://problem/15002170>

Reviewed by Dean Jackson.

Tests covered by existing Khronos tests for WebGL 1.0 conformance.

Create a WebGLRenderingContextBase class that extends to a WebGLRenderingContext and WebGL2RenderingContext.
Replace all previous instances of WebGLRenderingContext usages with WebGLRenderingContextBase usages for now.
As the first step, the WebGL1 and WebGL2 contexts will have the exact same functionality.

  • CMakeLists.txt:
  • DerivedSources.cpp:
  • DerivedSources.make:
  • WebCore.vcxproj/WebCore.vcxproj:
  • WebCore.vcxproj/WebCore.vcxproj.filters:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSBindingsAllInOne.cpp:
  • bindings/js/JSCanvasRenderingContextCustom.cpp:

(WebCore::toJS):

  • bindings/js/JSDocumentCustom.cpp:
  • bindings/js/JSHTMLCanvasElementCustom.cpp:
  • bindings/js/JSWebGL2RenderingContextCustom.cpp: Added.

(WebCore::JSWebGL2RenderingContext::visitAdditionalChildren):

  • bindings/js/JSWebGLRenderingContextBaseCustom.cpp: Added.
  • bindings/js/JSWebGLRenderingContextCustom.cpp: Move code to JSWebGLRenderingContextBaseCustom.cpp.
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):

  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::getContext):
(WebCore::HTMLCanvasElement::reset):
(WebCore::HTMLCanvasElement::paint):
(WebCore::HTMLCanvasElement::getImageData):

  • html/canvas/ANGLEInstancedArrays.cpp:

(WebCore::ANGLEInstancedArrays::ANGLEInstancedArrays):
(WebCore::ANGLEInstancedArrays::supported):

  • html/canvas/ANGLEInstancedArrays.h:
  • html/canvas/CanvasRenderingContext.h:

(WebCore::CanvasRenderingContext::isWebGL1):
(WebCore::CanvasRenderingContext::isWebGL2):
(WebCore::CanvasRenderingContext::is3d):

  • html/canvas/EXTBlendMinMax.cpp:

(WebCore::EXTBlendMinMax::EXTBlendMinMax):

  • html/canvas/EXTBlendMinMax.h:
  • html/canvas/EXTFragDepth.cpp:

(WebCore::EXTFragDepth::EXTFragDepth):

  • html/canvas/EXTFragDepth.h:
  • html/canvas/EXTShaderTextureLOD.cpp:

(WebCore::EXTShaderTextureLOD::EXTShaderTextureLOD):

  • html/canvas/EXTShaderTextureLOD.h:
  • html/canvas/EXTTextureFilterAnisotropic.cpp:

(WebCore::EXTTextureFilterAnisotropic::EXTTextureFilterAnisotropic):

  • html/canvas/EXTTextureFilterAnisotropic.h:
  • html/canvas/EXTsRGB.cpp:

(WebCore::EXTsRGB::EXTsRGB):

  • html/canvas/EXTsRGB.h:
  • html/canvas/OESElementIndexUint.cpp:

(WebCore::OESElementIndexUint::OESElementIndexUint):

  • html/canvas/OESElementIndexUint.h:
  • html/canvas/OESStandardDerivatives.cpp:

(WebCore::OESStandardDerivatives::OESStandardDerivatives):

  • html/canvas/OESStandardDerivatives.h:
  • html/canvas/OESTextureFloat.cpp:

(WebCore::OESTextureFloat::OESTextureFloat):

  • html/canvas/OESTextureFloat.h:
  • html/canvas/OESTextureFloatLinear.cpp:

(WebCore::OESTextureFloatLinear::OESTextureFloatLinear):

  • html/canvas/OESTextureFloatLinear.h:
  • html/canvas/OESTextureHalfFloat.cpp:

(WebCore::OESTextureHalfFloat::OESTextureHalfFloat):

  • html/canvas/OESTextureHalfFloat.h:
  • html/canvas/OESTextureHalfFloatLinear.cpp:

(WebCore::OESTextureHalfFloatLinear::OESTextureHalfFloatLinear):

  • html/canvas/OESTextureHalfFloatLinear.h:
  • html/canvas/OESVertexArrayObject.cpp:

(WebCore::OESVertexArrayObject::OESVertexArrayObject):

  • html/canvas/OESVertexArrayObject.h:
  • html/canvas/WebGL2RenderingContext.cpp: Added.

(WebCore::WebGL2RenderingContext::WebGL2RenderingContext):

  • html/canvas/WebGL2RenderingContext.h: Added.
  • html/canvas/WebGL2RenderingContext.idl: Added.
  • html/canvas/WebGLBuffer.cpp:

(WebCore::WebGLBuffer::create):
(WebCore::WebGLBuffer::WebGLBuffer):

  • html/canvas/WebGLBuffer.h:
  • html/canvas/WebGLCompressedTextureATC.cpp:

(WebCore::WebGLCompressedTextureATC::WebGLCompressedTextureATC):
(WebCore::WebGLCompressedTextureATC::supported):

  • html/canvas/WebGLCompressedTextureATC.h:
  • html/canvas/WebGLCompressedTexturePVRTC.cpp:

(WebCore::WebGLCompressedTexturePVRTC::WebGLCompressedTexturePVRTC):
(WebCore::WebGLCompressedTexturePVRTC::supported):

  • html/canvas/WebGLCompressedTexturePVRTC.h:
  • html/canvas/WebGLCompressedTextureS3TC.cpp:

(WebCore::WebGLCompressedTextureS3TC::WebGLCompressedTextureS3TC):
(WebCore::WebGLCompressedTextureS3TC::supported):

  • html/canvas/WebGLCompressedTextureS3TC.h:
  • html/canvas/WebGLContextGroup.cpp:

(WebCore::WebGLContextGroup::getAGraphicsContext3D):
(WebCore::WebGLContextGroup::addContext):
(WebCore::WebGLContextGroup::removeContext):
(WebCore::WebGLContextGroup::loseContextGroup):

  • html/canvas/WebGLContextGroup.h:
  • html/canvas/WebGLContextObject.cpp:

(WebCore::WebGLContextObject::WebGLContextObject):

  • html/canvas/WebGLContextObject.h:

(WebCore::WebGLContextObject::context):

  • html/canvas/WebGLDebugRendererInfo.cpp:

(WebCore::WebGLDebugRendererInfo::WebGLDebugRendererInfo):

  • html/canvas/WebGLDebugRendererInfo.h:
  • html/canvas/WebGLDebugShaders.cpp:

(WebCore::WebGLDebugShaders::WebGLDebugShaders):

  • html/canvas/WebGLDebugShaders.h:
  • html/canvas/WebGLDepthTexture.cpp:

(WebCore::WebGLDepthTexture::WebGLDepthTexture):

  • html/canvas/WebGLDepthTexture.h:
  • html/canvas/WebGLDrawBuffers.cpp:

(WebCore::WebGLDrawBuffers::WebGLDrawBuffers):
(WebCore::WebGLDrawBuffers::supported):
(WebCore::WebGLDrawBuffers::satisfiesWebGLRequirements):

  • html/canvas/WebGLDrawBuffers.h:
  • html/canvas/WebGLExtension.cpp:

(WebCore::WebGLExtension::WebGLExtension):

  • html/canvas/WebGLExtension.h:

(WebCore::WebGLExtension::context):

  • html/canvas/WebGLFramebuffer.cpp:

(WebCore::WebGLFramebuffer::create):
(WebCore::WebGLFramebuffer::WebGLFramebuffer):

  • html/canvas/WebGLFramebuffer.h:
  • html/canvas/WebGLLoseContext.cpp:

(WebCore::WebGLLoseContext::WebGLLoseContext):
(WebCore::WebGLLoseContext::loseContext):

  • html/canvas/WebGLLoseContext.h:
  • html/canvas/WebGLObject.cpp:

(WebCore::WebGLObject::WebGLObject):

  • html/canvas/WebGLObject.h:
  • html/canvas/WebGLProgram.cpp:

(WebCore::WebGLProgram::create):
(WebCore::WebGLProgram::WebGLProgram):

  • html/canvas/WebGLProgram.h:
  • html/canvas/WebGLRenderbuffer.cpp:

(WebCore::WebGLRenderbuffer::create):
(WebCore::WebGLRenderbuffer::WebGLRenderbuffer):

  • html/canvas/WebGLRenderbuffer.h:
  • html/canvas/WebGLRenderingContext.cpp: Move implementation to WebGLRenderingContextBase.cpp.
  • html/canvas/WebGLRenderingContext.h: Move implementation to WebGLRenderingContextBase.h.
  • html/canvas/WebGLRenderingContext.idl: Move implementation to WebGLRenderingContextBase.idl.
  • html/canvas/WebGLRenderingContextBase.cpp: Added.
  • html/canvas/WebGLRenderingContextBase.h: Added.
  • html/canvas/WebGLRenderingContextBase.idl: Added.
  • html/canvas/WebGLShader.cpp:

(WebCore::WebGLShader::create):
(WebCore::WebGLShader::WebGLShader):

  • html/canvas/WebGLShader.h:
  • html/canvas/WebGLSharedObject.cpp:

(WebCore::WebGLSharedObject::WebGLSharedObject):

  • html/canvas/WebGLSharedObject.h:
  • html/canvas/WebGLTexture.cpp:

(WebCore::WebGLTexture::create):
(WebCore::WebGLTexture::WebGLTexture):

  • html/canvas/WebGLTexture.h:
  • html/canvas/WebGLVertexArrayObjectOES.cpp:

(WebCore::WebGLVertexArrayObjectOES::create):
(WebCore::WebGLVertexArrayObjectOES::WebGLVertexArrayObjectOES):

  • html/canvas/WebGLVertexArrayObjectOES.h:

Layout test fixes:

  • fast/canvas/webgl/bad-arguments-test-expected.txt:
  • fast/canvas/webgl/null-object-behaviour-expected.txt:
  • platform/mac/js/dom/global-constructors-attributes-expected.txt:
Location:
trunk
Files:
8 added
85 edited
3 copied

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r178666 r178674  
     12015-01-16  Roger Fong  <roger_fong@apple.com>
     2
     3        WebGL2: Support webgl2 context creation.
     4        https://bugs.webkit.org/show_bug.cgi?id=126408
     5        <rdar://problem/15002170>
     6
     7        Reviewed by Dean Jackson.
     8
     9        * fast/canvas/webgl/bad-arguments-test-expected.txt:
     10        * fast/canvas/webgl/null-object-behaviour-expected.txt:
     11        * platform/mac/js/dom/global-constructors-attributes-expected.txt:
     12
    1132015-01-19  Alexey Proskuryakov  <ap@apple.com>
    214
  • trunk/LayoutTests/fast/canvas/webgl/bad-arguments-test-expected.txt

    r165640 r178674  
    66PASS Shader Compiled
    77PASS getUniformLocation succeeded
    8 PASS context.compileShader(argument) threw exception TypeError: Argument 1 ('shader') to WebGLRenderingContext.compileShader must be an instance of WebGLShader.
    9 PASS context.linkProgram(argument) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContext.linkProgram must be an instance of WebGLProgram.
    10 PASS context.attachShader(program, argument) threw exception TypeError: Argument 2 ('shader') to WebGLRenderingContext.attachShader must be an instance of WebGLShader.
    11 PASS context.attachShader(argument, shader) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContext.attachShader must be an instance of WebGLProgram.
    12 PASS context.detachShader(program, argument) threw exception TypeError: Argument 2 ('shader') to WebGLRenderingContext.detachShader must be an instance of WebGLShader.
    13 PASS context.detachShader(argument, shader) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContext.detachShader must be an instance of WebGLProgram.
    14 PASS context.useProgram(argument) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContext.useProgram must be an instance of WebGLProgram.
    15 PASS context.shaderSource(argument, 'foo') threw exception TypeError: Argument 1 ('shader') to WebGLRenderingContext.shaderSource must be an instance of WebGLShader.
    16 PASS context.bindAttribLocation(argument, 0, 'foo') threw exception TypeError: Argument 1 ('program') to WebGLRenderingContext.bindAttribLocation must be an instance of WebGLProgram.
    17 PASS context.bindBuffer(context.ARRAY_BUFFER, argument) threw exception TypeError: Argument 2 ('buffer') to WebGLRenderingContext.bindBuffer must be an instance of WebGLBuffer.
    18 PASS context.bindFramebuffer(context.FRAMEBUFFER, argument) threw exception TypeError: Argument 2 ('framebuffer') to WebGLRenderingContext.bindFramebuffer must be an instance of WebGLFramebuffer.
    19 PASS context.bindRenderbuffer(context.RENDERBUFFER, argument) threw exception TypeError: Argument 2 ('renderbuffer') to WebGLRenderingContext.bindRenderbuffer must be an instance of WebGLRenderbuffer.
    20 PASS context.bindTexture(context.TEXTURE_2D, argument) threw exception TypeError: Argument 2 ('texture') to WebGLRenderingContext.bindTexture must be an instance of WebGLTexture.
    21 PASS context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, argument) threw exception TypeError: Argument 4 ('renderbuffer') to WebGLRenderingContext.framebufferRenderbuffer must be an instance of WebGLRenderbuffer.
    22 PASS context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, argument, 0) threw exception TypeError: Argument 4 ('texture') to WebGLRenderingContext.framebufferTexture2D must be an instance of WebGLTexture.
     8PASS context.compileShader(argument) threw exception TypeError: Argument 1 ('shader') to WebGLRenderingContextBase.compileShader must be an instance of WebGLShader.
     9PASS context.linkProgram(argument) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.linkProgram must be an instance of WebGLProgram.
     10PASS context.attachShader(program, argument) threw exception TypeError: Argument 2 ('shader') to WebGLRenderingContextBase.attachShader must be an instance of WebGLShader.
     11PASS context.attachShader(argument, shader) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.attachShader must be an instance of WebGLProgram.
     12PASS context.detachShader(program, argument) threw exception TypeError: Argument 2 ('shader') to WebGLRenderingContextBase.detachShader must be an instance of WebGLShader.
     13PASS context.detachShader(argument, shader) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.detachShader must be an instance of WebGLProgram.
     14PASS context.useProgram(argument) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.useProgram must be an instance of WebGLProgram.
     15PASS context.shaderSource(argument, 'foo') threw exception TypeError: Argument 1 ('shader') to WebGLRenderingContextBase.shaderSource must be an instance of WebGLShader.
     16PASS context.bindAttribLocation(argument, 0, 'foo') threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.bindAttribLocation must be an instance of WebGLProgram.
     17PASS context.bindBuffer(context.ARRAY_BUFFER, argument) threw exception TypeError: Argument 2 ('buffer') to WebGLRenderingContextBase.bindBuffer must be an instance of WebGLBuffer.
     18PASS context.bindFramebuffer(context.FRAMEBUFFER, argument) threw exception TypeError: Argument 2 ('framebuffer') to WebGLRenderingContextBase.bindFramebuffer must be an instance of WebGLFramebuffer.
     19PASS context.bindRenderbuffer(context.RENDERBUFFER, argument) threw exception TypeError: Argument 2 ('renderbuffer') to WebGLRenderingContextBase.bindRenderbuffer must be an instance of WebGLRenderbuffer.
     20PASS context.bindTexture(context.TEXTURE_2D, argument) threw exception TypeError: Argument 2 ('texture') to WebGLRenderingContextBase.bindTexture must be an instance of WebGLTexture.
     21PASS context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, argument) threw exception TypeError: Argument 4 ('renderbuffer') to WebGLRenderingContextBase.framebufferRenderbuffer must be an instance of WebGLRenderbuffer.
     22PASS context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, argument, 0) threw exception TypeError: Argument 4 ('texture') to WebGLRenderingContextBase.framebufferTexture2D must be an instance of WebGLTexture.
    2323PASS context.uniform2fv(argument, new Float32Array([0.0, 0.0])) threw exception TypeError: Type error.
    2424PASS context.uniform2iv(argument, new Int32Array([0, 0])) threw exception TypeError: Type error.
     
    2828PASS context.getUniform(argument, loc) threw exception TypeError: Type error.
    2929PASS context.getUniform(program, argument) threw exception TypeError: Type error.
    30 PASS context.getUniformLocation(argument, 'u_modelViewProjMatrix') threw exception TypeError: Argument 1 ('program') to WebGLRenderingContext.getUniformLocation must be an instance of WebGLProgram.
    31 PASS context.getProgramInfoLog(argument) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContext.getProgramInfoLog must be an instance of WebGLProgram.
    32 PASS context.getShaderInfoLog(argument) threw exception TypeError: Argument 1 ('shader') to WebGLRenderingContext.getShaderInfoLog must be an instance of WebGLShader.
    33 PASS context.getShaderSource(argument) threw exception TypeError: Argument 1 ('shader') to WebGLRenderingContext.getShaderSource must be an instance of WebGLShader.
    34 PASS context.compileShader(argument) threw exception TypeError: Argument 1 ('shader') to WebGLRenderingContext.compileShader must be an instance of WebGLShader.
    35 PASS context.linkProgram(argument) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContext.linkProgram must be an instance of WebGLProgram.
    36 PASS context.attachShader(program, argument) threw exception TypeError: Argument 2 ('shader') to WebGLRenderingContext.attachShader must be an instance of WebGLShader.
    37 PASS context.attachShader(argument, shader) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContext.attachShader must be an instance of WebGLProgram.
    38 PASS context.detachShader(program, argument) threw exception TypeError: Argument 2 ('shader') to WebGLRenderingContext.detachShader must be an instance of WebGLShader.
    39 PASS context.detachShader(argument, shader) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContext.detachShader must be an instance of WebGLProgram.
    40 PASS context.useProgram(argument) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContext.useProgram must be an instance of WebGLProgram.
    41 PASS context.shaderSource(argument, 'foo') threw exception TypeError: Argument 1 ('shader') to WebGLRenderingContext.shaderSource must be an instance of WebGLShader.
    42 PASS context.bindAttribLocation(argument, 0, 'foo') threw exception TypeError: Argument 1 ('program') to WebGLRenderingContext.bindAttribLocation must be an instance of WebGLProgram.
    43 PASS context.bindBuffer(context.ARRAY_BUFFER, argument) threw exception TypeError: Argument 2 ('buffer') to WebGLRenderingContext.bindBuffer must be an instance of WebGLBuffer.
    44 PASS context.bindFramebuffer(context.FRAMEBUFFER, argument) threw exception TypeError: Argument 2 ('framebuffer') to WebGLRenderingContext.bindFramebuffer must be an instance of WebGLFramebuffer.
    45 PASS context.bindRenderbuffer(context.RENDERBUFFER, argument) threw exception TypeError: Argument 2 ('renderbuffer') to WebGLRenderingContext.bindRenderbuffer must be an instance of WebGLRenderbuffer.
    46 PASS context.bindTexture(context.TEXTURE_2D, argument) threw exception TypeError: Argument 2 ('texture') to WebGLRenderingContext.bindTexture must be an instance of WebGLTexture.
    47 PASS context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, argument) threw exception TypeError: Argument 4 ('renderbuffer') to WebGLRenderingContext.framebufferRenderbuffer must be an instance of WebGLRenderbuffer.
    48 PASS context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, argument, 0) threw exception TypeError: Argument 4 ('texture') to WebGLRenderingContext.framebufferTexture2D must be an instance of WebGLTexture.
     30PASS context.getUniformLocation(argument, 'u_modelViewProjMatrix') threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.getUniformLocation must be an instance of WebGLProgram.
     31PASS context.getProgramInfoLog(argument) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.getProgramInfoLog must be an instance of WebGLProgram.
     32PASS context.getShaderInfoLog(argument) threw exception TypeError: Argument 1 ('shader') to WebGLRenderingContextBase.getShaderInfoLog must be an instance of WebGLShader.
     33PASS context.getShaderSource(argument) threw exception TypeError: Argument 1 ('shader') to WebGLRenderingContextBase.getShaderSource must be an instance of WebGLShader.
     34PASS context.compileShader(argument) threw exception TypeError: Argument 1 ('shader') to WebGLRenderingContextBase.compileShader must be an instance of WebGLShader.
     35PASS context.linkProgram(argument) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.linkProgram must be an instance of WebGLProgram.
     36PASS context.attachShader(program, argument) threw exception TypeError: Argument 2 ('shader') to WebGLRenderingContextBase.attachShader must be an instance of WebGLShader.
     37PASS context.attachShader(argument, shader) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.attachShader must be an instance of WebGLProgram.
     38PASS context.detachShader(program, argument) threw exception TypeError: Argument 2 ('shader') to WebGLRenderingContextBase.detachShader must be an instance of WebGLShader.
     39PASS context.detachShader(argument, shader) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.detachShader must be an instance of WebGLProgram.
     40PASS context.useProgram(argument) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.useProgram must be an instance of WebGLProgram.
     41PASS context.shaderSource(argument, 'foo') threw exception TypeError: Argument 1 ('shader') to WebGLRenderingContextBase.shaderSource must be an instance of WebGLShader.
     42PASS context.bindAttribLocation(argument, 0, 'foo') threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.bindAttribLocation must be an instance of WebGLProgram.
     43PASS context.bindBuffer(context.ARRAY_BUFFER, argument) threw exception TypeError: Argument 2 ('buffer') to WebGLRenderingContextBase.bindBuffer must be an instance of WebGLBuffer.
     44PASS context.bindFramebuffer(context.FRAMEBUFFER, argument) threw exception TypeError: Argument 2 ('framebuffer') to WebGLRenderingContextBase.bindFramebuffer must be an instance of WebGLFramebuffer.
     45PASS context.bindRenderbuffer(context.RENDERBUFFER, argument) threw exception TypeError: Argument 2 ('renderbuffer') to WebGLRenderingContextBase.bindRenderbuffer must be an instance of WebGLRenderbuffer.
     46PASS context.bindTexture(context.TEXTURE_2D, argument) threw exception TypeError: Argument 2 ('texture') to WebGLRenderingContextBase.bindTexture must be an instance of WebGLTexture.
     47PASS context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, argument) threw exception TypeError: Argument 4 ('renderbuffer') to WebGLRenderingContextBase.framebufferRenderbuffer must be an instance of WebGLRenderbuffer.
     48PASS context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, argument, 0) threw exception TypeError: Argument 4 ('texture') to WebGLRenderingContextBase.framebufferTexture2D must be an instance of WebGLTexture.
    4949PASS context.uniform2fv(argument, new Float32Array([0.0, 0.0])) threw exception TypeError: Type error.
    5050PASS context.uniform2iv(argument, new Int32Array([0, 0])) threw exception TypeError: Type error.
     
    5454PASS context.getUniform(argument, loc) threw exception TypeError: Type error.
    5555PASS context.getUniform(program, argument) threw exception TypeError: Type error.
    56 PASS context.getUniformLocation(argument, 'u_modelViewProjMatrix') threw exception TypeError: Argument 1 ('program') to WebGLRenderingContext.getUniformLocation must be an instance of WebGLProgram.
    57 PASS context.getProgramInfoLog(argument) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContext.getProgramInfoLog must be an instance of WebGLProgram.
    58 PASS context.getShaderInfoLog(argument) threw exception TypeError: Argument 1 ('shader') to WebGLRenderingContext.getShaderInfoLog must be an instance of WebGLShader.
    59 PASS context.getShaderSource(argument) threw exception TypeError: Argument 1 ('shader') to WebGLRenderingContext.getShaderSource must be an instance of WebGLShader.
     56PASS context.getUniformLocation(argument, 'u_modelViewProjMatrix') threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.getUniformLocation must be an instance of WebGLProgram.
     57PASS context.getProgramInfoLog(argument) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.getProgramInfoLog must be an instance of WebGLProgram.
     58PASS context.getShaderInfoLog(argument) threw exception TypeError: Argument 1 ('shader') to WebGLRenderingContextBase.getShaderInfoLog must be an instance of WebGLShader.
     59PASS context.getShaderSource(argument) threw exception TypeError: Argument 1 ('shader') to WebGLRenderingContextBase.getShaderSource must be an instance of WebGLShader.
    6060PASS context.compileShader(argument) is undefined.
    6161PASS context.linkProgram(argument) is undefined.
  • trunk/LayoutTests/fast/canvas/webgl/null-object-behaviour-expected.txt

    r165640 r178674  
    1515PASS context.shaderSource(undefined, 'foo') was expected value: INVALID_VALUE.
    1616PASS context.bindAttribLocation(undefined, 0, 'foo') was expected value: INVALID_VALUE.
    17 PASS context.bindBuffer(context.ARRAY_BUFFER, 0) threw exception TypeError: Argument 2 ('buffer') to WebGLRenderingContext.bindBuffer must be an instance of WebGLBuffer.
    18 PASS context.bindFramebuffer(context.FRAMEBUFFER, 0) threw exception TypeError: Argument 2 ('framebuffer') to WebGLRenderingContext.bindFramebuffer must be an instance of WebGLFramebuffer.
    19 PASS context.bindRenderbuffer(context.RENDERBUFFER, 0) threw exception TypeError: Argument 2 ('renderbuffer') to WebGLRenderingContext.bindRenderbuffer must be an instance of WebGLRenderbuffer.
    20 PASS context.bindTexture(context.TEXTURE_2D, 0) threw exception TypeError: Argument 2 ('texture') to WebGLRenderingContext.bindTexture must be an instance of WebGLTexture.
     17PASS context.bindBuffer(context.ARRAY_BUFFER, 0) threw exception TypeError: Argument 2 ('buffer') to WebGLRenderingContextBase.bindBuffer must be an instance of WebGLBuffer.
     18PASS context.bindFramebuffer(context.FRAMEBUFFER, 0) threw exception TypeError: Argument 2 ('framebuffer') to WebGLRenderingContextBase.bindFramebuffer must be an instance of WebGLFramebuffer.
     19PASS context.bindRenderbuffer(context.RENDERBUFFER, 0) threw exception TypeError: Argument 2 ('renderbuffer') to WebGLRenderingContextBase.bindRenderbuffer must be an instance of WebGLRenderbuffer.
     20PASS context.bindTexture(context.TEXTURE_2D, 0) threw exception TypeError: Argument 2 ('texture') to WebGLRenderingContextBase.bindTexture must be an instance of WebGLTexture.
    2121PASS context.bindBuffer(context.ARRAY_BUFFER, null) was expected value: NO_ERROR.
    2222PASS context.bindFramebuffer(context.FRAMEBUFFER, null) was expected value: NO_ERROR.
  • trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt

    r178310 r178674  
    18841884PASS Object.getOwnPropertyDescriptor(global, 'WaveShaperNode').enumerable is false
    18851885PASS Object.getOwnPropertyDescriptor(global, 'WaveShaperNode').configurable is true
     1886PASS Object.getOwnPropertyDescriptor(global, 'WebGL2RenderingContext').value is WebGL2RenderingContext
     1887PASS Object.getOwnPropertyDescriptor(global, 'WebGL2RenderingContext').hasOwnProperty('get') is false
     1888PASS Object.getOwnPropertyDescriptor(global, 'WebGL2RenderingContext').hasOwnProperty('set') is false
     1889PASS Object.getOwnPropertyDescriptor(global, 'WebGL2RenderingContext').enumerable is false
     1890PASS Object.getOwnPropertyDescriptor(global, 'WebGL2RenderingContext').configurable is true
    18861891PASS Object.getOwnPropertyDescriptor(global, 'WebGLActiveInfo').value is WebGLActiveInfo
    18871892PASS Object.getOwnPropertyDescriptor(global, 'WebGLActiveInfo').hasOwnProperty('get') is false
  • trunk/Source/WebCore/CMakeLists.txt

    r178586 r178674  
    556556    html/canvas/WebGLProgram.idl
    557557    html/canvas/WebGLRenderbuffer.idl
     558    html/canvas/WebGLRenderingContextBase.idl
    558559    html/canvas/WebGLRenderingContext.idl
     560    html/canvas/WebGL2RenderingContext.idl
    559561    html/canvas/WebGLShader.idl
    560562    html/canvas/WebGLShaderPrecisionFormat.idl
     
    11461148    bindings/js/JSVideoTrackCustom.cpp
    11471149    bindings/js/JSVideoTrackListCustom.cpp
     1150    bindings/js/JSWebGLRenderingContextBaseCustom.cpp
    11481151    bindings/js/JSWebGLRenderingContextCustom.cpp
     1152    bindings/js/JSWebGL2RenderingContextCustom.cpp
    11491153    bindings/js/JSWebKitPointCustom.cpp
    11501154    bindings/js/JSWorkerCustom.cpp
     
    16891693    html/canvas/WebGLProgram.cpp
    16901694    html/canvas/WebGLRenderbuffer.cpp
     1695    html/canvas/WebGLRenderingContextBase.cpp
    16911696    html/canvas/WebGLRenderingContext.cpp
     1697    html/canvas/WebGL2RenderingContext.cpp
    16921698    html/canvas/WebGLShader.cpp
    16931699    html/canvas/WebGLShaderPrecisionFormat.cpp
     
    27862792        html/canvas/WebGLProgram.cpp
    27872793        html/canvas/WebGLRenderbuffer.cpp
     2794        html/canvas/WebGLRenderingContextBase.cpp
    27882795        html/canvas/WebGLRenderingContext.cpp
     2796        html/canvas/WebGL2RenderingContext.cpp
    27892797        html/canvas/WebGLShader.cpp
    27902798        html/canvas/WebGLShaderPrecisionFormat.cpp
     
    28232831        html/canvas/WebGLProgram.idl
    28242832        html/canvas/WebGLRenderbuffer.idl
     2833        html/canvas/WebGLRenderingContextBase.idl
    28252834        html/canvas/WebGLRenderingContext.idl
     2835        html/canvas/WebGL2RenderingContext.idl
    28262836        html/canvas/WebGLShader.idl
    28272837        html/canvas/WebGLShaderPrecisionFormat.idl
  • trunk/Source/WebCore/ChangeLog

    r178673 r178674  
     12015-01-16  Roger Fong  <roger_fong@apple.com>
     2
     3        WebGL2: Support webgl2 context creation.
     4        https://bugs.webkit.org/show_bug.cgi?id=126408
     5        <rdar://problem/15002170>
     6
     7        Reviewed by Dean Jackson.
     8
     9        Tests covered by existing Khronos tests for WebGL 1.0 conformance.
     10
     11        Create a WebGLRenderingContextBase class that extends to a WebGLRenderingContext and WebGL2RenderingContext.
     12        Replace all previous instances of WebGLRenderingContext usages with WebGLRenderingContextBase usages for now.
     13        As the first step, the WebGL1 and WebGL2 contexts will have the exact same functionality.
     14
     15        * CMakeLists.txt:
     16        * DerivedSources.cpp:
     17        * DerivedSources.make:
     18        * WebCore.vcxproj/WebCore.vcxproj:
     19        * WebCore.vcxproj/WebCore.vcxproj.filters:
     20        * WebCore.xcodeproj/project.pbxproj:
     21        * bindings/js/JSBindingsAllInOne.cpp:
     22        * bindings/js/JSCanvasRenderingContextCustom.cpp:
     23        (WebCore::toJS):
     24        * bindings/js/JSDocumentCustom.cpp:
     25        * bindings/js/JSHTMLCanvasElementCustom.cpp:
     26        * bindings/js/JSWebGL2RenderingContextCustom.cpp: Added.
     27        (WebCore::JSWebGL2RenderingContext::visitAdditionalChildren):
     28        * bindings/js/JSWebGLRenderingContextBaseCustom.cpp: Added.
     29        * bindings/js/JSWebGLRenderingContextCustom.cpp: Move code to JSWebGLRenderingContextBaseCustom.cpp.
     30        * bindings/scripts/CodeGeneratorJS.pm:
     31        (GenerateImplementation):
     32        * html/HTMLCanvasElement.cpp:
     33        (WebCore::HTMLCanvasElement::getContext):
     34        (WebCore::HTMLCanvasElement::reset):
     35        (WebCore::HTMLCanvasElement::paint):
     36        (WebCore::HTMLCanvasElement::getImageData):
     37        * html/canvas/ANGLEInstancedArrays.cpp:
     38        (WebCore::ANGLEInstancedArrays::ANGLEInstancedArrays):
     39        (WebCore::ANGLEInstancedArrays::supported):
     40        * html/canvas/ANGLEInstancedArrays.h:
     41        * html/canvas/CanvasRenderingContext.h:
     42        (WebCore::CanvasRenderingContext::isWebGL1):
     43        (WebCore::CanvasRenderingContext::isWebGL2):
     44        (WebCore::CanvasRenderingContext::is3d):
     45        * html/canvas/EXTBlendMinMax.cpp:
     46        (WebCore::EXTBlendMinMax::EXTBlendMinMax):
     47        * html/canvas/EXTBlendMinMax.h:
     48        * html/canvas/EXTFragDepth.cpp:
     49        (WebCore::EXTFragDepth::EXTFragDepth):
     50        * html/canvas/EXTFragDepth.h:
     51        * html/canvas/EXTShaderTextureLOD.cpp:
     52        (WebCore::EXTShaderTextureLOD::EXTShaderTextureLOD):
     53        * html/canvas/EXTShaderTextureLOD.h:
     54        * html/canvas/EXTTextureFilterAnisotropic.cpp:
     55        (WebCore::EXTTextureFilterAnisotropic::EXTTextureFilterAnisotropic):
     56        * html/canvas/EXTTextureFilterAnisotropic.h:
     57        * html/canvas/EXTsRGB.cpp:
     58        (WebCore::EXTsRGB::EXTsRGB):
     59        * html/canvas/EXTsRGB.h:
     60        * html/canvas/OESElementIndexUint.cpp:
     61        (WebCore::OESElementIndexUint::OESElementIndexUint):
     62        * html/canvas/OESElementIndexUint.h:
     63        * html/canvas/OESStandardDerivatives.cpp:
     64        (WebCore::OESStandardDerivatives::OESStandardDerivatives):
     65        * html/canvas/OESStandardDerivatives.h:
     66        * html/canvas/OESTextureFloat.cpp:
     67        (WebCore::OESTextureFloat::OESTextureFloat):
     68        * html/canvas/OESTextureFloat.h:
     69        * html/canvas/OESTextureFloatLinear.cpp:
     70        (WebCore::OESTextureFloatLinear::OESTextureFloatLinear):
     71        * html/canvas/OESTextureFloatLinear.h:
     72        * html/canvas/OESTextureHalfFloat.cpp:
     73        (WebCore::OESTextureHalfFloat::OESTextureHalfFloat):
     74        * html/canvas/OESTextureHalfFloat.h:
     75        * html/canvas/OESTextureHalfFloatLinear.cpp:
     76        (WebCore::OESTextureHalfFloatLinear::OESTextureHalfFloatLinear):
     77        * html/canvas/OESTextureHalfFloatLinear.h:
     78        * html/canvas/OESVertexArrayObject.cpp:
     79        (WebCore::OESVertexArrayObject::OESVertexArrayObject):
     80        * html/canvas/OESVertexArrayObject.h:
     81        * html/canvas/WebGL2RenderingContext.cpp: Added.
     82        (WebCore::WebGL2RenderingContext::WebGL2RenderingContext):
     83        * html/canvas/WebGL2RenderingContext.h: Added.
     84        * html/canvas/WebGL2RenderingContext.idl: Added.
     85        * html/canvas/WebGLBuffer.cpp:
     86        (WebCore::WebGLBuffer::create):
     87        (WebCore::WebGLBuffer::WebGLBuffer):
     88        * html/canvas/WebGLBuffer.h:
     89        * html/canvas/WebGLCompressedTextureATC.cpp:
     90        (WebCore::WebGLCompressedTextureATC::WebGLCompressedTextureATC):
     91        (WebCore::WebGLCompressedTextureATC::supported):
     92        * html/canvas/WebGLCompressedTextureATC.h:
     93        * html/canvas/WebGLCompressedTexturePVRTC.cpp:
     94        (WebCore::WebGLCompressedTexturePVRTC::WebGLCompressedTexturePVRTC):
     95        (WebCore::WebGLCompressedTexturePVRTC::supported):
     96        * html/canvas/WebGLCompressedTexturePVRTC.h:
     97        * html/canvas/WebGLCompressedTextureS3TC.cpp:
     98        (WebCore::WebGLCompressedTextureS3TC::WebGLCompressedTextureS3TC):
     99        (WebCore::WebGLCompressedTextureS3TC::supported):
     100        * html/canvas/WebGLCompressedTextureS3TC.h:
     101        * html/canvas/WebGLContextGroup.cpp:
     102        (WebCore::WebGLContextGroup::getAGraphicsContext3D):
     103        (WebCore::WebGLContextGroup::addContext):
     104        (WebCore::WebGLContextGroup::removeContext):
     105        (WebCore::WebGLContextGroup::loseContextGroup):
     106        * html/canvas/WebGLContextGroup.h:
     107        * html/canvas/WebGLContextObject.cpp:
     108        (WebCore::WebGLContextObject::WebGLContextObject):
     109        * html/canvas/WebGLContextObject.h:
     110        (WebCore::WebGLContextObject::context):
     111        * html/canvas/WebGLDebugRendererInfo.cpp:
     112        (WebCore::WebGLDebugRendererInfo::WebGLDebugRendererInfo):
     113        * html/canvas/WebGLDebugRendererInfo.h:
     114        * html/canvas/WebGLDebugShaders.cpp:
     115        (WebCore::WebGLDebugShaders::WebGLDebugShaders):
     116        * html/canvas/WebGLDebugShaders.h:
     117        * html/canvas/WebGLDepthTexture.cpp:
     118        (WebCore::WebGLDepthTexture::WebGLDepthTexture):
     119        * html/canvas/WebGLDepthTexture.h:
     120        * html/canvas/WebGLDrawBuffers.cpp:
     121        (WebCore::WebGLDrawBuffers::WebGLDrawBuffers):
     122        (WebCore::WebGLDrawBuffers::supported):
     123        (WebCore::WebGLDrawBuffers::satisfiesWebGLRequirements):
     124        * html/canvas/WebGLDrawBuffers.h:
     125        * html/canvas/WebGLExtension.cpp:
     126        (WebCore::WebGLExtension::WebGLExtension):
     127        * html/canvas/WebGLExtension.h:
     128        (WebCore::WebGLExtension::context):
     129        * html/canvas/WebGLFramebuffer.cpp:
     130        (WebCore::WebGLFramebuffer::create):
     131        (WebCore::WebGLFramebuffer::WebGLFramebuffer):
     132        * html/canvas/WebGLFramebuffer.h:
     133        * html/canvas/WebGLLoseContext.cpp:
     134        (WebCore::WebGLLoseContext::WebGLLoseContext):
     135        (WebCore::WebGLLoseContext::loseContext):
     136        * html/canvas/WebGLLoseContext.h:
     137        * html/canvas/WebGLObject.cpp:
     138        (WebCore::WebGLObject::WebGLObject):
     139        * html/canvas/WebGLObject.h:
     140        * html/canvas/WebGLProgram.cpp:
     141        (WebCore::WebGLProgram::create):
     142        (WebCore::WebGLProgram::WebGLProgram):
     143        * html/canvas/WebGLProgram.h:
     144        * html/canvas/WebGLRenderbuffer.cpp:
     145        (WebCore::WebGLRenderbuffer::create):
     146        (WebCore::WebGLRenderbuffer::WebGLRenderbuffer):
     147        * html/canvas/WebGLRenderbuffer.h:
     148        * html/canvas/WebGLRenderingContext.cpp: Move implementation to WebGLRenderingContextBase.cpp.
     149        * html/canvas/WebGLRenderingContext.h:  Move implementation to WebGLRenderingContextBase.h.
     150        * html/canvas/WebGLRenderingContext.idl:  Move implementation to WebGLRenderingContextBase.idl.
     151        * html/canvas/WebGLRenderingContextBase.cpp: Added.
     152        * html/canvas/WebGLRenderingContextBase.h: Added.
     153        * html/canvas/WebGLRenderingContextBase.idl: Added.
     154        * html/canvas/WebGLShader.cpp:
     155        (WebCore::WebGLShader::create):
     156        (WebCore::WebGLShader::WebGLShader):
     157        * html/canvas/WebGLShader.h:
     158        * html/canvas/WebGLSharedObject.cpp:
     159        (WebCore::WebGLSharedObject::WebGLSharedObject):
     160        * html/canvas/WebGLSharedObject.h:
     161        * html/canvas/WebGLTexture.cpp:
     162        (WebCore::WebGLTexture::create):
     163        (WebCore::WebGLTexture::WebGLTexture):
     164        * html/canvas/WebGLTexture.h:
     165        * html/canvas/WebGLVertexArrayObjectOES.cpp:
     166        (WebCore::WebGLVertexArrayObjectOES::create):
     167        (WebCore::WebGLVertexArrayObjectOES::WebGLVertexArrayObjectOES):
     168        * html/canvas/WebGLVertexArrayObjectOES.h:
     169
    11702015-01-19  Antti Koivisto  <antti@apple.com>
    2171
  • trunk/Source/WebCore/DerivedSources.cpp

    r178411 r178674  
    5555#include "JSOESTextureHalfFloatLinear.cpp"
    5656#include "JSOESVertexArrayObject.cpp"
     57#include "JSWebGL2RenderingContext.cpp"
    5758#include "JSWebGLActiveInfo.cpp"
    5859#include "JSWebGLBuffer.cpp"
     
    7172#include "JSWebGLRenderbuffer.cpp"
    7273#include "JSWebGLRenderingContext.cpp"
     74#include "JSWebGLRenderingContextBase.cpp"
    7375#include "JSWebGLShader.cpp"
    7476#include "JSWebGLShaderPrecisionFormat.cpp"
  • trunk/Source/WebCore/DerivedSources.make

    r178586 r178674  
    445445    $(WebCore)/html/canvas/WebGLProgram.idl \
    446446    $(WebCore)/html/canvas/WebGLRenderbuffer.idl \
     447    $(WebCore)/html/canvas/WebGLRenderingContextBase.idl \
    447448    $(WebCore)/html/canvas/WebGLRenderingContext.idl \
     449    $(WebCore)/html/canvas/WebGL2RenderingContext.idl \
    448450    $(WebCore)/html/canvas/WebGLShader.idl \
    449451    $(WebCore)/html/canvas/WebGLShaderPrecisionFormat.idl \
  • trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj

    r178586 r178674  
    764764      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
    765765    </ClCompile>
     766    <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSWebGL2RenderingContext.cpp">
     767      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
     768      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
     769      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
     770      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
     771      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
     772      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
     773    </ClCompile>
     774    <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSWebGLRenderingContextBase.cpp">
     775      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
     776      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
     777      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
     778      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
     779      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
     780      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
     781    </ClCompile>
    766782    <ClCompile Include="..\accessibility\AccessibilityNodeObject.cpp">
    767783      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
     
    778794      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
    779795    </ClCompile>
    780     <ClCompile Include="..\bindings\js\JSWebGLRenderingContextCustom.cpp" />
     796    <ClCompile Include="..\bindings\js\JSWebGL2RenderingContextCustom.cpp">
     797      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
     798      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
     799      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
     800      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
     801      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
     802      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
     803    </ClCompile>
     804    <ClCompile Include="..\bindings\js\JSWebGLRenderingContextBaseCustom.cpp">
     805      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
     806      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
     807      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
     808      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
     809      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
     810      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
     811    </ClCompile>
     812    <ClCompile Include="..\bindings\js\JSWebGLRenderingContextCustom.cpp">
     813      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
     814      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
     815      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
     816      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
     817      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
     818      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
     819    </ClCompile>
    781820    <ClCompile Include="..\css\CSSImageSetValue.cpp">
    782821      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
     
    66406679    <ClCompile Include="..\html\canvas\OESTextureHalfFloatLinear.cpp" />
    66416680    <ClCompile Include="..\html\canvas\OESVertexArrayObject.cpp" />
     6681    <ClCompile Include="..\html\canvas\WebGL2RenderingContext.cpp" />
    66426682    <ClCompile Include="..\html\canvas\WebGLBuffer.cpp" />
    66436683    <ClCompile Include="..\html\canvas\WebGLCompressedTextureATC.cpp" />
     
    66606700    <ClCompile Include="..\html\canvas\WebGLRenderbuffer.cpp" />
    66616701    <ClCompile Include="..\html\canvas\WebGLRenderingContext.cpp" />
     6702    <ClCompile Include="..\html\canvas\WebGLRenderingContextBase.cpp" />
    66626703    <ClCompile Include="..\html\canvas\WebGLShader.cpp" />
    66636704    <ClCompile Include="..\html\canvas\WebGLShaderPrecisionFormat.cpp" />
     
    1876318804    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSEXTFragDepth.h" />
    1876418805    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSEXTBlendMinMax.h" />
     18806    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWebGL2RenderingContext.h" />
     18807    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWebGLRenderingContextBase.h" />
    1876518808    <ClInclude Include="..\accessibility\AccessibilityNodeObject.h" />
    1876618809    <ClInclude Include="..\css\CSSImageSetValue.h" />
     
    1886218905    <ClInclude Include="..\html\canvas\OESTextureHalfFloatLinear.h" />
    1886318906    <ClInclude Include="..\html\canvas\OESVertexArrayObject.h" />
     18907    <ClInclude Include="..\html\canvas\WebGL2RenderingContext.h" />
    1886418908    <ClInclude Include="..\html\canvas\WebGLActiveInfo.h" />
    1886518909    <ClInclude Include="..\html\canvas\WebGLBuffer.h" />
     
    1888318927    <ClInclude Include="..\html\canvas\WebGLRenderbuffer.h" />
    1888418928    <ClInclude Include="..\html\canvas\WebGLRenderingContext.h" />
     18929    <ClInclude Include="..\html\canvas\WebGLRenderingContextBase.h" />
    1888518930    <ClInclude Include="..\html\canvas\WebGLShader.h" />
    1888618931    <ClInclude Include="..\html\canvas\WebGLShaderPrecisionFormat.h" />
  • trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters

    r178586 r178674  
    13841384      <Filter>platform\graphics</Filter>
    13851385    </ClCompile>
    1386     <ClCompile Include="..\platform\graphics\SegmentedFontData.cpp">
    1387       <Filter>platform\graphics</Filter>
    1388     </ClCompile>
    13891386    <ClCompile Include="..\platform\graphics\ShadowBlur.cpp">
    13901387      <Filter>platform\graphics</Filter>
     
    48464843      <Filter>platform\graphics</Filter>
    48474844    </ClCompile>
    4848     <ClCompile Include="..\platform\graphics\Font.cpp">
    4849       <Filter>platform\graphics</Filter>
    4850     </ClCompile>
    48514845    <ClCompile Include="..\platform\graphics\FontCache.cpp">
    48524846      <Filter>platform\graphics</Filter>
    48534847    </ClCompile>
    4854     <ClCompile Include="..\platform\graphics\FontData.cpp">
    4855       <Filter>platform\graphics</Filter>
    4856     </ClCompile>
    48574848    <ClCompile Include="..\platform\graphics\FontDescription.cpp">
    48584849      <Filter>platform\graphics</Filter>
     
    48624853    </ClCompile>
    48634854    <ClCompile Include="..\platform\graphics\FontGlyphs.cpp">
    4864       <Filter>platform\graphics</Filter>
    4865     </ClCompile>
    4866     <ClCompile Include="..\platform\graphics\FontFastPath.cpp">
    48674855      <Filter>platform\graphics</Filter>
    48684856    </ClCompile>
     
    71577145      <Filter>html\canvas</Filter>
    71587146    </ClCompile>
     7147    <ClCompile Include="..\platform\graphics\FontCascade.cpp" />
     7148    <ClCompile Include="..\platform\graphics\FontRanges.cpp" />
     7149    <ClCompile Include="..\bindings\js\JSWebGL2RenderingContextCustom.cpp">
     7150      <Filter>bindings\js</Filter>
     7151    </ClCompile>
     7152    <ClCompile Include="..\bindings\js\JSWebGLRenderingContextBaseCustom.cpp">
     7153      <Filter>bindings\js</Filter>
     7154    </ClCompile>
     7155    <ClCompile Include="..\html\canvas\WebGL2RenderingContext.cpp">
     7156      <Filter>html\canvas</Filter>
     7157    </ClCompile>
     7158    <ClCompile Include="..\html\canvas\WebGLRenderingContextBase.cpp">
     7159      <Filter>html\canvas</Filter>
     7160    </ClCompile>
     7161    <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSWebGL2RenderingContext.cpp">
     7162      <Filter>DerivedSources</Filter>
     7163    </ClCompile>
     7164    <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSWebGLRenderingContextBase.cpp">
     7165      <Filter>DerivedSources</Filter>
     7166    </ClCompile>
    71597167  </ItemGroup>
    71607168  <ItemGroup>
     
    84258433      <Filter>platform\graphics</Filter>
    84268434    </ClInclude>
    8427     <ClInclude Include="..\platform\graphics\SegmentedFontData.h">
    8428       <Filter>platform\graphics</Filter>
    8429     </ClInclude>
    84308435    <ClInclude Include="..\platform\graphics\ShadowBlur.h">
    84318436      <Filter>platform\graphics</Filter>
     
    1271312718      <Filter>platform\graphics</Filter>
    1271412719    </ClInclude>
    12715     <ClInclude Include="..\platform\graphics\Font.h">
    12716       <Filter>platform\graphics</Filter>
    12717     </ClInclude>
    1271812720    <ClInclude Include="..\platform\graphics\FontCache.h">
    12719       <Filter>platform\graphics</Filter>
    12720     </ClInclude>
    12721     <ClInclude Include="..\platform\graphics\FontData.h">
    1272212721      <Filter>platform\graphics</Filter>
    1272312722    </ClInclude>
     
    1506315062    <ClInclude Include="..\Modules\webdatabase\SQLStatementSync.h" />
    1506415063    <ClInclude Include="..\Modules\webdatabase\SQLTransactionBackendSync.h" />
     15064    <ClInclude Include="..\platform\graphics\FontCascade.h" />
     15065    <ClInclude Include="..\platform\graphics\FontRanges.h" />
     15066    <ClInclude Include="..\html\canvas\WebGL2RenderingContext.h">
     15067      <Filter>html\canvas</Filter>
     15068    </ClInclude>
     15069    <ClInclude Include="..\html\canvas\WebGLRenderingContextBase.h">
     15070      <Filter>html\canvas</Filter>
     15071    </ClInclude>
     15072    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWebGL2RenderingContext.h">
     15073      <Filter>DerivedSources</Filter>
     15074    </ClInclude>
     15075    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWebGLRenderingContextBase.h">
     15076      <Filter>DerivedSources</Filter>
     15077    </ClInclude>
    1506515078  </ItemGroup>
    1506615079  <ItemGroup>
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r178634 r178674  
    58505850                D3D4E972130C7CFE007BA540 /* HTMLSummaryElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D3D4E970130C7CFE007BA540 /* HTMLSummaryElement.cpp */; };
    58515851                D3D4E973130C7CFE007BA540 /* HTMLSummaryElement.h in Headers */ = {isa = PBXBuildFile; fileRef = D3D4E971130C7CFE007BA540 /* HTMLSummaryElement.h */; };
     5852                D3F3D3631A69B1900059FC2B /* JSWebGL2RenderingContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D3F3D3611A69B1900059FC2B /* JSWebGL2RenderingContext.cpp */; };
     5853                D3F3D3641A69B1900059FC2B /* JSWebGL2RenderingContext.h in Headers */ = {isa = PBXBuildFile; fileRef = D3F3D3621A69B1900059FC2B /* JSWebGL2RenderingContext.h */; };
     5854                D3F3D3671A69B1A50059FC2B /* JSWebGLRenderingContextBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D3F3D3651A69B1A50059FC2B /* JSWebGLRenderingContextBase.cpp */; };
     5855                D3F3D3681A69B1A50059FC2B /* JSWebGLRenderingContextBase.h in Headers */ = {isa = PBXBuildFile; fileRef = D3F3D3661A69B1A50059FC2B /* JSWebGLRenderingContextBase.h */; };
     5856                D3F3D3691A69B7B00059FC2B /* WebGLRenderingContextBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D3F3D35E1A69A5060059FC2B /* WebGLRenderingContextBase.cpp */; };
     5857                D3F3D36A1A69B7B90059FC2B /* WebGLRenderingContextBase.h in Headers */ = {isa = PBXBuildFile; fileRef = D3F3D35F1A69A5060059FC2B /* WebGLRenderingContextBase.h */; };
     5858                D3F3D36B1A69B7C50059FC2B /* JSWebGLRenderingContextBaseCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D3F3D35A1A69A3B00059FC2B /* JSWebGLRenderingContextBaseCustom.cpp */; };
     5859                D3F3D36C1A69B7D50059FC2B /* JSWebGL2RenderingContextCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D3F3D3591A69A3B00059FC2B /* JSWebGL2RenderingContextCustom.cpp */; };
     5860                D3F3D36D1A69B7DC0059FC2B /* WebGL2RenderingContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D3F3D35B1A69A5060059FC2B /* WebGL2RenderingContext.cpp */; };
     5861                D3F3D36E1A69B7E00059FC2B /* WebGL2RenderingContext.h in Headers */ = {isa = PBXBuildFile; fileRef = D3F3D35C1A69A5060059FC2B /* WebGL2RenderingContext.h */; };
    58525862                D619A307144E00BE004BC302 /* ChildListMutationScope.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D619A305144E00BE004BC302 /* ChildListMutationScope.cpp */; };
    58535863                D619A308144E00BE004BC302 /* ChildListMutationScope.h in Headers */ = {isa = PBXBuildFile; fileRef = D619A306144E00BE004BC302 /* ChildListMutationScope.h */; };
     
    1333213342                D3D4E970130C7CFE007BA540 /* HTMLSummaryElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLSummaryElement.cpp; sourceTree = "<group>"; };
    1333313343                D3D4E971130C7CFE007BA540 /* HTMLSummaryElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLSummaryElement.h; sourceTree = "<group>"; };
     13344                D3F3D3591A69A3B00059FC2B /* JSWebGL2RenderingContextCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGL2RenderingContextCustom.cpp; sourceTree = "<group>"; };
     13345                D3F3D35A1A69A3B00059FC2B /* JSWebGLRenderingContextBaseCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGLRenderingContextBaseCustom.cpp; sourceTree = "<group>"; };
     13346                D3F3D35B1A69A5060059FC2B /* WebGL2RenderingContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebGL2RenderingContext.cpp; path = canvas/WebGL2RenderingContext.cpp; sourceTree = "<group>"; };
     13347                D3F3D35C1A69A5060059FC2B /* WebGL2RenderingContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebGL2RenderingContext.h; path = canvas/WebGL2RenderingContext.h; sourceTree = "<group>"; };
     13348                D3F3D35D1A69A5060059FC2B /* WebGL2RenderingContext.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = WebGL2RenderingContext.idl; path = canvas/WebGL2RenderingContext.idl; sourceTree = "<group>"; };
     13349                D3F3D35E1A69A5060059FC2B /* WebGLRenderingContextBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebGLRenderingContextBase.cpp; path = canvas/WebGLRenderingContextBase.cpp; sourceTree = "<group>"; };
     13350                D3F3D35F1A69A5060059FC2B /* WebGLRenderingContextBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebGLRenderingContextBase.h; path = canvas/WebGLRenderingContextBase.h; sourceTree = "<group>"; };
     13351                D3F3D3601A69A5060059FC2B /* WebGLRenderingContextBase.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = WebGLRenderingContextBase.idl; path = canvas/WebGLRenderingContextBase.idl; sourceTree = "<group>"; };
     13352                D3F3D3611A69B1900059FC2B /* JSWebGL2RenderingContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGL2RenderingContext.cpp; sourceTree = "<group>"; };
     13353                D3F3D3621A69B1900059FC2B /* JSWebGL2RenderingContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGL2RenderingContext.h; sourceTree = "<group>"; };
     13354                D3F3D3651A69B1A50059FC2B /* JSWebGLRenderingContextBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGLRenderingContextBase.cpp; sourceTree = "<group>"; };
     13355                D3F3D3661A69B1A50059FC2B /* JSWebGLRenderingContextBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGLRenderingContextBase.h; sourceTree = "<group>"; };
    1333413356                D619A305144E00BE004BC302 /* ChildListMutationScope.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ChildListMutationScope.cpp; sourceTree = "<group>"; };
    1333513357                D619A306144E00BE004BC302 /* ChildListMutationScope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChildListMutationScope.h; sourceTree = "<group>"; };
     
    1583515857                                49C7B9BA1042D32F0009D447 /* WebGLRenderbuffer.h */,
    1583615858                                49C7B9BB1042D32F0009D447 /* WebGLRenderbuffer.idl */,
     15859                                D3F3D35E1A69A5060059FC2B /* WebGLRenderingContextBase.cpp */,
     15860                                D3F3D35F1A69A5060059FC2B /* WebGLRenderingContextBase.h */,
     15861                                D3F3D3601A69A5060059FC2B /* WebGLRenderingContextBase.idl */,
     15862                                D3F3D35B1A69A5060059FC2B /* WebGL2RenderingContext.cpp */,
     15863                                D3F3D35C1A69A5060059FC2B /* WebGL2RenderingContext.h */,
     15864                                D3F3D35D1A69A5060059FC2B /* WebGL2RenderingContext.idl */,
    1583715865                                49C7B9BF1042D32F0009D447 /* WebGLRenderingContext.cpp */,
    1583815866                                49C7B9C01042D32F0009D447 /* WebGLRenderingContext.h */,
     
    1890918937                                49C7B98A1042D2D30009D447 /* JSWebGLRenderbuffer.cpp */,
    1891018938                                49C7B98B1042D2D30009D447 /* JSWebGLRenderbuffer.h */,
     18939                                D3F3D3651A69B1A50059FC2B /* JSWebGLRenderingContextBase.cpp */,
     18940                                D3F3D3661A69B1A50059FC2B /* JSWebGLRenderingContextBase.h */,
     18941                                D3F3D3611A69B1900059FC2B /* JSWebGL2RenderingContext.cpp */,
     18942                                D3F3D3621A69B1900059FC2B /* JSWebGL2RenderingContext.h */,
    1891118943                                49EED1401051969400099FAB /* JSWebGLRenderingContext.cpp */,
    1891218944                                49EED1411051969400099FAB /* JSWebGLRenderingContext.h */,
     
    2100321035                                BE6DF708171CA2C500DD52B8 /* JSVideoTrackCustom.cpp */,
    2100421036                                BE6DF70A171CA2C500DD52B8 /* JSVideoTrackListCustom.cpp */,
     21037                                D3F3D35A1A69A3B00059FC2B /* JSWebGLRenderingContextBaseCustom.cpp */,
    2100521038                                49EED14C1051971A00099FAB /* JSWebGLRenderingContextCustom.cpp */,
     21039                                D3F3D3591A69A3B00059FC2B /* JSWebGL2RenderingContextCustom.cpp */,
    2100621040                                BC275B7811C5D1C300C9206C /* JSWebKitPointCustom.cpp */,
    2100721041                                E1CA5CBB0E8CDCAF00E8EF90 /* JSWorkerCustom.cpp */,
     
    2508725121                                84224184107E77F400766A87 /* JSSVGFEMorphologyElement.h in Headers */,
    2508825122                                B2FA3D8B0AB75A6F000E5AC4 /* JSSVGFEOffsetElement.h in Headers */,
     25123                                D3F3D36E1A69B7E00059FC2B /* WebGL2RenderingContext.h in Headers */,
    2508925124                                B2FA3D8D0AB75A6F000E5AC4 /* JSSVGFEPointLightElement.h in Headers */,
    2509025125                                B2FA3D8F0AB75A6F000E5AC4 /* JSSVGFESpecularLightingElement.h in Headers */,
    2509125126                                B2FA3D910AB75A6F000E5AC4 /* JSSVGFESpotLightElement.h in Headers */,
     25127                                D3F3D36A1A69B7B90059FC2B /* WebGLRenderingContextBase.h in Headers */,
    2509225128                                B2FA3D930AB75A6F000E5AC4 /* JSSVGFETileElement.h in Headers */,
    2509325129                                B2FA3D950AB75A6F000E5AC4 /* JSSVGFETurbulenceElement.h in Headers */,
     
    2548925525                                2DCB837919F99BBA00A7FBE4 /* NSSharingServicePickerSPI.h in Headers */,
    2549025526                                2DCB837A19F99BBA00A7FBE4 /* NSSharingServiceSPI.h in Headers */,
     25527                                D3F3D3641A69B1900059FC2B /* JSWebGL2RenderingContext.h in Headers */,
    2549125528                                CE1252531A1BEC0600864480 /* NSStringSPI.h in Headers */,
    2549225529                                CE1252551A1BEC0E00864480 /* NSURLDownloadSPI.h in Headers */,
     
    2635126388                                B2227AB80D00BF220071B782 /* SVGStyleElement.h in Headers */,
    2635226389                                B2227ABB0D00BF220071B782 /* SVGSVGElement.h in Headers */,
     26390                                D3F3D3681A69B1A50059FC2B /* JSWebGLRenderingContextBase.h in Headers */,
    2635326391                                B2227ABE0D00BF220071B782 /* SVGSwitchElement.h in Headers */,
    2635426392                                B2227AC10D00BF220071B782 /* SVGSymbolElement.h in Headers */,
     
    2873328771                                1A2C40AB0DEB55AA005AF19E /* JSTextCustom.cpp in Sources */,
    2873428772                                933A14B80B7D1D5200A53FFD /* JSTextEvent.cpp in Sources */,
     28773                                D3F3D36B1A69B7C50059FC2B /* JSWebGLRenderingContextBaseCustom.cpp in Sources */,
    2873528774                                BCEF45F50E687B5C001C1287 /* JSTextMetrics.cpp in Sources */,
    2873628775                                070756941422668D00414161 /* JSTextTrack.cpp in Sources */,
     
    2875828797                                7C73FB19191EF808007DE061 /* JSUserMessageHandlersNamespaceCustom.cpp in Sources */,
    2875928798                                15C77094100D3CA8005BA267 /* JSValidityState.cpp in Sources */,
     28799                                D3F3D3671A69B1A50059FC2B /* JSWebGLRenderingContextBase.cpp in Sources */,
    2876028800                                CDE83DB6183D352A0031EAA3 /* JSVideoPlaybackQuality.cpp in Sources */,
    2876128801                                07C59B5F17F4B208000FBCBB /* JSVideoStreamTrack.cpp in Sources */,
     
    2904129081                                0014628A103CD1DE000B20DB /* OriginAccessEntry.cpp in Sources */,
    2904229082                                FE9E89FB16E2DC0500A908F8 /* OriginLock.cpp in Sources */,
     29083                                D3F3D36D1A69B7DC0059FC2B /* WebGL2RenderingContext.cpp in Sources */,
    2904329084                                FD581FAE1520F91F003A7A75 /* OscillatorNode.cpp in Sources */,
    2904429085                                1A0D57360A5C77FE007EDD4C /* OverflowEvent.cpp in Sources */,
     
    2911729158                                5189F0DE10B46B0E00F3C739 /* PopStateEvent.cpp in Sources */,
    2911829159                                93F19AF808245E59001E9ABC /* Position.cpp in Sources */,
     29160                                D3F3D3691A69B7B00059FC2B /* WebGLRenderingContextBase.cpp in Sources */,
    2911929161                                37919C230B7D188600A56998 /* PositionIterator.cpp in Sources */,
    2912029162                                B776D43D1104527500BEB0EC /* PrintContext.cpp in Sources */,
     
    2947929521                                97BC6A471505F081001B74AC /* SQLStatement.cpp in Sources */,
    2948029522                                FE8A674716CDD19E00930BF8 /* SQLStatementBackend.cpp in Sources */,
     29523                                D3F3D3631A69B1900059FC2B /* JSWebGL2RenderingContext.cpp in Sources */,
    2948129524                                97BC6A4F1505F081001B74AC /* SQLTransaction.cpp in Sources */,
    2948229525                                2D4F96F51A1ECC240098BF88 /* TextIndicator.cpp in Sources */,
     
    2996130004                                CD82030D1395AB6A00F956C6 /* WebVideoFullscreenHUDWindowController.mm in Sources */,
    2996230005                                3FBC4AF3189881560046EE38 /* WebVideoFullscreenInterfaceAVKit.mm in Sources */,
     30006                                D3F3D36C1A69B7D50059FC2B /* JSWebGL2RenderingContextCustom.cpp in Sources */,
    2996330007                                65FD466619B596F6001E2B4D /* WebVideoFullscreenModelVideoElement.mm in Sources */,
    2996430008                                F12171F516A8CED2000053CA /* WebVTTElement.cpp in Sources */,
  • trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp

    r178411 r178674  
    132132#include "JSVideoTrackCustom.cpp"
    133133#include "JSVideoTrackListCustom.cpp"
     134#include "JSWebGL2RenderingContextCustom.cpp"
     135#include "JSWebGLRenderingContextBaseCustom.cpp"
     136#include "JSWebGLRenderingContextCustom.cpp"
    134137#include "JSWebKitPointCustom.cpp"
    135138#include "JSWorkerCustom.cpp"
  • trunk/Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp

    r178411 r178674  
    11/*
    2  * Copyright (C) 2009 Apple Inc. All rights reserved.
     2 * Copyright (C) 2015 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    3333
    3434#if ENABLE(WEBGL)
     35#include "JSWebGL2RenderingContext.h"
    3536#include "JSWebGLRenderingContext.h"
     37#include "WebGL2RenderingContext.h"
    3638#include "WebGLRenderingContext.h"
    3739#endif
     
    5254
    5355#if ENABLE(WEBGL)
    54     if (object->is3d())
     56    if (object->isWebGL1())
    5557        return wrap<JSWebGLRenderingContext>(globalObject, static_cast<WebGLRenderingContext*>(object));
     58    if (object->isWebGL2())
     59        return wrap<JSWebGL2RenderingContext>(globalObject, static_cast<WebGL2RenderingContext*>(object));
    5660#endif
    5761    ASSERT_WITH_SECURITY_IMPLICATION(object->is2d());
  • trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp

    r178411 r178674  
    3838
    3939#if ENABLE(WEBGL)
    40 #include "JSWebGLRenderingContext.h"
     40#include "JSWebGLRenderingContextBase.h"
    4141#endif
    4242
  • trunk/Source/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp

    r178411 r178674  
    3636#if ENABLE(WEBGL)
    3737#include "JSDictionary.h"
    38 #include "JSWebGLRenderingContext.h"
     38#include "JSWebGLRenderingContextBase.h"
    3939#include "WebGLContextAttributes.h"
    4040#endif
  • trunk/Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp

    r178411 r178674  
    11/*
    2  * Copyright (C) 2009 Apple Inc. All rights reserved.
     2 * Copyright (C) 2015 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2727
    2828#if ENABLE(WEBGL)
    29 
    3029#include "JSWebGLRenderingContext.h"
    31 
    32 #include "ANGLEInstancedArrays.h"
    33 #include "EXTBlendMinMax.h"
    34 #include "EXTFragDepth.h"
    35 #include "EXTShaderTextureLOD.h"
    36 #include "EXTTextureFilterAnisotropic.h"
    37 #include "EXTsRGB.h"
    38 #include "ExceptionCode.h"
    39 #include "HTMLCanvasElement.h"
    40 #include "HTMLImageElement.h"
    41 #include "JSANGLEInstancedArrays.h"
    42 #include "JSEXTBlendMinMax.h"
    43 #include "JSEXTFragDepth.h"
    44 #include "JSEXTShaderTextureLOD.h"
    45 #include "JSEXTTextureFilterAnisotropic.h"
    46 #include "JSEXTsRGB.h"
    47 #include "JSHTMLCanvasElement.h"
    48 #include "JSHTMLImageElement.h"
    49 #include "JSImageData.h"
    50 #include "JSOESElementIndexUint.h"
    51 #include "JSOESStandardDerivatives.h"
    52 #include "JSOESTextureFloat.h"
    53 #include "JSOESTextureFloatLinear.h"
    54 #include "JSOESTextureHalfFloat.h"
    55 #include "JSOESTextureHalfFloatLinear.h"
    56 #include "JSOESVertexArrayObject.h"
    57 #include "JSWebGLBuffer.h"
    58 #include "JSWebGLCompressedTextureATC.h"
    59 #include "JSWebGLCompressedTexturePVRTC.h"
    60 #include "JSWebGLCompressedTextureS3TC.h"
    61 #include "JSWebGLDebugRendererInfo.h"
    62 #include "JSWebGLDebugShaders.h"
    63 #include "JSWebGLDepthTexture.h"
    64 #include "JSWebGLDrawBuffers.h"
    65 #include "JSWebGLFramebuffer.h"
    66 #include "JSWebGLLoseContext.h"
    67 #include "JSWebGLProgram.h"
    68 #include "JSWebGLRenderbuffer.h"
    69 #include "JSWebGLShader.h"
    70 #include "JSWebGLTexture.h"
    71 #include "JSWebGLUniformLocation.h"
    72 #include "JSWebGLVertexArrayObjectOES.h"
    73 #include "JSWebKitCSSMatrix.h"
    74 #include "NotImplemented.h"
    75 #include "OESElementIndexUint.h"
    76 #include "OESStandardDerivatives.h"
    77 #include "OESTextureFloat.h"
    78 #include "OESTextureFloatLinear.h"
    79 #include "OESTextureHalfFloat.h"
    80 #include "OESTextureHalfFloatLinear.h"
    81 #include "OESVertexArrayObject.h"
    82 #include "WebGLBuffer.h"
    83 #include "WebGLCompressedTextureATC.h"
    84 #include "WebGLCompressedTexturePVRTC.h"
    85 #include "WebGLCompressedTextureS3TC.h"
    86 #include "WebGLDebugRendererInfo.h"
    87 #include "WebGLDebugShaders.h"
    88 #include "WebGLDepthTexture.h"
    89 #include "WebGLDrawBuffers.h"
    90 #include "WebGLExtension.h"
    91 #include "WebGLFramebuffer.h"
    92 #include "WebGLGetInfo.h"
    93 #include "WebGLLoseContext.h"
    94 #include "WebGLProgram.h"
    95 #include "WebGLRenderingContext.h"
    96 #include "WebGLVertexArrayObjectOES.h"
    97 #include <runtime/Error.h>
    98 #include <runtime/JSTypedArrays.h>
    99 #include <runtime/TypedArrayInlines.h>
    100 #include <runtime/TypedArrays.h>
    101 #include <wtf/FastMalloc.h>
    102 
    103 #if ENABLE(VIDEO)
    104 #include "HTMLVideoElement.h"
    105 #include "JSHTMLVideoElement.h"
    106 #endif
    10730
    10831using namespace JSC;
    10932
    11033namespace WebCore {
    111 
    112 static JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, const WebGLGetInfo& info)
    113 {
    114     switch (info.getType()) {
    115     case WebGLGetInfo::kTypeBool:
    116         return jsBoolean(info.getBool());
    117     case WebGLGetInfo::kTypeBoolArray: {
    118         MarkedArgumentBuffer list;
    119         const Vector<bool>& value = info.getBoolArray();
    120         for (size_t ii = 0; ii < value.size(); ++ii)
    121             list.append(jsBoolean(value[ii]));
    122         return constructArray(exec, 0, globalObject, list);
    123     }
    124     case WebGLGetInfo::kTypeFloat:
    125         return jsNumber(info.getFloat());
    126     case WebGLGetInfo::kTypeInt:
    127         return jsNumber(info.getInt());
    128     case WebGLGetInfo::kTypeNull:
    129         return jsNull();
    130     case WebGLGetInfo::kTypeString:
    131         return jsStringWithCache(exec, info.getString());
    132     case WebGLGetInfo::kTypeUnsignedInt:
    133         return jsNumber(info.getUnsignedInt());
    134     case WebGLGetInfo::kTypeWebGLBuffer:
    135         return toJS(exec, globalObject, info.getWebGLBuffer());
    136     case WebGLGetInfo::kTypeWebGLFloatArray:
    137         return toJS(exec, globalObject, info.getWebGLFloatArray());
    138     case WebGLGetInfo::kTypeWebGLFramebuffer:
    139         return toJS(exec, globalObject, info.getWebGLFramebuffer());
    140     case WebGLGetInfo::kTypeWebGLIntArray:
    141         return toJS(exec, globalObject, info.getWebGLIntArray());
    142     // FIXME: implement WebGLObjectArray
    143     // case WebGLGetInfo::kTypeWebGLObjectArray:
    144     case WebGLGetInfo::kTypeWebGLProgram:
    145         return toJS(exec, globalObject, info.getWebGLProgram());
    146     case WebGLGetInfo::kTypeWebGLRenderbuffer:
    147         return toJS(exec, globalObject, info.getWebGLRenderbuffer());
    148     case WebGLGetInfo::kTypeWebGLTexture:
    149         return toJS(exec, globalObject, info.getWebGLTexture());
    150     case WebGLGetInfo::kTypeWebGLUnsignedByteArray:
    151         return toJS(exec, globalObject, info.getWebGLUnsignedByteArray());
    152     case WebGLGetInfo::kTypeWebGLUnsignedIntArray:
    153         return toJS(exec, globalObject, info.getWebGLUnsignedIntArray());
    154     case WebGLGetInfo::kTypeWebGLVertexArrayObjectOES:
    155         return toJS(exec, globalObject, info.getWebGLVertexArrayObjectOES());
    156     default:
    157         notImplemented();
    158         return jsUndefined();
    159     }
    160 }
    161 
    162 enum ObjectType {
    163     kBuffer, kRenderbuffer, kTexture, kVertexAttrib
    164 };
    165 
    166 static JSValue getObjectParameter(JSWebGLRenderingContext* obj, ExecState* exec, ObjectType objectType)
    167 {
    168     if (exec->argumentCount() != 2)
    169         return exec->vm().throwException(exec, createNotEnoughArgumentsError(exec));
    170 
    171     ExceptionCode ec = 0;
    172     WebGLRenderingContext& context = obj->impl();
    173     unsigned target = exec->uncheckedArgument(0).toInt32(exec);
    174     if (exec->hadException())
    175         return jsUndefined();
    176     unsigned pname = exec->uncheckedArgument(1).toInt32(exec);
    177     if (exec->hadException())
    178         return jsUndefined();
    179     WebGLGetInfo info;
    180     switch (objectType) {
    181     case kBuffer:
    182         info = context.getBufferParameter(target, pname, ec);
    183         break;
    184     case kRenderbuffer:
    185         info = context.getRenderbufferParameter(target, pname, ec);
    186         break;
    187     case kTexture:
    188         info = context.getTexParameter(target, pname, ec);
    189         break;
    190     case kVertexAttrib:
    191         // target => index
    192         info = context.getVertexAttrib(target, pname, ec);
    193         break;
    194     default:
    195         notImplemented();
    196         break;
    197     }
    198     if (ec) {
    199         setDOMException(exec, ec);
    200         return jsUndefined();
    201     }
    202     return toJS(exec, obj->globalObject(), info);
    203 }
    204 
    205 enum WhichProgramCall {
    206     kProgramParameter, kUniform
    207 };
    208 
    209 static JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, WebGLExtension* extension)
    210 {
    211     if (!extension)
    212         return jsNull();
    213     switch (extension->getName()) {
    214     case WebGLExtension::WebGLLoseContextName:
    215         return toJS(exec, globalObject, static_cast<WebGLLoseContext*>(extension));
    216     case WebGLExtension::EXTShaderTextureLODName:
    217         return toJS(exec, globalObject, static_cast<EXTShaderTextureLOD*>(extension));
    218     case WebGLExtension::EXTTextureFilterAnisotropicName:
    219         return toJS(exec, globalObject, static_cast<EXTTextureFilterAnisotropic*>(extension));
    220     case WebGLExtension::EXTsRGBName:
    221         return toJS(exec, globalObject, static_cast<EXTsRGB*>(extension));
    222     case WebGLExtension::EXTFragDepthName:
    223         return toJS(exec, globalObject, static_cast<EXTFragDepth*>(extension));
    224     case WebGLExtension::EXTBlendMinMaxName:
    225         return toJS(exec, globalObject, static_cast<EXTBlendMinMax*>(extension));
    226     case WebGLExtension::OESStandardDerivativesName:
    227         return toJS(exec, globalObject, static_cast<OESStandardDerivatives*>(extension));
    228     case WebGLExtension::OESTextureFloatName:
    229         return toJS(exec, globalObject, static_cast<OESTextureFloat*>(extension));
    230     case WebGLExtension::OESTextureFloatLinearName:
    231         return toJS(exec, globalObject, static_cast<OESTextureFloatLinear*>(extension));
    232     case WebGLExtension::OESTextureHalfFloatName:
    233         return toJS(exec, globalObject, static_cast<OESTextureHalfFloat*>(extension));
    234     case WebGLExtension::OESTextureHalfFloatLinearName:
    235         return toJS(exec, globalObject, static_cast<OESTextureHalfFloatLinear*>(extension));
    236     case WebGLExtension::OESVertexArrayObjectName:
    237         return toJS(exec, globalObject, static_cast<OESVertexArrayObject*>(extension));
    238     case WebGLExtension::OESElementIndexUintName:
    239         return toJS(exec, globalObject, static_cast<OESElementIndexUint*>(extension));
    240     case WebGLExtension::WebGLDebugRendererInfoName:
    241         return toJS(exec, globalObject, static_cast<WebGLDebugRendererInfo*>(extension));
    242     case WebGLExtension::WebGLDebugShadersName:
    243         return toJS(exec, globalObject, static_cast<WebGLDebugShaders*>(extension));
    244     case WebGLExtension::WebGLCompressedTextureATCName:
    245         return toJS(exec, globalObject, static_cast<WebGLCompressedTextureATC*>(extension));
    246     case WebGLExtension::WebGLCompressedTexturePVRTCName:
    247         return toJS(exec, globalObject, static_cast<WebGLCompressedTexturePVRTC*>(extension));
    248     case WebGLExtension::WebGLCompressedTextureS3TCName:
    249         return toJS(exec, globalObject, static_cast<WebGLCompressedTextureS3TC*>(extension));
    250     case WebGLExtension::WebGLDepthTextureName:
    251         return toJS(exec, globalObject, static_cast<WebGLDepthTexture*>(extension));
    252     case WebGLExtension::WebGLDrawBuffersName:
    253         return toJS(exec, globalObject, static_cast<WebGLDrawBuffers*>(extension));
    254     case WebGLExtension::ANGLEInstancedArraysName:
    255         return toJS(exec, globalObject, static_cast<ANGLEInstancedArrays*>(extension));
    256     }
    257     ASSERT_NOT_REACHED();
    258     return jsNull();
    259 }
    26034
    26135void JSWebGLRenderingContext::visitAdditionalChildren(SlotVisitor& visitor)
     
    26438}
    26539
    266 JSValue JSWebGLRenderingContext::getAttachedShaders(ExecState* exec)
    267 {
    268     if (exec->argumentCount() < 1)
    269         return exec->vm().throwException(exec, createNotEnoughArgumentsError(exec));
    270     ExceptionCode ec = 0;
    271     WebGLRenderingContext& context = impl();
    272     WebGLProgram* program = JSWebGLProgram::toWrapped(exec->uncheckedArgument(0));
    273     if (!program && !exec->uncheckedArgument(0).isUndefinedOrNull())
    274         return throwTypeError(exec);
    275     Vector<RefPtr<WebGLShader>> shaders;
    276     bool succeed = context.getAttachedShaders(program, shaders, ec);
    277     if (ec) {
    278         setDOMException(exec, ec);
    279         return jsNull();
    280     }
    281     if (!succeed)
    282         return jsNull();
    283     JSC::MarkedArgumentBuffer list;
    284     for (size_t ii = 0; ii < shaders.size(); ++ii)
    285         list.append(toJS(exec, globalObject(), shaders[ii].get()));
    286     return constructArray(exec, 0, globalObject(), list);
    287 }
    288 
    289 JSValue JSWebGLRenderingContext::getExtension(ExecState* exec)
    290 {
    291     if (exec->argumentCount() < 1)
    292         return exec->vm().throwException(exec, createNotEnoughArgumentsError(exec));
    293 
    294     WebGLRenderingContext& context = impl();
    295     const String name = exec->uncheckedArgument(0).toString(exec)->value(exec);
    296     if (exec->hadException())
    297         return jsUndefined();
    298     WebGLExtension* extension = context.getExtension(name);
    299     return toJS(exec, globalObject(), extension);
    300 }
    301 
    302 JSValue JSWebGLRenderingContext::getBufferParameter(ExecState* exec)
    303 {
    304     return getObjectParameter(this, exec, kBuffer);
    305 }
    306 
    307 JSValue JSWebGLRenderingContext::getFramebufferAttachmentParameter(ExecState* exec)
    308 {
    309     if (exec->argumentCount() != 3)
    310         return exec->vm().throwException(exec, createNotEnoughArgumentsError(exec));
    311 
    312     ExceptionCode ec = 0;
    313     WebGLRenderingContext& context = impl();
    314     unsigned target = exec->uncheckedArgument(0).toInt32(exec);
    315     if (exec->hadException())
    316         return jsUndefined();
    317     unsigned attachment = exec->uncheckedArgument(1).toInt32(exec);
    318     if (exec->hadException())
    319         return jsUndefined();
    320     unsigned pname = exec->uncheckedArgument(2).toInt32(exec);
    321     if (exec->hadException())
    322         return jsUndefined();
    323     WebGLGetInfo info = context.getFramebufferAttachmentParameter(target, attachment, pname, ec);
    324     if (ec) {
    325         setDOMException(exec, ec);
    326         return jsUndefined();
    327     }
    328     return toJS(exec, globalObject(), info);
    329 }
    330 
    331 JSValue JSWebGLRenderingContext::getParameter(ExecState* exec)
    332 {
    333     if (exec->argumentCount() != 1)
    334         return exec->vm().throwException(exec, createNotEnoughArgumentsError(exec));
    335 
    336     ExceptionCode ec = 0;
    337     WebGLRenderingContext& context = impl();
    338     unsigned pname = exec->uncheckedArgument(0).toInt32(exec);
    339     if (exec->hadException())
    340         return jsUndefined();
    341     WebGLGetInfo info = context.getParameter(pname, ec);
    342     if (ec) {
    343         setDOMException(exec, ec);
    344         return jsUndefined();
    345     }
    346     return toJS(exec, globalObject(), info);
    347 }
    348 
    349 JSValue JSWebGLRenderingContext::getProgramParameter(ExecState* exec)
    350 {
    351     if (exec->argumentCount() != 2)
    352         return exec->vm().throwException(exec, createNotEnoughArgumentsError(exec));
    353 
    354     ExceptionCode ec = 0;
    355     WebGLRenderingContext& context = impl();
    356     WebGLProgram* program = JSWebGLProgram::toWrapped(exec->uncheckedArgument(0));
    357     if (!program && !exec->uncheckedArgument(0).isUndefinedOrNull())
    358         return throwTypeError(exec);
    359     unsigned pname = exec->uncheckedArgument(1).toInt32(exec);
    360     if (exec->hadException())
    361         return jsUndefined();
    362     WebGLGetInfo info = context.getProgramParameter(program, pname, ec);
    363     if (ec) {
    364         setDOMException(exec, ec);
    365         return jsUndefined();
    366     }
    367     return toJS(exec, globalObject(), info);
    368 }
    369 
    370 JSValue JSWebGLRenderingContext::getRenderbufferParameter(ExecState* exec)
    371 {
    372     return getObjectParameter(this, exec, kRenderbuffer);
    373 }
    374 
    375 JSValue JSWebGLRenderingContext::getShaderParameter(ExecState* exec)
    376 {
    377     if (exec->argumentCount() != 2)
    378         return exec->vm().throwException(exec, createNotEnoughArgumentsError(exec));
    379 
    380     ExceptionCode ec = 0;
    381     WebGLRenderingContext& context = impl();
    382     if (!exec->uncheckedArgument(0).isUndefinedOrNull() && !exec->uncheckedArgument(0).inherits(JSWebGLShader::info()))
    383         return throwTypeError(exec);
    384     WebGLShader* shader = JSWebGLShader::toWrapped(exec->uncheckedArgument(0));
    385     unsigned pname = exec->uncheckedArgument(1).toInt32(exec);
    386     if (exec->hadException())
    387         return jsUndefined();
    388     WebGLGetInfo info = context.getShaderParameter(shader, pname, ec);
    389     if (ec) {
    390         setDOMException(exec, ec);
    391         return jsUndefined();
    392     }
    393     return toJS(exec, globalObject(), info);
    394 }
    395 
    396 JSValue JSWebGLRenderingContext::getSupportedExtensions(ExecState* exec)
    397 {
    398     WebGLRenderingContext& context = impl();
    399     if (context.isContextLost())
    400         return jsNull();
    401     Vector<String> value = context.getSupportedExtensions();
    402     MarkedArgumentBuffer list;
    403     for (size_t ii = 0; ii < value.size(); ++ii)
    404         list.append(jsStringWithCache(exec, value[ii]));
    405     return constructArray(exec, 0, globalObject(), list);
    406 }
    407 
    408 JSValue JSWebGLRenderingContext::getTexParameter(ExecState* exec)
    409 {
    410     return getObjectParameter(this, exec, kTexture);
    411 }
    412 
    413 JSValue JSWebGLRenderingContext::getUniform(ExecState* exec)
    414 {
    415     if (exec->argumentCount() != 2)
    416         return exec->vm().throwException(exec, createNotEnoughArgumentsError(exec));
    417 
    418     ExceptionCode ec = 0;
    419     WebGLRenderingContext& context = impl();
    420     WebGLProgram* program = JSWebGLProgram::toWrapped(exec->uncheckedArgument(0));
    421     if (!program && !exec->uncheckedArgument(0).isUndefinedOrNull())
    422         return throwTypeError(exec);
    423     WebGLUniformLocation* location = JSWebGLUniformLocation::toWrapped(exec->uncheckedArgument(1));
    424     if (!location && !exec->uncheckedArgument(1).isUndefinedOrNull())
    425         return throwTypeError(exec);
    426     WebGLGetInfo info = context.getUniform(program, location, ec);
    427     if (ec) {
    428         setDOMException(exec, ec);
    429         return jsUndefined();
    430     }
    431     return toJS(exec, globalObject(), info);
    432 }
    433 
    434 JSValue JSWebGLRenderingContext::getVertexAttrib(ExecState* exec)
    435 {
    436     return getObjectParameter(this, exec, kVertexAttrib);
    437 }
    438 
    439 template<typename T, size_t inlineCapacity>
    440 bool toVector(JSC::ExecState* exec, JSC::JSValue value, Vector<T, inlineCapacity>& vector)
    441 {
    442     if (!value.isObject())
    443         return false;
    444 
    445     JSC::JSObject* object = asObject(value);
    446     int32_t length = object->get(exec, exec->vm().propertyNames->length).toInt32(exec);
    447 
    448     if (!vector.tryReserveCapacity(length))
    449         return false;
    450     vector.resize(length);
    451 
    452     for (int32_t i = 0; i < length; ++i) {
    453         JSC::JSValue v = object->get(exec, i);
    454         if (exec->hadException())
    455             return false;
    456         vector[i] = static_cast<T>(v.toNumber(exec));
    457     }
    458 
    459     return true;
    460 }
    461 
    462 enum DataFunctionToCall {
    463     f_uniform1v, f_uniform2v, f_uniform3v, f_uniform4v,
    464     f_vertexAttrib1v, f_vertexAttrib2v, f_vertexAttrib3v, f_vertexAttrib4v
    465 };
    466 
    467 enum DataFunctionMatrixToCall {
    468     f_uniformMatrix2fv, f_uniformMatrix3fv, f_uniformMatrix4fv
    469 };
    470 
    471 static bool functionForUniform(DataFunctionToCall f)
    472 {
    473     switch (f) {
    474     case f_uniform1v:
    475     case f_uniform2v:
    476     case f_uniform3v:
    477     case f_uniform4v:
    478         return true;
    479     default: break;
    480     }
    481     return false;
    482 }
    483 
    484 static JSC::JSValue dataFunctionf(DataFunctionToCall f, JSC::ExecState* exec, WebGLRenderingContext& context)
    485 {
    486     if (exec->argumentCount() != 2)
    487         return exec->vm().throwException(exec, createNotEnoughArgumentsError(exec));
    488    
    489     WebGLUniformLocation* location = 0;
    490     long index = -1;
    491    
    492     if (functionForUniform(f)) {
    493         location = JSWebGLUniformLocation::toWrapped(exec->uncheckedArgument(0));
    494         if (!location && !exec->uncheckedArgument(0).isUndefinedOrNull())
    495             return throwTypeError(exec);
    496     } else
    497         index = exec->uncheckedArgument(0).toInt32(exec);
    498 
    499     if (exec->hadException())
    500         return jsUndefined();
    501        
    502     RefPtr<Float32Array> webGLArray = toFloat32Array(exec->uncheckedArgument(1));
    503     if (exec->hadException())   
    504         return jsUndefined();
    505        
    506     ExceptionCode ec = 0;
    507     if (webGLArray) {
    508         switch (f) {
    509         case f_uniform1v:
    510             context.uniform1fv(location, webGLArray.get(), ec);
    511             break;
    512         case f_uniform2v:
    513             context.uniform2fv(location, webGLArray.get(), ec);
    514             break;
    515         case f_uniform3v:
    516             context.uniform3fv(location, webGLArray.get(), ec);
    517             break;
    518         case f_uniform4v:
    519             context.uniform4fv(location, webGLArray.get(), ec);
    520             break;
    521         case f_vertexAttrib1v:
    522             context.vertexAttrib1fv(index, webGLArray.get());
    523             break;
    524         case f_vertexAttrib2v:
    525             context.vertexAttrib2fv(index, webGLArray.get());
    526             break;
    527         case f_vertexAttrib3v:
    528             context.vertexAttrib3fv(index, webGLArray.get());
    529             break;
    530         case f_vertexAttrib4v:
    531             context.vertexAttrib4fv(index, webGLArray.get());
    532             break;
    533         }
    534        
    535         setDOMException(exec, ec);
    536         return jsUndefined();
    537     }
    538 
    539     Vector<float, 64> array;
    540     if (!toVector(exec, exec->uncheckedArgument(1), array))
    541         return throwTypeError(exec);
    542 
    543     switch (f) {
    544     case f_uniform1v:
    545         context.uniform1fv(location, array.data(), array.size(), ec);
    546         break;
    547     case f_uniform2v:
    548         context.uniform2fv(location, array.data(), array.size(), ec);
    549         break;
    550     case f_uniform3v:
    551         context.uniform3fv(location, array.data(), array.size(), ec);
    552         break;
    553     case f_uniform4v:
    554         context.uniform4fv(location, array.data(), array.size(), ec);
    555         break;
    556     case f_vertexAttrib1v:
    557         context.vertexAttrib1fv(index, array.data(), array.size());
    558         break;
    559     case f_vertexAttrib2v:
    560         context.vertexAttrib2fv(index, array.data(), array.size());
    561         break;
    562     case f_vertexAttrib3v:
    563         context.vertexAttrib3fv(index, array.data(), array.size());
    564         break;
    565     case f_vertexAttrib4v:
    566         context.vertexAttrib4fv(index, array.data(), array.size());
    567         break;
    568     }
    569    
    570     setDOMException(exec, ec);
    571     return jsUndefined();
    572 }
    573 
    574 static JSC::JSValue dataFunctioni(DataFunctionToCall f, JSC::ExecState* exec, WebGLRenderingContext& context)
    575 {
    576     if (exec->argumentCount() != 2)
    577         return exec->vm().throwException(exec, createNotEnoughArgumentsError(exec));
    578 
    579     WebGLUniformLocation* location = JSWebGLUniformLocation::toWrapped(exec->uncheckedArgument(0));
    580     if (!location && !exec->uncheckedArgument(0).isUndefinedOrNull())
    581         return throwTypeError(exec);
    582  
    583     RefPtr<Int32Array> webGLArray = toInt32Array(exec->uncheckedArgument(1));
    584 
    585     ExceptionCode ec = 0;
    586     if (webGLArray) {
    587         switch (f) {
    588         case f_uniform1v:
    589             context.uniform1iv(location, webGLArray.get(), ec);
    590             break;
    591         case f_uniform2v:
    592             context.uniform2iv(location, webGLArray.get(), ec);
    593             break;
    594         case f_uniform3v:
    595             context.uniform3iv(location, webGLArray.get(), ec);
    596             break;
    597         case f_uniform4v:
    598             context.uniform4iv(location, webGLArray.get(), ec);
    599             break;
    600         default:
    601             break;
    602         }
    603        
    604         setDOMException(exec, ec);
    605         return jsUndefined();
    606     }
    607 
    608 
    609     Vector<int, 64> array;
    610     if (!toVector(exec, exec->uncheckedArgument(1), array))
    611         return throwTypeError(exec);
    612 
    613     switch (f) {
    614     case f_uniform1v:
    615         context.uniform1iv(location, array.data(), array.size(), ec);
    616         break;
    617     case f_uniform2v:
    618         context.uniform2iv(location, array.data(), array.size(), ec);
    619         break;
    620     case f_uniform3v:
    621         context.uniform3iv(location, array.data(), array.size(), ec);
    622         break;
    623     case f_uniform4v:
    624         context.uniform4iv(location, array.data(), array.size(), ec);
    625         break;
    626     default:
    627         break;
    628     }
    629    
    630     setDOMException(exec, ec);
    631     return jsUndefined();
    632 }
    633 
    634 static JSC::JSValue dataFunctionMatrix(DataFunctionMatrixToCall f, JSC::ExecState* exec, WebGLRenderingContext& context)
    635 {
    636     if (exec->argumentCount() != 3)
    637         return exec->vm().throwException(exec, createNotEnoughArgumentsError(exec));
    638 
    639     WebGLUniformLocation* location = JSWebGLUniformLocation::toWrapped(exec->uncheckedArgument(0));
    640     if (!location && !exec->uncheckedArgument(0).isUndefinedOrNull())
    641         return throwTypeError(exec);
    642 
    643     bool transpose = exec->uncheckedArgument(1).toBoolean(exec);
    644     if (exec->hadException())   
    645         return jsUndefined();
    646        
    647     RefPtr<Float32Array> webGLArray = toFloat32Array(exec->uncheckedArgument(2));
    648        
    649     ExceptionCode ec = 0;
    650     if (webGLArray) {
    651         switch (f) {
    652         case f_uniformMatrix2fv:
    653             context.uniformMatrix2fv(location, transpose, webGLArray.get(), ec);
    654             break;
    655         case f_uniformMatrix3fv:
    656             context.uniformMatrix3fv(location, transpose, webGLArray.get(), ec);
    657             break;
    658         case f_uniformMatrix4fv:
    659             context.uniformMatrix4fv(location, transpose, webGLArray.get(), ec);
    660             break;
    661         }
    662        
    663         setDOMException(exec, ec);
    664         return jsUndefined();
    665     }
    666 
    667     Vector<float, 64> array;
    668     if (!toVector(exec, exec->uncheckedArgument(2), array))
    669         return throwTypeError(exec);
    670 
    671     switch (f) {
    672     case f_uniformMatrix2fv:
    673         context.uniformMatrix2fv(location, transpose, array.data(), array.size(), ec);
    674         break;
    675     case f_uniformMatrix3fv:
    676         context.uniformMatrix3fv(location, transpose, array.data(), array.size(), ec);
    677         break;
    678     case f_uniformMatrix4fv:
    679         context.uniformMatrix4fv(location, transpose, array.data(), array.size(), ec);
    680         break;
    681     }
    682 
    683     setDOMException(exec, ec);
    684     return jsUndefined();
    685 }
    686 
    687 JSC::JSValue JSWebGLRenderingContext::uniform1fv(JSC::ExecState* exec)
    688 {
    689     return dataFunctionf(f_uniform1v, exec, impl());
    690 }
    691 
    692 JSC::JSValue JSWebGLRenderingContext::uniform1iv(JSC::ExecState* exec)
    693 {
    694     return dataFunctioni(f_uniform1v, exec, impl());
    695 }
    696 
    697 JSC::JSValue JSWebGLRenderingContext::uniform2fv(JSC::ExecState* exec)
    698 {
    699     return dataFunctionf(f_uniform2v, exec, impl());
    700 }
    701 
    702 JSC::JSValue JSWebGLRenderingContext::uniform2iv(JSC::ExecState* exec)
    703 {
    704     return dataFunctioni(f_uniform2v, exec, impl());
    705 }
    706 
    707 JSC::JSValue JSWebGLRenderingContext::uniform3fv(JSC::ExecState* exec)
    708 {
    709     return dataFunctionf(f_uniform3v, exec, impl());
    710 }
    711 
    712 JSC::JSValue JSWebGLRenderingContext::uniform3iv(JSC::ExecState* exec)
    713 {
    714     return dataFunctioni(f_uniform3v, exec, impl());
    715 }
    716 
    717 JSC::JSValue JSWebGLRenderingContext::uniform4fv(JSC::ExecState* exec)
    718 {
    719     return dataFunctionf(f_uniform4v, exec, impl());
    720 }
    721 
    722 JSC::JSValue JSWebGLRenderingContext::uniform4iv(JSC::ExecState* exec)
    723 {
    724     return dataFunctioni(f_uniform4v, exec, impl());
    725 }
    726 
    727 JSC::JSValue JSWebGLRenderingContext::uniformMatrix2fv(JSC::ExecState* exec)
    728 {
    729     return dataFunctionMatrix(f_uniformMatrix2fv, exec, impl());
    730 }
    731 
    732 JSC::JSValue JSWebGLRenderingContext::uniformMatrix3fv(JSC::ExecState* exec)
    733 {
    734     return dataFunctionMatrix(f_uniformMatrix3fv, exec, impl());
    735 }
    736 
    737 JSC::JSValue JSWebGLRenderingContext::uniformMatrix4fv(JSC::ExecState* exec)
    738 {
    739     return dataFunctionMatrix(f_uniformMatrix4fv, exec, impl());
    740 }
    741 
    742 JSC::JSValue JSWebGLRenderingContext::vertexAttrib1fv(JSC::ExecState* exec)
    743 {
    744     return dataFunctionf(f_vertexAttrib1v, exec, impl());
    745 }
    746 
    747 JSC::JSValue JSWebGLRenderingContext::vertexAttrib2fv(JSC::ExecState* exec)
    748 {
    749     return dataFunctionf(f_vertexAttrib2v, exec, impl());
    750 }
    751 
    752 JSC::JSValue JSWebGLRenderingContext::vertexAttrib3fv(JSC::ExecState* exec)
    753 {
    754     return dataFunctionf(f_vertexAttrib3v, exec, impl());
    755 }
    756 
    757 JSC::JSValue JSWebGLRenderingContext::vertexAttrib4fv(JSC::ExecState* exec)
    758 {
    759     return dataFunctionf(f_vertexAttrib4v, exec, impl());
    760 }
    761 
    76240} // namespace WebCore
    76341
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r178633 r178674  
    29592959                $rootString  = "    ${implType}* root = &js${interfaceName}->impl();\n";
    29602960            } elsif (GetGenerateIsReachable($interface) eq "ImplWebGLRenderingContext") {
    2961                 $rootString  = "    WebGLRenderingContext* root = WTF::getPtr(js${interfaceName}->impl().context());\n";
     2961                $rootString  = "    WebGLRenderingContextBase* root = WTF::getPtr(js${interfaceName}->impl().context());\n";
    29622962            } elsif (GetGenerateIsReachable($interface) eq "ImplFrame") {
    29632963                $rootString  = "    Frame* root = WTF::getPtr(js${interfaceName}->impl().frame());\n";
  • trunk/Source/WebCore/html/HTMLCanvasElement.cpp

    r178411 r178674  
    5555#if ENABLE(WEBGL)   
    5656#include "WebGLContextAttributes.h"
    57 #include "WebGLRenderingContext.h"
     57#include "WebGLRenderingContextBase.h"
    5858#endif
    5959
     
    213213                return nullptr;
    214214            if (!m_context) {
    215                 m_context = WebGLRenderingContext::create(this, static_cast<WebGLContextAttributes*>(attrs));
     215                m_context = WebGLRenderingContextBase::create(this, static_cast<WebGLContextAttributes*>(attrs), type);
    216216                if (m_context) {
    217217                    // Need to make sure a RenderLayer and compositing layer get created for the Canvas
     
    328328#if ENABLE(WEBGL)
    329329    if (is3D() && oldSize != size())
    330         static_cast<WebGLRenderingContext*>(m_context.get())->reshape(width(), height());
     330        static_cast<WebGLRenderingContextBase*>(m_context.get())->reshape(width(), height());
    331331#endif
    332332
     
    395395#if ENABLE(WEBGL)   
    396396    if (is3D())
    397         static_cast<WebGLRenderingContext*>(m_context.get())->markLayerComposited();
     397        static_cast<WebGLRenderingContextBase*>(m_context.get())->markLayerComposited();
    398398#endif
    399399}
     
    476476        return nullptr;
    477477
    478     WebGLRenderingContext* ctx = static_cast<WebGLRenderingContext*>(m_context.get());
     478    WebGLRenderingContextBase* ctx = static_cast<WebGLRenderingContextBase*>(m_context.get());
    479479
    480480    return ctx->paintRenderingResultsToImageData();
  • trunk/Source/WebCore/html/canvas/ANGLEInstancedArrays.cpp

    r178411 r178674  
    3535namespace WebCore {
    3636
    37 ANGLEInstancedArrays::ANGLEInstancedArrays(WebGLRenderingContext* context)
     37ANGLEInstancedArrays::ANGLEInstancedArrays(WebGLRenderingContextBase* context)
    3838    : WebGLExtension(context)
    3939{
     
    4949}
    5050
    51 bool ANGLEInstancedArrays::supported(WebGLRenderingContext* context)
     51bool ANGLEInstancedArrays::supported(WebGLRenderingContextBase* context)
    5252{
    5353#if PLATFORM(IOS) || PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
  • trunk/Source/WebCore/html/canvas/ANGLEInstancedArrays.h

    r178411 r178674  
    3131namespace WebCore {
    3232
    33 class WebGLRenderingContext;
     33class WebGLRenderingContextBase;
    3434
    3535class ANGLEInstancedArrays final : public WebGLExtension {
    3636public:
    37     explicit ANGLEInstancedArrays(WebGLRenderingContext*);
     37    explicit ANGLEInstancedArrays(WebGLRenderingContextBase*);
    3838    virtual ~ANGLEInstancedArrays();
    3939
    4040    virtual ExtensionName getName() const;
    4141
    42     static bool supported(WebGLRenderingContext*);
     42    static bool supported(WebGLRenderingContextBase*);
    4343
    4444    void drawArraysInstancedANGLE(GC3Denum mode, GC3Dint first, GC3Dsizei count, GC3Dsizei primcount);
  • trunk/Source/WebCore/html/canvas/CanvasRenderingContext.h

    r178411 r178674  
    5353
    5454    virtual bool is2d() const { return false; }
    55     virtual bool is3d() const { return false; }
     55    virtual bool isWebGL1() const { return false; }
     56    virtual bool isWebGL2() const { return false; }
     57    bool is3d() const { return isWebGL1() || isWebGL1(); }
    5658    virtual bool isAccelerated() const { return false; }
    5759
  • trunk/Source/WebCore/html/canvas/EXTBlendMinMax.cpp

    r178411 r178674  
    3131namespace WebCore {
    3232
    33 EXTBlendMinMax::EXTBlendMinMax(WebGLRenderingContext* context)
     33EXTBlendMinMax::EXTBlendMinMax(WebGLRenderingContextBase* context)
    3434    : WebGLExtension(context)
    3535{
  • trunk/Source/WebCore/html/canvas/EXTBlendMinMax.h

    r178411 r178674  
    3333class EXTBlendMinMax final : public WebGLExtension {
    3434public:
    35     explicit EXTBlendMinMax(WebGLRenderingContext*);
     35    explicit EXTBlendMinMax(WebGLRenderingContextBase*);
    3636    virtual ~EXTBlendMinMax();
    3737
  • trunk/Source/WebCore/html/canvas/EXTFragDepth.cpp

    r178411 r178674  
    3131namespace WebCore {
    3232
    33 EXTFragDepth::EXTFragDepth(WebGLRenderingContext* context)
     33EXTFragDepth::EXTFragDepth(WebGLRenderingContextBase* context)
    3434    : WebGLExtension(context)
    3535{
  • trunk/Source/WebCore/html/canvas/EXTFragDepth.h

    r178411 r178674  
    3333class EXTFragDepth final : public WebGLExtension {
    3434public:
    35     explicit EXTFragDepth(WebGLRenderingContext*);
     35    explicit EXTFragDepth(WebGLRenderingContextBase*);
    3636    virtual ~EXTFragDepth();
    3737
  • trunk/Source/WebCore/html/canvas/EXTShaderTextureLOD.cpp

    r178411 r178674  
    3131namespace WebCore {
    3232
    33 EXTShaderTextureLOD::EXTShaderTextureLOD(WebGLRenderingContext* context)
     33EXTShaderTextureLOD::EXTShaderTextureLOD(WebGLRenderingContextBase* context)
    3434    : WebGLExtension(context)
    3535{
  • trunk/Source/WebCore/html/canvas/EXTShaderTextureLOD.h

    r178411 r178674  
    3333class EXTShaderTextureLOD final : public WebGLExtension {
    3434public:
    35     explicit EXTShaderTextureLOD(WebGLRenderingContext*);
     35    explicit EXTShaderTextureLOD(WebGLRenderingContextBase*);
    3636    virtual ~EXTShaderTextureLOD();
    3737
  • trunk/Source/WebCore/html/canvas/EXTTextureFilterAnisotropic.cpp

    r178411 r178674  
    3232namespace WebCore {
    3333
    34 EXTTextureFilterAnisotropic::EXTTextureFilterAnisotropic(WebGLRenderingContext* context)
     34EXTTextureFilterAnisotropic::EXTTextureFilterAnisotropic(WebGLRenderingContextBase* context)
    3535    : WebGLExtension(context)
    3636{
  • trunk/Source/WebCore/html/canvas/EXTTextureFilterAnisotropic.h

    r178411 r178674  
    3333class EXTTextureFilterAnisotropic final : public WebGLExtension {
    3434public:
    35     explicit EXTTextureFilterAnisotropic(WebGLRenderingContext*);
     35    explicit EXTTextureFilterAnisotropic(WebGLRenderingContextBase*);
    3636    virtual ~EXTTextureFilterAnisotropic();
    3737
  • trunk/Source/WebCore/html/canvas/EXTsRGB.cpp

    r178411 r178674  
    3131namespace WebCore {
    3232
    33 EXTsRGB::EXTsRGB(WebGLRenderingContext* context)
     33EXTsRGB::EXTsRGB(WebGLRenderingContextBase* context)
    3434    : WebGLExtension(context)
    3535{
  • trunk/Source/WebCore/html/canvas/EXTsRGB.h

    r178411 r178674  
    3333class EXTsRGB final : public WebGLExtension {
    3434public:
    35     explicit EXTsRGB(WebGLRenderingContext*);
     35    explicit EXTsRGB(WebGLRenderingContextBase*);
    3636    virtual ~EXTsRGB();
    3737
  • trunk/Source/WebCore/html/canvas/OESElementIndexUint.cpp

    r178411 r178674  
    3232namespace WebCore {
    3333
    34 OESElementIndexUint::OESElementIndexUint(WebGLRenderingContext* context)
     34OESElementIndexUint::OESElementIndexUint(WebGLRenderingContextBase* context)
    3535    : WebGLExtension(context)
    3636{
  • trunk/Source/WebCore/html/canvas/OESElementIndexUint.h

    r178411 r178674  
    3333class OESElementIndexUint final : public WebGLExtension {
    3434public:
    35     explicit OESElementIndexUint(WebGLRenderingContext*);
     35    explicit OESElementIndexUint(WebGLRenderingContextBase*);
    3636    virtual ~OESElementIndexUint();
    3737
  • trunk/Source/WebCore/html/canvas/OESStandardDerivatives.cpp

    r178411 r178674  
    3232namespace WebCore {
    3333
    34 OESStandardDerivatives::OESStandardDerivatives(WebGLRenderingContext* context)
     34OESStandardDerivatives::OESStandardDerivatives(WebGLRenderingContextBase* context)
    3535    : WebGLExtension(context)
    3636{
  • trunk/Source/WebCore/html/canvas/OESStandardDerivatives.h

    r178411 r178674  
    3333class OESStandardDerivatives final : public WebGLExtension {
    3434public:
    35     explicit OESStandardDerivatives(WebGLRenderingContext*);
     35    explicit OESStandardDerivatives(WebGLRenderingContextBase*);
    3636    virtual ~OESStandardDerivatives();
    3737
  • trunk/Source/WebCore/html/canvas/OESTextureFloat.cpp

    r178411 r178674  
    3232namespace WebCore {
    3333
    34 OESTextureFloat::OESTextureFloat(WebGLRenderingContext* context)
     34OESTextureFloat::OESTextureFloat(WebGLRenderingContextBase* context)
    3535    : WebGLExtension(context)
    3636{
  • trunk/Source/WebCore/html/canvas/OESTextureFloat.h

    r178411 r178674  
    3333class OESTextureFloat final : public WebGLExtension {
    3434public:
    35     OESTextureFloat(WebGLRenderingContext*);
     35    OESTextureFloat(WebGLRenderingContextBase*);
    3636    virtual ~OESTextureFloat();
    3737
  • trunk/Source/WebCore/html/canvas/OESTextureFloatLinear.cpp

    r178411 r178674  
    3131namespace WebCore {
    3232
    33 OESTextureFloatLinear::OESTextureFloatLinear(WebGLRenderingContext* context)
     33OESTextureFloatLinear::OESTextureFloatLinear(WebGLRenderingContextBase* context)
    3434    : WebGLExtension(context)
    3535{
  • trunk/Source/WebCore/html/canvas/OESTextureFloatLinear.h

    r178411 r178674  
    3333class OESTextureFloatLinear final : public WebGLExtension {
    3434public:
    35     explicit OESTextureFloatLinear(WebGLRenderingContext*);
     35    explicit OESTextureFloatLinear(WebGLRenderingContextBase*);
    3636    virtual ~OESTextureFloatLinear();
    3737
  • trunk/Source/WebCore/html/canvas/OESTextureHalfFloat.cpp

    r178411 r178674  
    3232namespace WebCore {
    3333
    34 OESTextureHalfFloat::OESTextureHalfFloat(WebGLRenderingContext* context)
     34OESTextureHalfFloat::OESTextureHalfFloat(WebGLRenderingContextBase* context)
    3535    : WebGLExtension(context)
    3636{
  • trunk/Source/WebCore/html/canvas/OESTextureHalfFloat.h

    r178411 r178674  
    3333class OESTextureHalfFloat final : public WebGLExtension {
    3434public:
    35     OESTextureHalfFloat(WebGLRenderingContext*);
     35    OESTextureHalfFloat(WebGLRenderingContextBase*);
    3636    virtual ~OESTextureHalfFloat();
    3737
  • trunk/Source/WebCore/html/canvas/OESTextureHalfFloatLinear.cpp

    r178411 r178674  
    3131namespace WebCore {
    3232
    33 OESTextureHalfFloatLinear::OESTextureHalfFloatLinear(WebGLRenderingContext* context)
     33OESTextureHalfFloatLinear::OESTextureHalfFloatLinear(WebGLRenderingContextBase* context)
    3434    : WebGLExtension(context)
    3535{
  • trunk/Source/WebCore/html/canvas/OESTextureHalfFloatLinear.h

    r178411 r178674  
    3333class OESTextureHalfFloatLinear final : public WebGLExtension {
    3434public:
    35     OESTextureHalfFloatLinear(WebGLRenderingContext*);
     35    OESTextureHalfFloatLinear(WebGLRenderingContextBase*);
    3636    virtual ~OESTextureHalfFloatLinear();
    3737
  • trunk/Source/WebCore/html/canvas/OESVertexArrayObject.cpp

    r178411 r178674  
    3434namespace WebCore {
    3535
    36 OESVertexArrayObject::OESVertexArrayObject(WebGLRenderingContext* context)
     36OESVertexArrayObject::OESVertexArrayObject(WebGLRenderingContextBase* context)
    3737    : WebGLExtension(context)
    3838{
  • trunk/Source/WebCore/html/canvas/OESVertexArrayObject.h

    r178411 r178674  
    3232namespace WebCore {
    3333
    34 class WebGLRenderingContext;
     34class WebGLRenderingContextBase;
    3535class WebGLVertexArrayObjectOES;
    3636
     
    3939class OESVertexArrayObject final : public WebGLExtension {
    4040public:
    41     OESVertexArrayObject(WebGLRenderingContext*);
     41    OESVertexArrayObject(WebGLRenderingContextBase*);
    4242    virtual ~OESVertexArrayObject();
    4343
  • trunk/Source/WebCore/html/canvas/WebGLBuffer.cpp

    r178411 r178674  
    3131
    3232#include "WebGLContextGroup.h"
    33 #include "WebGLRenderingContext.h"
     33#include "WebGLRenderingContextBase.h"
    3434
    3535namespace WebCore {
    3636
    37 PassRefPtr<WebGLBuffer> WebGLBuffer::create(WebGLRenderingContext* ctx)
     37PassRefPtr<WebGLBuffer> WebGLBuffer::create(WebGLRenderingContextBase* ctx)
    3838{
    3939    return adoptRef(new WebGLBuffer(ctx));
    4040}
    4141
    42 WebGLBuffer::WebGLBuffer(WebGLRenderingContext* ctx)
     42WebGLBuffer::WebGLBuffer(WebGLRenderingContextBase* ctx)
    4343    : WebGLSharedObject(ctx)
    4444    , m_target(0)
  • trunk/Source/WebCore/html/canvas/WebGLBuffer.h

    r178411 r178674  
    4242    virtual ~WebGLBuffer();
    4343
    44     static PassRefPtr<WebGLBuffer> create(WebGLRenderingContext*);
     44    static PassRefPtr<WebGLBuffer> create(WebGLRenderingContextBase*);
    4545
    4646    bool associateBufferData(GC3Dsizeiptr size);
     
    6767
    6868protected:
    69     WebGLBuffer(WebGLRenderingContext*);
     69    WebGLBuffer(WebGLRenderingContextBase*);
    7070
    7171    virtual void deleteObjectImpl(GraphicsContext3D*, Platform3DObject) override;
  • trunk/Source/WebCore/html/canvas/WebGLCompressedTextureATC.cpp

    r178411 r178674  
    3434namespace WebCore {
    3535
    36 WebGLCompressedTextureATC::WebGLCompressedTextureATC(WebGLRenderingContext* context)
     36WebGLCompressedTextureATC::WebGLCompressedTextureATC(WebGLRenderingContextBase* context)
    3737    : WebGLExtension(context)
    3838{
     
    5151}
    5252
    53 bool WebGLCompressedTextureATC::supported(WebGLRenderingContext* context)
     53bool WebGLCompressedTextureATC::supported(WebGLRenderingContextBase* context)
    5454{
    5555    Extensions3D* extensions = context->graphicsContext3D()->getExtensions();
  • trunk/Source/WebCore/html/canvas/WebGLCompressedTextureATC.h

    r178411 r178674  
    3535class WebGLCompressedTextureATC final : public WebGLExtension {
    3636public:
    37     explicit WebGLCompressedTextureATC(WebGLRenderingContext*);
     37    explicit WebGLCompressedTextureATC(WebGLRenderingContextBase*);
    3838    virtual ~WebGLCompressedTextureATC();
    3939
    40     static bool supported(WebGLRenderingContext*);
     40    static bool supported(WebGLRenderingContextBase*);
    4141
    4242    virtual ExtensionName getName() const override;
  • trunk/Source/WebCore/html/canvas/WebGLCompressedTexturePVRTC.cpp

    r178411 r178674  
    3131
    3232#include "Extensions3D.h"
    33 #include "WebGLRenderingContext.h"
     33#include "WebGLRenderingContextBase.h"
    3434
    3535namespace WebCore {
    3636
    37 WebGLCompressedTexturePVRTC::WebGLCompressedTexturePVRTC(WebGLRenderingContext* context)
     37WebGLCompressedTexturePVRTC::WebGLCompressedTexturePVRTC(WebGLRenderingContextBase* context)
    3838    : WebGLExtension(context)
    3939{
     
    5353}
    5454
    55 bool WebGLCompressedTexturePVRTC::supported(WebGLRenderingContext* context)
     55bool WebGLCompressedTexturePVRTC::supported(WebGLRenderingContextBase* context)
    5656{
    5757    Extensions3D* extensions = context->graphicsContext3D()->getExtensions();
  • trunk/Source/WebCore/html/canvas/WebGLCompressedTexturePVRTC.h

    r178411 r178674  
    3333class WebGLCompressedTexturePVRTC final : public WebGLExtension {
    3434public:
    35     explicit WebGLCompressedTexturePVRTC(WebGLRenderingContext*);
     35    explicit WebGLCompressedTexturePVRTC(WebGLRenderingContextBase*);
    3636    virtual ~WebGLCompressedTexturePVRTC();
    3737
    38     static bool supported(WebGLRenderingContext*);
     38    static bool supported(WebGLRenderingContextBase*);
    3939    virtual ExtensionName getName() const override;
    4040};
  • trunk/Source/WebCore/html/canvas/WebGLCompressedTextureS3TC.cpp

    r178411 r178674  
    3131
    3232#include "Extensions3D.h"
    33 #include "WebGLRenderingContext.h"
     33#include "WebGLRenderingContextBase.h"
    3434
    3535namespace WebCore {
    3636
    37 WebGLCompressedTextureS3TC::WebGLCompressedTextureS3TC(WebGLRenderingContext* context)
     37WebGLCompressedTextureS3TC::WebGLCompressedTextureS3TC(WebGLRenderingContextBase* context)
    3838    : WebGLExtension(context)
    3939{
     
    5353}
    5454
    55 bool WebGLCompressedTextureS3TC::supported(WebGLRenderingContext* context)
     55bool WebGLCompressedTextureS3TC::supported(WebGLRenderingContextBase* context)
    5656{
    5757    Extensions3D* extensions = context->graphicsContext3D()->getExtensions();
  • trunk/Source/WebCore/html/canvas/WebGLCompressedTextureS3TC.h

    r178411 r178674  
    3535class WebGLCompressedTextureS3TC final : public WebGLExtension {
    3636public:
    37     explicit WebGLCompressedTextureS3TC(WebGLRenderingContext*);
     37    explicit WebGLCompressedTextureS3TC(WebGLRenderingContextBase*);
    3838    virtual ~WebGLCompressedTextureS3TC();
    3939
    40     static bool supported(WebGLRenderingContext*);
     40    static bool supported(WebGLRenderingContextBase*);
    4141
    4242    virtual ExtensionName getName() const override;
  • trunk/Source/WebCore/html/canvas/WebGLContextGroup.cpp

    r178411 r178674  
    3131
    3232#include "GraphicsContext3D.h"
    33 #include "WebGLRenderingContext.h"
     33#include "WebGLRenderingContextBase.h"
    3434#include "WebGLSharedObject.h"
    3535
     
    5454{
    5555    ASSERT(!m_contexts.isEmpty());
    56     HashSet<WebGLRenderingContext*>::iterator it = m_contexts.begin();
     56    HashSet<WebGLRenderingContextBase*>::iterator it = m_contexts.begin();
    5757    return (*it)->graphicsContext3D();
    5858}
    5959
    60 void WebGLContextGroup::addContext(WebGLRenderingContext* context)
     60void WebGLContextGroup::addContext(WebGLRenderingContextBase* context)
    6161{
    6262    m_contexts.add(context);
    6363}
    6464
    65 void WebGLContextGroup::removeContext(WebGLRenderingContext* context)
     65void WebGLContextGroup::removeContext(WebGLRenderingContextBase* context)
    6666{
    6767    // We must call detachAndRemoveAllObjects before removing the last context.
     
    9090}
    9191
    92 void WebGLContextGroup::loseContextGroup(WebGLRenderingContext::LostContextMode mode)
     92void WebGLContextGroup::loseContextGroup(WebGLRenderingContextBase::LostContextMode mode)
    9393{
    94     for (HashSet<WebGLRenderingContext*>::iterator it = m_contexts.begin(); it != m_contexts.end(); ++it)
     94    for (HashSet<WebGLRenderingContextBase*>::iterator it = m_contexts.begin(); it != m_contexts.end(); ++it)
    9595        (*it)->loseContextImpl(mode);
    9696
  • trunk/Source/WebCore/html/canvas/WebGLContextGroup.h

    r178411 r178674  
    2727#define WebGLContextGroup_h
    2828
    29 #include <WebGLRenderingContext.h>
     29#include "WebGLRenderingContextBase.h"
    3030#include <wtf/HashSet.h>
    3131#include <wtf/PassRefPtr.h>
     
    3737class WebGLExtension;
    3838class WebGLSharedObject;
    39 class WebGLRenderingContext;
     39class WebGLRenderingContextBase;
    4040
    4141typedef int ExceptionCode;
     
    4646    ~WebGLContextGroup();
    4747
    48     void addContext(WebGLRenderingContext*);
    49     void removeContext(WebGLRenderingContext*);
     48    void addContext(WebGLRenderingContextBase*);
     49    void removeContext(WebGLRenderingContextBase*);
    5050
    5151    void addObject(WebGLSharedObject*);
     
    5454    GraphicsContext3D* getAGraphicsContext3D();
    5555
    56     void loseContextGroup(WebGLRenderingContext::LostContextMode);
     56    void loseContextGroup(WebGLRenderingContextBase::LostContextMode);
    5757
    5858  private:
     
    6363    void detachAndRemoveAllObjects();
    6464
    65     HashSet<WebGLRenderingContext*> m_contexts;
     65    HashSet<WebGLRenderingContextBase*> m_contexts;
    6666    HashSet<WebGLSharedObject*> m_groupObjects;
    6767};
  • trunk/Source/WebCore/html/canvas/WebGLContextObject.cpp

    r178411 r178674  
    3030#include "WebGLContextObject.h"
    3131
    32 #include "WebGLRenderingContext.h"
     32#include "WebGLRenderingContextBase.h"
    3333
    3434namespace WebCore {
    3535
    36 WebGLContextObject::WebGLContextObject(WebGLRenderingContext* context)
     36WebGLContextObject::WebGLContextObject(WebGLRenderingContextBase* context)
    3737    : WebGLObject(context)
    3838    , m_context(context)
  • trunk/Source/WebCore/html/canvas/WebGLContextObject.h

    r178411 r178674  
    3232
    3333class GraphicsContext3D;
    34 class WebGLRenderingContext;
     34class WebGLRenderingContextBase;
    3535
    3636// WebGLContextObject the base class for objects that are owned by a specific
     
    4040    virtual ~WebGLContextObject();
    4141
    42     WebGLRenderingContext* context() const { return m_context; }
     42    WebGLRenderingContextBase* context() const { return m_context; }
    4343
    44     virtual bool validate(const WebGLContextGroup*, const WebGLRenderingContext* context) const override
     44    virtual bool validate(const WebGLContextGroup*, const WebGLRenderingContextBase* context) const override
    4545    {
    4646        return context == m_context;
     
    5050
    5151protected:
    52     WebGLContextObject(WebGLRenderingContext*);
     52    WebGLContextObject(WebGLRenderingContextBase*);
    5353
    5454    virtual bool hasGroupOrContext() const override
     
    6060
    6161private:
    62     WebGLRenderingContext* m_context;
     62    WebGLRenderingContextBase* m_context;
    6363};
    6464
  • trunk/Source/WebCore/html/canvas/WebGLDebugRendererInfo.cpp

    r178411 r178674  
    3030#include "WebGLDebugRendererInfo.h"
    3131
    32 #include "WebGLRenderingContext.h"
     32#include "WebGLRenderingContextBase.h"
    3333
    3434namespace WebCore {
    3535
    36 WebGLDebugRendererInfo::WebGLDebugRendererInfo(WebGLRenderingContext* context)
     36WebGLDebugRendererInfo::WebGLDebugRendererInfo(WebGLRenderingContextBase* context)
    3737    : WebGLExtension(context)
    3838{
  • trunk/Source/WebCore/html/canvas/WebGLDebugRendererInfo.h

    r178411 r178674  
    3838    };
    3939
    40     explicit WebGLDebugRendererInfo(WebGLRenderingContext*);
     40    explicit WebGLDebugRendererInfo(WebGLRenderingContextBase*);
    4141    virtual ~WebGLDebugRendererInfo();
    4242
  • trunk/Source/WebCore/html/canvas/WebGLDebugShaders.cpp

    r178411 r178674  
    3131
    3232#include "Extensions3D.h"
    33 #include "WebGLRenderingContext.h"
     33#include "WebGLRenderingContextBase.h"
    3434#include "WebGLShader.h"
    3535
    3636namespace WebCore {
    3737
    38 WebGLDebugShaders::WebGLDebugShaders(WebGLRenderingContext* context)
     38WebGLDebugShaders::WebGLDebugShaders(WebGLRenderingContextBase* context)
    3939    : WebGLExtension(context)
    4040{
  • trunk/Source/WebCore/html/canvas/WebGLDebugShaders.h

    r178411 r178674  
    3737class WebGLDebugShaders final : public WebGLExtension {
    3838public:
    39     explicit WebGLDebugShaders(WebGLRenderingContext*);
     39    explicit WebGLDebugShaders(WebGLRenderingContextBase*);
    4040    virtual ~WebGLDebugShaders();
    4141
  • trunk/Source/WebCore/html/canvas/WebGLDepthTexture.cpp

    r178411 r178674  
    3434namespace WebCore {
    3535
    36 WebGLDepthTexture::WebGLDepthTexture(WebGLRenderingContext* context)
     36WebGLDepthTexture::WebGLDepthTexture(WebGLRenderingContextBase* context)
    3737    : WebGLExtension(context)
    3838{
  • trunk/Source/WebCore/html/canvas/WebGLDepthTexture.h

    r178411 r178674  
    3333class WebGLDepthTexture final : public WebGLExtension {
    3434public:
    35     explicit WebGLDepthTexture(WebGLRenderingContext*);
     35    explicit WebGLDepthTexture(WebGLRenderingContextBase*);
    3636    virtual ~WebGLDepthTexture();
    3737
  • trunk/Source/WebCore/html/canvas/WebGLDrawBuffers.cpp

    r178411 r178674  
    3333namespace WebCore {
    3434
    35 WebGLDrawBuffers::WebGLDrawBuffers(WebGLRenderingContext* context)
     35WebGLDrawBuffers::WebGLDrawBuffers(WebGLRenderingContextBase* context)
    3636    : WebGLExtension(context)
    3737{
     
    4949#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101000)
    5050
    51 bool WebGLDrawBuffers::supported(WebGLRenderingContext*)
     51bool WebGLDrawBuffers::supported(WebGLRenderingContextBase*)
    5252{
    5353    return false;
     
    5656#else
    5757
    58 bool WebGLDrawBuffers::supported(WebGLRenderingContext* context)
     58bool WebGLDrawBuffers::supported(WebGLRenderingContextBase* context)
    5959{
    6060    Extensions3D* extensions = context->graphicsContext3D()->getExtensions();
     
    100100
    101101// static
    102 bool WebGLDrawBuffers::satisfiesWebGLRequirements(WebGLRenderingContext* webglContext)
     102bool WebGLDrawBuffers::satisfiesWebGLRequirements(WebGLRenderingContextBase* webglContext)
    103103{
    104104    GraphicsContext3D* context = webglContext->graphicsContext3D();
  • trunk/Source/WebCore/html/canvas/WebGLDrawBuffers.h

    r178411 r178674  
    3333class WebGLDrawBuffers final : public WebGLExtension {
    3434public:
    35     explicit WebGLDrawBuffers(WebGLRenderingContext*);
     35    explicit WebGLDrawBuffers(WebGLRenderingContextBase*);
    3636    virtual ~WebGLDrawBuffers();
    3737
    38     static bool supported(WebGLRenderingContext*);
     38    static bool supported(WebGLRenderingContextBase*);
    3939
    4040    virtual ExtensionName getName() const override;
     
    4343
    4444private:
    45     static bool satisfiesWebGLRequirements(WebGLRenderingContext*);
     45    static bool satisfiesWebGLRequirements(WebGLRenderingContextBase*);
    4646};
    4747
  • trunk/Source/WebCore/html/canvas/WebGLExtension.cpp

    r178411 r178674  
    3232namespace WebCore {
    3333
    34 WebGLExtension::WebGLExtension(WebGLRenderingContext* context)
     34WebGLExtension::WebGLExtension(WebGLRenderingContextBase* context)
    3535    : m_context(context)
    3636{
  • trunk/Source/WebCore/html/canvas/WebGLExtension.h

    r178411 r178674  
    2727#define WebGLExtension_h
    2828
    29 #include "WebGLRenderingContext.h"
     29#include "WebGLRenderingContextBase.h"
    3030
    3131namespace WebCore {
     
    6161    void ref() { m_context->ref(); }
    6262    void deref() { m_context->deref(); }
    63     WebGLRenderingContext* context() { return m_context; }
     63    WebGLRenderingContextBase* context() { return m_context; }
    6464
    6565    virtual ~WebGLExtension();
     
    6767
    6868protected:
    69     WebGLExtension(WebGLRenderingContext*);
    70     WebGLRenderingContext* m_context;
     69    WebGLExtension(WebGLRenderingContextBase*);
     70    WebGLRenderingContextBase* m_context;
    7171};
    7272
  • trunk/Source/WebCore/html/canvas/WebGLFramebuffer.cpp

    r178411 r178674  
    3333#include "WebGLContextGroup.h"
    3434#include "WebGLDrawBuffers.h"
    35 #include "WebGLRenderingContext.h"
     35#include "WebGLRenderingContextBase.h"
    3636
    3737namespace WebCore {
     
    270270}
    271271
    272 PassRefPtr<WebGLFramebuffer> WebGLFramebuffer::create(WebGLRenderingContext* ctx)
     272PassRefPtr<WebGLFramebuffer> WebGLFramebuffer::create(WebGLRenderingContextBase* ctx)
    273273{
    274274    return adoptRef(new WebGLFramebuffer(ctx));
    275275}
    276276
    277 WebGLFramebuffer::WebGLFramebuffer(WebGLRenderingContext* ctx)
     277WebGLFramebuffer::WebGLFramebuffer(WebGLRenderingContextBase* ctx)
    278278    : WebGLContextObject(ctx)
    279279    , m_hasEverBeenBound(false)
  • trunk/Source/WebCore/html/canvas/WebGLFramebuffer.h

    r178411 r178674  
    6262    virtual ~WebGLFramebuffer();
    6363
    64     static PassRefPtr<WebGLFramebuffer> create(WebGLRenderingContext*);
     64    static PassRefPtr<WebGLFramebuffer> create(WebGLRenderingContextBase*);
    6565
    6666    void setAttachmentForBoundFramebuffer(GC3Denum attachment, GC3Denum texTarget, WebGLTexture*, GC3Dint level);
     
    102102
    103103protected:
    104     WebGLFramebuffer(WebGLRenderingContext*);
     104    WebGLFramebuffer(WebGLRenderingContextBase*);
    105105
    106106    virtual void deleteObjectImpl(GraphicsContext3D*, Platform3DObject) override;
  • trunk/Source/WebCore/html/canvas/WebGLLoseContext.cpp

    r178411 r178674  
    3030#include "WebGLLoseContext.h"
    3131
    32 #include "WebGLRenderingContext.h"
     32#include "WebGLRenderingContextBase.h"
    3333
    3434namespace WebCore {
    3535
    36 WebGLLoseContext::WebGLLoseContext(WebGLRenderingContext* context)
     36WebGLLoseContext::WebGLLoseContext(WebGLRenderingContextBase* context)
    3737    : WebGLExtension(context)
    3838{
     
    5050void WebGLLoseContext::loseContext()
    5151{
    52     m_context->forceLostContext(WebGLRenderingContext::SyntheticLostContext);
     52    m_context->forceLostContext(WebGLRenderingContextBase::SyntheticLostContext);
    5353}
    5454
  • trunk/Source/WebCore/html/canvas/WebGLLoseContext.h

    r178411 r178674  
    3131namespace WebCore {
    3232
    33 class WebGLRenderingContext;
     33class WebGLRenderingContextBase;
    3434
    3535class WebGLLoseContext final : public WebGLExtension {
    3636public:
    37     explicit WebGLLoseContext(WebGLRenderingContext*);
     37    explicit WebGLLoseContext(WebGLRenderingContextBase*);
    3838    virtual ~WebGLLoseContext();
    3939
  • trunk/Source/WebCore/html/canvas/WebGLObject.cpp

    r178411 r178674  
    3535#include "WebGLDebugShaders.h"
    3636#include "WebGLLoseContext.h"
    37 #include "WebGLRenderingContext.h"
     37#include "WebGLRenderingContextBase.h"
    3838
    3939namespace WebCore {
    4040
    41 WebGLObject::WebGLObject(WebGLRenderingContext*)
     41WebGLObject::WebGLObject(WebGLRenderingContextBase*)
    4242    : m_object(0)
    4343    , m_attachmentCount(0)
  • trunk/Source/WebCore/html/canvas/WebGLObject.h

    r178411 r178674  
    3535class GraphicsContext3D;
    3636class WebGLContextGroup;
    37 class WebGLRenderingContext;
     37class WebGLRenderingContextBase;
    3838
    3939class WebGLObject : public RefCounted<WebGLObject> {
     
    5757
    5858    // True if this object belongs to the group or context.
    59     virtual bool validate(const WebGLContextGroup*, const WebGLRenderingContext*) const = 0;
     59    virtual bool validate(const WebGLContextGroup*, const WebGLRenderingContextBase*) const = 0;
    6060
    6161protected:
    62     WebGLObject(WebGLRenderingContext*);
     62    WebGLObject(WebGLRenderingContextBase*);
    6363
    6464    // setObject should be only called once right after creating a WebGLObject.
  • trunk/Source/WebCore/html/canvas/WebGLProgram.cpp

    r178411 r178674  
    3131
    3232#include "WebGLContextGroup.h"
    33 #include "WebGLRenderingContext.h"
     33#include "WebGLRenderingContextBase.h"
    3434
    3535namespace WebCore {
    3636
    37 PassRefPtr<WebGLProgram> WebGLProgram::create(WebGLRenderingContext* ctx)
     37PassRefPtr<WebGLProgram> WebGLProgram::create(WebGLRenderingContextBase* ctx)
    3838{
    3939    return adoptRef(new WebGLProgram(ctx));
    4040}
    4141
    42 WebGLProgram::WebGLProgram(WebGLRenderingContext* ctx)
     42WebGLProgram::WebGLProgram(WebGLRenderingContextBase* ctx)
    4343    : WebGLSharedObject(ctx)
    4444    , m_linkStatus(false)
  • trunk/Source/WebCore/html/canvas/WebGLProgram.h

    r178411 r178674  
    4040    virtual ~WebGLProgram();
    4141
    42     static PassRefPtr<WebGLProgram> create(WebGLRenderingContext*);
     42    static PassRefPtr<WebGLProgram> create(WebGLRenderingContextBase*);
    4343
    4444    unsigned numActiveAttribLocations();
     
    6363
    6464protected:
    65     WebGLProgram(WebGLRenderingContext*);
     65    WebGLProgram(WebGLRenderingContextBase*);
    6666
    6767    virtual void deleteObjectImpl(GraphicsContext3D*, Platform3DObject) override;
  • trunk/Source/WebCore/html/canvas/WebGLRenderbuffer.cpp

    r178411 r178674  
    3131
    3232#include "WebGLContextGroup.h"
    33 #include "WebGLRenderingContext.h"
     33#include "WebGLRenderingContextBase.h"
    3434
    3535namespace WebCore {
    3636
    37 PassRefPtr<WebGLRenderbuffer> WebGLRenderbuffer::create(WebGLRenderingContext* ctx)
     37PassRefPtr<WebGLRenderbuffer> WebGLRenderbuffer::create(WebGLRenderingContextBase* ctx)
    3838{
    3939    return adoptRef(new WebGLRenderbuffer(ctx));
     
    4545}
    4646
    47 WebGLRenderbuffer::WebGLRenderbuffer(WebGLRenderingContext* ctx)
     47WebGLRenderbuffer::WebGLRenderbuffer(WebGLRenderingContextBase* ctx)
    4848    : WebGLSharedObject(ctx)
    4949    , m_internalFormat(GraphicsContext3D::RGBA4)
  • trunk/Source/WebCore/html/canvas/WebGLRenderbuffer.h

    r178411 r178674  
    3838    virtual ~WebGLRenderbuffer();
    3939
    40     static PassRefPtr<WebGLRenderbuffer> create(WebGLRenderingContext*);
     40    static PassRefPtr<WebGLRenderbuffer> create(WebGLRenderingContextBase*);
    4141
    4242    void setInternalFormat(GC3Denum internalformat)
     
    6666
    6767protected:
    68     WebGLRenderbuffer(WebGLRenderingContext*);
     68    WebGLRenderbuffer(WebGLRenderingContextBase*);
    6969
    7070    virtual void deleteObjectImpl(GraphicsContext3D*, Platform3DObject) override;
  • trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp

    r178604 r178674  
    11/*
    2  * Copyright (C) 2009, 2013, 2014 Apple Inc. All rights reserved.
     2 * Copyright (C) 2015 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2727
    2828#if ENABLE(WEBGL)
    29 
    30 #include "WebGLRenderingContext.h"
     29#include "WebGLRenderingContextBase.h"
    3130
    3231#include "ANGLEInstancedArrays.h"
     
    6564#include "RenderBox.h"
    6665#include "Settings.h"
     66#include "WebGL2RenderingContext.h"
    6767#include "WebGLActiveInfo.h"
    6868#include "WebGLBuffer.h"
     
    8181#include "WebGLProgram.h"
    8282#include "WebGLRenderbuffer.h"
     83#include "WebGLRenderingContext.h"
    8384#include "WebGLShader.h"
    8485#include "WebGLShaderPrecisionFormat.h"
     
    372373    WTF_MAKE_FAST_ALLOCATED;
    373374public:
    374     explicit WebGLRenderingContextLostCallback(WebGLRenderingContext* cb) : m_context(cb) { }
     375    explicit WebGLRenderingContextLostCallback(WebGLRenderingContextBase* cb) : m_context(cb) { }
    375376    virtual void onContextLost() override { m_context->forceLostContext(WebGLRenderingContext::RealLostContext); }
    376377    virtual ~WebGLRenderingContextLostCallback() {}
    377378private:
    378     WebGLRenderingContext* m_context;
     379    WebGLRenderingContextBase* m_context;
    379380};
    380381
     
    382383    WTF_MAKE_FAST_ALLOCATED;
    383384public:
    384     explicit WebGLRenderingContextErrorMessageCallback(WebGLRenderingContext* cb) : m_context(cb) { }
     385    explicit WebGLRenderingContextErrorMessageCallback(WebGLRenderingContextBase* cb) : m_context(cb) { }
    385386    virtual void onErrorMessage(const String& message, GC3Dint) override
    386387    {
     
    390391    virtual ~WebGLRenderingContextErrorMessageCallback() { }
    391392private:
    392     WebGLRenderingContext* m_context;
     393    WebGLRenderingContextBase* m_context;
    393394};
    394395
    395 std::unique_ptr<WebGLRenderingContext> WebGLRenderingContext::create(HTMLCanvasElement* canvas, WebGLContextAttributes* attrs)
     396std::unique_ptr<WebGLRenderingContextBase> WebGLRenderingContextBase::create(HTMLCanvasElement* canvas, WebGLContextAttributes* attrs, const String& type)
    396397{
    397398    Document& document = canvas->document();
     
    443444    if (isPendingPolicyResolution) {
    444445        LOG(WebGL, "Create a WebGL context that looks real, but will require a policy resolution if used.");
    445         std::unique_ptr<WebGLRenderingContext> renderingContext(new WebGLRenderingContext(canvas, attributes));
    446         renderingContext->suspendIfNeeded();
    447         return renderingContext;
     446        std::unique_ptr<WebGLRenderingContextBase> renderingContext = nullptr;
     447        if (type == "experimental-webgl2")
     448            renderingContext = std::unique_ptr<WebGL2RenderingContext>(new WebGL2RenderingContext(canvas, attributes));
     449        else
     450            renderingContext = std::unique_ptr<WebGLRenderingContext>(new WebGLRenderingContext(canvas, attributes));
    448451    }
    449452
     
    460463        extensions->pushGroupMarkerEXT("WebGLRenderingContext");
    461464
    462     std::unique_ptr<WebGLRenderingContext> renderingContext(new WebGLRenderingContext(canvas, context, attributes));
     465    std::unique_ptr<WebGLRenderingContextBase> renderingContext = nullptr;
     466    if (type == "experimental-webgl2")
     467        renderingContext = std::unique_ptr<WebGL2RenderingContext>(new WebGL2RenderingContext(canvas, context, attributes));
     468    else
     469        renderingContext = std::unique_ptr<WebGLRenderingContext>(new WebGLRenderingContext(canvas, context, attributes));
    463470    renderingContext->suspendIfNeeded();
    464471
     
    466473}
    467474
    468 WebGLRenderingContext::WebGLRenderingContext(HTMLCanvasElement* passedCanvas, GraphicsContext3D::Attributes attributes)
     475WebGLRenderingContextBase::WebGLRenderingContextBase(HTMLCanvasElement* passedCanvas, GraphicsContext3D::Attributes attributes)
    469476    : CanvasRenderingContext(passedCanvas)
    470477    , ActiveDOMObject(&passedCanvas->document())
    471478    , m_context(0)
    472479    , m_drawingBuffer(0)
    473     , m_dispatchContextLostEventTimer(*this, &WebGLRenderingContext::dispatchContextLostEvent)
     480    , m_dispatchContextLostEventTimer(*this, &WebGLRenderingContextBase::dispatchContextLostEvent)
    474481    , m_restoreAllowed(false)
    475     , m_restoreTimer(*this, &WebGLRenderingContext::maybeRestoreContext)
     482    , m_restoreTimer(*this, &WebGLRenderingContextBase::maybeRestoreContext)
    476483    , m_generatedImageCache(0)
    477484    , m_contextLost(false)
     
    485492}
    486493
    487 WebGLRenderingContext::WebGLRenderingContext(HTMLCanvasElement* passedCanvas, PassRefPtr<GraphicsContext3D> context,
    488     GraphicsContext3D::Attributes attributes)
     494WebGLRenderingContextBase::WebGLRenderingContextBase(HTMLCanvasElement* passedCanvas, PassRefPtr<GraphicsContext3D> context, GraphicsContext3D::Attributes attributes)
    489495    : CanvasRenderingContext(passedCanvas)
    490496    , ActiveDOMObject(&passedCanvas->document())
    491497    , m_context(context)
    492498    , m_drawingBuffer(0)
    493     , m_dispatchContextLostEventTimer(*this, &WebGLRenderingContext::dispatchContextLostEvent)
     499    , m_dispatchContextLostEventTimer(*this, &WebGLRenderingContextBase::dispatchContextLostEvent)
    494500    , m_restoreAllowed(false)
    495     , m_restoreTimer(*this, &WebGLRenderingContext::maybeRestoreContext)
     501    , m_restoreTimer(*this, &WebGLRenderingContextBase::maybeRestoreContext)
    496502    , m_generatedImageCache(4)
    497503    , m_contextLost(false)
     
    517523}
    518524
    519 void WebGLRenderingContext::initializeNewContext()
     525void WebGLRenderingContextBase::initializeNewContext()
    520526{
    521527    ASSERT(!m_contextLost);
     
    598604}
    599605
    600 void WebGLRenderingContext::setupFlags()
     606void WebGLRenderingContextBase::setupFlags()
    601607{
    602608    ASSERT(m_context);
     
    618624}
    619625
    620 bool WebGLRenderingContext::allowPrivilegedExtensions() const
     626bool WebGLRenderingContextBase::allowPrivilegedExtensions() const
    621627{
    622628    if (Page* page = canvas()->document().page())
     
    625631}
    626632
    627 void WebGLRenderingContext::addCompressedTextureFormat(GC3Denum format)
     633void WebGLRenderingContextBase::addCompressedTextureFormat(GC3Denum format)
    628634{
    629635    if (!m_compressedTextureFormats.contains(format))
     
    631637}
    632638
    633 WebGLRenderingContext::~WebGLRenderingContext()
     639WebGLRenderingContextBase::~WebGLRenderingContextBase()
    634640{
    635641    // Remove all references to WebGLObjects so if they are the last reference
     
    658664}
    659665
    660 void WebGLRenderingContext::destroyGraphicsContext3D()
     666void WebGLRenderingContextBase::destroyGraphicsContext3D()
    661667{
    662668    if (m_isPendingPolicyResolution)
     
    675681}
    676682
    677 void WebGLRenderingContext::markContextChanged()
     683void WebGLRenderingContextBase::markContextChanged()
    678684{
    679685    if (m_framebufferBinding)
     
    699705}
    700706
    701 bool WebGLRenderingContext::clearIfComposited(GC3Dbitfield mask)
     707bool WebGLRenderingContextBase::clearIfComposited(GC3Dbitfield mask)
    702708{
    703709    if (isContextLostOrPending())
     
    753759}
    754760
    755 void WebGLRenderingContext::restoreStateAfterClear()
     761void WebGLRenderingContextBase::restoreStateAfterClear()
    756762{
    757763    // Restore the state that the context set.
     
    768774}
    769775
    770 void WebGLRenderingContext::markLayerComposited()
     776void WebGLRenderingContextBase::markLayerComposited()
    771777{
    772778    if (isContextLostOrPending())
     
    775781}
    776782
    777 void WebGLRenderingContext::paintRenderingResultsToCanvas()
     783void WebGLRenderingContextBase::paintRenderingResultsToCanvas()
    778784{
    779785    if (isContextLostOrPending())
     
    811817}
    812818
    813 PassRefPtr<ImageData> WebGLRenderingContext::paintRenderingResultsToImageData()
     819PassRefPtr<ImageData> WebGLRenderingContextBase::paintRenderingResultsToImageData()
    814820{
    815821    if (isContextLostOrPending())
     
    830836}
    831837
    832 void WebGLRenderingContext::reshape(int width, int height)
     838void WebGLRenderingContextBase::reshape(int width, int height)
    833839{
    834840    if (isContextLostOrPending())
     
    867873}
    868874
    869 int WebGLRenderingContext::drawingBufferWidth() const
     875int WebGLRenderingContextBase::drawingBufferWidth() const
    870876{
    871877    if (m_drawingBuffer)
     
    875881}
    876882
    877 int WebGLRenderingContext::drawingBufferHeight() const
     883int WebGLRenderingContextBase::drawingBufferHeight() const
    878884{
    879885    if (m_drawingBuffer)
     
    883889}
    884890
    885 unsigned int WebGLRenderingContext::sizeInBytes(GC3Denum type)
     891unsigned WebGLRenderingContextBase::sizeInBytes(GC3Denum type)
    886892{
    887893    switch (type) {
     
    905911}
    906912
    907 void WebGLRenderingContext::activeTexture(GC3Denum texture, ExceptionCode& ec)
     913void WebGLRenderingContextBase::activeTexture(GC3Denum texture, ExceptionCode& ec)
    908914{
    909915    UNUSED_PARAM(ec);
     
    921927}
    922928
    923 void WebGLRenderingContext::attachShader(WebGLProgram* program, WebGLShader* shader, ExceptionCode& ec)
     929void WebGLRenderingContextBase::attachShader(WebGLProgram* program, WebGLShader* shader, ExceptionCode& ec)
    924930{
    925931    UNUSED_PARAM(ec);
     
    934940}
    935941
    936 void WebGLRenderingContext::bindAttribLocation(WebGLProgram* program, GC3Duint index, const String& name, ExceptionCode& ec)
     942void WebGLRenderingContextBase::bindAttribLocation(WebGLProgram* program, GC3Duint index, const String& name, ExceptionCode& ec)
    937943{
    938944    UNUSED_PARAM(ec);
     
    954960}
    955961
    956 bool WebGLRenderingContext::checkObjectToBeBound(const char* functionName, WebGLObject* object, bool& deleted)
     962bool WebGLRenderingContextBase::checkObjectToBeBound(const char* functionName, WebGLObject* object, bool& deleted)
    957963{
    958964    deleted = false;
     
    969975}
    970976
    971 void WebGLRenderingContext::bindBuffer(GC3Denum target, WebGLBuffer* buffer, ExceptionCode& ec)
     977void WebGLRenderingContextBase::bindBuffer(GC3Denum target, WebGLBuffer* buffer, ExceptionCode& ec)
    972978{
    973979    UNUSED_PARAM(ec);
     
    9951001}
    9961002
    997 void WebGLRenderingContext::bindFramebuffer(GC3Denum target, WebGLFramebuffer* buffer, ExceptionCode& ec)
     1003void WebGLRenderingContextBase::bindFramebuffer(GC3Denum target, WebGLFramebuffer* buffer, ExceptionCode& ec)
    9981004{
    9991005    UNUSED_PARAM(ec);
     
    10201026}
    10211027
    1022 void WebGLRenderingContext::bindRenderbuffer(GC3Denum target, WebGLRenderbuffer* renderBuffer, ExceptionCode& ec)
     1028void WebGLRenderingContextBase::bindRenderbuffer(GC3Denum target, WebGLRenderbuffer* renderBuffer, ExceptionCode& ec)
    10231029{
    10241030    UNUSED_PARAM(ec);
     
    10381044}
    10391045
    1040 void WebGLRenderingContext::bindTexture(GC3Denum target, WebGLTexture* texture, ExceptionCode& ec)
     1046void WebGLRenderingContextBase::bindTexture(GC3Denum target, WebGLTexture* texture, ExceptionCode& ec)
    10411047{
    10421048    UNUSED_PARAM(ec);
     
    10791085}
    10801086
    1081 void WebGLRenderingContext::blendColor(GC3Dfloat red, GC3Dfloat green, GC3Dfloat blue, GC3Dfloat alpha)
     1087void WebGLRenderingContextBase::blendColor(GC3Dfloat red, GC3Dfloat green, GC3Dfloat blue, GC3Dfloat alpha)
    10821088{
    10831089    if (isContextLostOrPending())
     
    10861092}
    10871093
    1088 void WebGLRenderingContext::blendEquation(GC3Denum mode)
     1094void WebGLRenderingContextBase::blendEquation(GC3Denum mode)
    10891095{
    10901096    if (isContextLostOrPending() || !validateBlendEquation("blendEquation", mode))
     
    10931099}
    10941100
    1095 void WebGLRenderingContext::blendEquationSeparate(GC3Denum modeRGB, GC3Denum modeAlpha)
     1101void WebGLRenderingContextBase::blendEquationSeparate(GC3Denum modeRGB, GC3Denum modeAlpha)
    10961102{
    10971103    if (isContextLostOrPending() || !validateBlendEquation("blendEquation", modeRGB) || !validateBlendEquation("blendEquation", modeAlpha))
     
    11011107
    11021108
    1103 void WebGLRenderingContext::blendFunc(GC3Denum sfactor, GC3Denum dfactor)
     1109void WebGLRenderingContextBase::blendFunc(GC3Denum sfactor, GC3Denum dfactor)
    11041110{
    11051111    if (isContextLostOrPending() || !validateBlendFuncFactors("blendFunc", sfactor, dfactor))
     
    11081114}
    11091115
    1110 void WebGLRenderingContext::blendFuncSeparate(GC3Denum srcRGB, GC3Denum dstRGB, GC3Denum srcAlpha, GC3Denum dstAlpha)
     1116void WebGLRenderingContextBase::blendFuncSeparate(GC3Denum srcRGB, GC3Denum dstRGB, GC3Denum srcAlpha, GC3Denum dstAlpha)
    11111117{
    11121118    // Note: Alpha does not have the same restrictions as RGB.
     
    11161122}
    11171123
    1118 void WebGLRenderingContext::bufferData(GC3Denum target, long long size, GC3Denum usage, ExceptionCode& ec)
     1124void WebGLRenderingContextBase::bufferData(GC3Denum target, long long size, GC3Denum usage, ExceptionCode& ec)
    11191125{
    11201126    UNUSED_PARAM(ec);
     
    11471153}
    11481154
    1149 void WebGLRenderingContext::bufferData(GC3Denum target, ArrayBuffer* data, GC3Denum usage, ExceptionCode& ec)
     1155void WebGLRenderingContextBase::bufferData(GC3Denum target, ArrayBuffer* data, GC3Denum usage, ExceptionCode& ec)
    11501156{
    11511157    UNUSED_PARAM(ec);
     
    11741180}
    11751181
    1176 void WebGLRenderingContext::bufferData(GC3Denum target, ArrayBufferView* data, GC3Denum usage, ExceptionCode& ec)
     1182void WebGLRenderingContextBase::bufferData(GC3Denum target, ArrayBufferView* data, GC3Denum usage, ExceptionCode& ec)
    11771183{
    11781184    UNUSED_PARAM(ec);
     
    12011207}
    12021208
    1203 void WebGLRenderingContext::bufferSubData(GC3Denum target, long long offset, ArrayBuffer* data, ExceptionCode& ec)
     1209void WebGLRenderingContextBase::bufferSubData(GC3Denum target, long long offset, ArrayBuffer* data, ExceptionCode& ec)
    12041210{
    12051211    UNUSED_PARAM(ec);
     
    12301236}
    12311237
    1232 void WebGLRenderingContext::bufferSubData(GC3Denum target, long long offset, ArrayBufferView* data, ExceptionCode& ec)
     1238void WebGLRenderingContextBase::bufferSubData(GC3Denum target, long long offset, ArrayBufferView* data, ExceptionCode& ec)
    12331239{
    12341240    UNUSED_PARAM(ec);
     
    12591265}
    12601266
    1261 GC3Denum WebGLRenderingContext::checkFramebufferStatus(GC3Denum target)
     1267GC3Denum WebGLRenderingContextBase::checkFramebufferStatus(GC3Denum target)
    12621268{
    12631269    if (isContextLostOrPending())
     
    12791285}
    12801286
    1281 void WebGLRenderingContext::clear(GC3Dbitfield mask)
     1287void WebGLRenderingContextBase::clear(GC3Dbitfield mask)
    12821288{
    12831289    if (isContextLostOrPending())
     
    12971303}
    12981304
    1299 void WebGLRenderingContext::clearColor(GC3Dfloat r, GC3Dfloat g, GC3Dfloat b, GC3Dfloat a)
     1305void WebGLRenderingContextBase::clearColor(GC3Dfloat r, GC3Dfloat g, GC3Dfloat b, GC3Dfloat a)
    13001306{
    13011307    if (isContextLostOrPending())
     
    13161322}
    13171323
    1318 void WebGLRenderingContext::clearDepth(GC3Dfloat depth)
     1324void WebGLRenderingContextBase::clearDepth(GC3Dfloat depth)
    13191325{
    13201326    if (isContextLostOrPending())
     
    13241330}
    13251331
    1326 void WebGLRenderingContext::clearStencil(GC3Dint s)
     1332void WebGLRenderingContextBase::clearStencil(GC3Dint s)
    13271333{
    13281334    if (isContextLostOrPending())
     
    13321338}
    13331339
    1334 void WebGLRenderingContext::colorMask(GC3Dboolean red, GC3Dboolean green, GC3Dboolean blue, GC3Dboolean alpha)
     1340void WebGLRenderingContextBase::colorMask(GC3Dboolean red, GC3Dboolean green, GC3Dboolean blue, GC3Dboolean alpha)
    13351341{
    13361342    if (isContextLostOrPending())
     
    13431349}
    13441350
    1345 void WebGLRenderingContext::compileShader(WebGLShader* shader, ExceptionCode& ec)
     1351void WebGLRenderingContextBase::compileShader(WebGLShader* shader, ExceptionCode& ec)
    13461352{
    13471353    UNUSED_PARAM(ec);
     
    13541360}
    13551361
    1356 void WebGLRenderingContext::compressedTexImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Dsizei width,
     1362void WebGLRenderingContextBase::compressedTexImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Dsizei width,
    13571363                                                 GC3Dsizei height, GC3Dint border, ArrayBufferView* data)
    13581364{
     
    13971403}
    13981404
    1399 void WebGLRenderingContext::compressedTexSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset,
     1405void WebGLRenderingContextBase::compressedTexSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset,
    14001406                                                    GC3Dsizei width, GC3Dsizei height, GC3Denum format, ArrayBufferView* data)
    14011407{
     
    14281434}
    14291435
    1430 bool WebGLRenderingContext::validateSettableTexFormat(const char* functionName, GC3Denum format)
     1436bool WebGLRenderingContextBase::validateSettableTexFormat(const char* functionName, GC3Denum format)
    14311437{
    14321438    if (GraphicsContext3D::getClearBitsByFormat(format) & (GraphicsContext3D::DEPTH_BUFFER_BIT | GraphicsContext3D::STENCIL_BUFFER_BIT)) {
     
    14371443}
    14381444
    1439 void WebGLRenderingContext::copyTexImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height, GC3Dint border)
     1445void WebGLRenderingContextBase::copyTexImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height, GC3Dint border)
    14401446{
    14411447    if (isContextLostOrPending())
     
    14831489}
    14841490
    1485 void WebGLRenderingContext::copyTexSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height)
     1491void WebGLRenderingContextBase::copyTexSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height)
    14861492{
    14871493    if (isContextLostOrPending())
     
    15531559}
    15541560
    1555 PassRefPtr<WebGLBuffer> WebGLRenderingContext::createBuffer()
     1561PassRefPtr<WebGLBuffer> WebGLRenderingContextBase::createBuffer()
    15561562{
    15571563    if (isContextLostOrPending())
     
    15621568}
    15631569
    1564 PassRefPtr<WebGLFramebuffer> WebGLRenderingContext::createFramebuffer()
     1570PassRefPtr<WebGLFramebuffer> WebGLRenderingContextBase::createFramebuffer()
    15651571{
    15661572    if (isContextLostOrPending())
     
    15711577}
    15721578
    1573 PassRefPtr<WebGLTexture> WebGLRenderingContext::createTexture()
     1579PassRefPtr<WebGLTexture> WebGLRenderingContextBase::createTexture()
    15741580{
    15751581    if (isContextLostOrPending())
     
    15801586}
    15811587
    1582 PassRefPtr<WebGLProgram> WebGLRenderingContext::createProgram()
     1588PassRefPtr<WebGLProgram> WebGLRenderingContextBase::createProgram()
    15831589{
    15841590    if (isContextLostOrPending())
     
    15891595}
    15901596
    1591 PassRefPtr<WebGLRenderbuffer> WebGLRenderingContext::createRenderbuffer()
     1597PassRefPtr<WebGLRenderbuffer> WebGLRenderingContextBase::createRenderbuffer()
    15921598{
    15931599    if (isContextLostOrPending())
     
    15981604}
    15991605
    1600 PassRefPtr<WebGLShader> WebGLRenderingContext::createShader(GC3Denum type, ExceptionCode& ec)
     1606PassRefPtr<WebGLShader> WebGLRenderingContextBase::createShader(GC3Denum type, ExceptionCode& ec)
    16011607{
    16021608    UNUSED_PARAM(ec);
     
    16131619}
    16141620
    1615 void WebGLRenderingContext::cullFace(GC3Denum mode)
     1621void WebGLRenderingContextBase::cullFace(GC3Denum mode)
    16161622{
    16171623    if (isContextLostOrPending())
     
    16201626}
    16211627
    1622 bool WebGLRenderingContext::deleteObject(WebGLObject* object)
     1628bool WebGLRenderingContextBase::deleteObject(WebGLObject* object)
    16231629{
    16241630    if (isContextLostOrPending() || !object)
     
    16351641}
    16361642
    1637 void WebGLRenderingContext::deleteBuffer(WebGLBuffer* buffer)
     1643void WebGLRenderingContextBase::deleteBuffer(WebGLBuffer* buffer)
    16381644{
    16391645    if (!deleteObject(buffer))
     
    16451651}
    16461652
    1647 void WebGLRenderingContext::deleteFramebuffer(WebGLFramebuffer* framebuffer)
     1653void WebGLRenderingContextBase::deleteFramebuffer(WebGLFramebuffer* framebuffer)
    16481654{
    16491655    if (!deleteObject(framebuffer))
     
    16601666}
    16611667
    1662 void WebGLRenderingContext::deleteProgram(WebGLProgram* program)
     1668void WebGLRenderingContextBase::deleteProgram(WebGLProgram* program)
    16631669{
    16641670    deleteObject(program);
     
    16671673}
    16681674
    1669 void WebGLRenderingContext::deleteRenderbuffer(WebGLRenderbuffer* renderbuffer)
     1675void WebGLRenderingContextBase::deleteRenderbuffer(WebGLRenderbuffer* renderbuffer)
    16701676{
    16711677    if (!deleteObject(renderbuffer))
     
    16771683}
    16781684
    1679 void WebGLRenderingContext::deleteShader(WebGLShader* shader)
     1685void WebGLRenderingContextBase::deleteShader(WebGLShader* shader)
    16801686{
    16811687    deleteObject(shader);
    16821688}
    16831689
    1684 void WebGLRenderingContext::deleteTexture(WebGLTexture* texture)
     1690void WebGLRenderingContextBase::deleteTexture(WebGLTexture* texture)
    16851691{
    16861692    if (!deleteObject(texture))
     
    16961702}
    16971703
    1698 void WebGLRenderingContext::depthFunc(GC3Denum func)
     1704void WebGLRenderingContextBase::depthFunc(GC3Denum func)
    16991705{
    17001706    if (isContextLostOrPending())
     
    17031709}
    17041710
    1705 void WebGLRenderingContext::depthMask(GC3Dboolean flag)
     1711void WebGLRenderingContextBase::depthMask(GC3Dboolean flag)
    17061712{
    17071713    if (isContextLostOrPending())
     
    17111717}
    17121718
    1713 void WebGLRenderingContext::depthRange(GC3Dfloat zNear, GC3Dfloat zFar)
     1719void WebGLRenderingContextBase::depthRange(GC3Dfloat zNear, GC3Dfloat zFar)
    17141720{
    17151721    if (isContextLostOrPending())
     
    17221728}
    17231729
    1724 void WebGLRenderingContext::detachShader(WebGLProgram* program, WebGLShader* shader, ExceptionCode& ec)
     1730void WebGLRenderingContextBase::detachShader(WebGLProgram* program, WebGLShader* shader, ExceptionCode& ec)
    17251731{
    17261732    UNUSED_PARAM(ec);
     
    17351741}
    17361742
    1737 void WebGLRenderingContext::disable(GC3Denum cap)
     1743void WebGLRenderingContextBase::disable(GC3Denum cap)
    17381744{
    17391745    if (isContextLostOrPending() || !validateCapability("disable", cap))
     
    17521758}
    17531759
    1754 void WebGLRenderingContext::disableVertexAttribArray(GC3Duint index, ExceptionCode& ec)
     1760void WebGLRenderingContextBase::disableVertexAttribArray(GC3Duint index, ExceptionCode& ec)
    17551761{
    17561762    UNUSED_PARAM(ec);
     
    17691775}
    17701776
    1771 bool WebGLRenderingContext::validateElementArraySize(GC3Dsizei count, GC3Denum type, GC3Dintptr offset)
     1777bool WebGLRenderingContextBase::validateElementArraySize(GC3Dsizei count, GC3Denum type, GC3Dintptr offset)
    17721778{
    17731779    RefPtr<WebGLBuffer> elementArrayBuffer = m_boundVertexArrayObject->getElementArrayBuffer();
     
    18091815}
    18101816
    1811 bool WebGLRenderingContext::validateIndexArrayConservative(GC3Denum type, unsigned& numElementsRequired)
     1817bool WebGLRenderingContextBase::validateIndexArrayConservative(GC3Denum type, unsigned& numElementsRequired)
    18121818{
    18131819    // Performs conservative validation by caching a maximum index of
     
    18711877}
    18721878
    1873 bool WebGLRenderingContext::validateIndexArrayPrecise(GC3Dsizei count, GC3Denum type, GC3Dintptr offset, unsigned& numElementsRequired)
     1879bool WebGLRenderingContextBase::validateIndexArrayPrecise(GC3Dsizei count, GC3Denum type, GC3Dintptr offset, unsigned& numElementsRequired)
    18741880{
    18751881    ASSERT(count >= 0 && offset >= 0);
     
    19241930}
    19251931
    1926 bool WebGLRenderingContext::validateVertexAttributes(unsigned elementCount, unsigned primitiveCount)
     1932bool WebGLRenderingContextBase::validateVertexAttributes(unsigned elementCount, unsigned primitiveCount)
    19271933{
    19281934    if (!m_currentProgram)
     
    19771983}
    19781984
    1979 bool WebGLRenderingContext::validateWebGLObject(const char* functionName, WebGLObject* object)
     1985bool WebGLRenderingContextBase::validateWebGLObject(const char* functionName, WebGLObject* object)
    19801986{
    19811987    if (!object || !object->object()) {
     
    19901996}
    19911997
    1992 bool WebGLRenderingContext::validateDrawArrays(const char* functionName, GC3Denum mode, GC3Dint first, GC3Dsizei count, GC3Dsizei primitiveCount)
     1998bool WebGLRenderingContextBase::validateDrawArrays(const char* functionName, GC3Denum mode, GC3Dint first, GC3Dsizei count, GC3Dsizei primitiveCount)
    19931999{
    19942000    if (isContextLostOrPending() || !validateDrawMode(functionName, mode))
     
    20392045}
    20402046
    2041 void WebGLRenderingContext::drawArrays(GC3Denum mode, GC3Dint first, GC3Dsizei count, ExceptionCode& ec)
     2047void WebGLRenderingContextBase::drawArrays(GC3Denum mode, GC3Dint first, GC3Dsizei count, ExceptionCode& ec)
    20422048{
    20432049    UNUSED_PARAM(ec);
     
    20632069}
    20642070
    2065 bool WebGLRenderingContext::validateDrawElements(const char* functionName, GC3Denum mode, GC3Dsizei count, GC3Denum type, long long offset, unsigned& numElements, GC3Dsizei primitiveCount)
     2071bool WebGLRenderingContextBase::validateDrawElements(const char* functionName, GC3Denum mode, GC3Dsizei count, GC3Denum type, long long offset, unsigned& numElements, GC3Dsizei primitiveCount)
    20662072{
    20672073    if (isContextLostOrPending() || !validateDrawMode(functionName, mode))
     
    21432149}
    21442150
    2145 void WebGLRenderingContext::drawElements(GC3Denum mode, GC3Dsizei count, GC3Denum type, long long offset, ExceptionCode& ec)
     2151void WebGLRenderingContextBase::drawElements(GC3Denum mode, GC3Dsizei count, GC3Denum type, long long offset, ExceptionCode& ec)
    21462152{
    21472153    UNUSED_PARAM(ec);
     
    21712177}
    21722178
    2173 void WebGLRenderingContext::enable(GC3Denum cap)
     2179void WebGLRenderingContextBase::enable(GC3Denum cap)
    21742180{
    21752181    if (isContextLostOrPending() || !validateCapability("enable", cap))
     
    21882194}
    21892195
    2190 void WebGLRenderingContext::enableVertexAttribArray(GC3Duint index, ExceptionCode& ec)
     2196void WebGLRenderingContextBase::enableVertexAttribArray(GC3Duint index, ExceptionCode& ec)
    21912197{
    21922198    UNUSED_PARAM(ec);
     
    22042210}
    22052211
    2206 void WebGLRenderingContext::finish()
     2212void WebGLRenderingContextBase::finish()
    22072213{
    22082214    if (isContextLostOrPending())
     
    22112217}
    22122218
    2213 void WebGLRenderingContext::flush()
     2219void WebGLRenderingContextBase::flush()
    22142220{
    22152221    if (isContextLostOrPending())
     
    22182224}
    22192225
    2220 void WebGLRenderingContext::framebufferRenderbuffer(GC3Denum target, GC3Denum attachment, GC3Denum renderbuffertarget, WebGLRenderbuffer* buffer, ExceptionCode& ec)
     2226void WebGLRenderingContextBase::framebufferRenderbuffer(GC3Denum target, GC3Denum attachment, GC3Denum renderbuffertarget, WebGLRenderbuffer* buffer, ExceptionCode& ec)
    22212227{
    22222228    UNUSED_PARAM(ec);
     
    22512257}
    22522258
    2253 void WebGLRenderingContext::framebufferTexture2D(GC3Denum target, GC3Denum attachment, GC3Denum textarget, WebGLTexture* texture, GC3Dint level, ExceptionCode& ec)
     2259void WebGLRenderingContextBase::framebufferTexture2D(GC3Denum target, GC3Denum attachment, GC3Denum textarget, WebGLTexture* texture, GC3Dint level, ExceptionCode& ec)
    22542260{
    22552261    UNUSED_PARAM(ec);
     
    22902296}
    22912297
    2292 void WebGLRenderingContext::frontFace(GC3Denum mode)
     2298void WebGLRenderingContextBase::frontFace(GC3Denum mode)
    22932299{
    22942300    if (isContextLostOrPending())
     
    22972303}
    22982304
    2299 void WebGLRenderingContext::generateMipmap(GC3Denum target)
     2305void WebGLRenderingContextBase::generateMipmap(GC3Denum target)
    23002306{
    23012307    if (isContextLostOrPending())
     
    23332339}
    23342340
    2335 PassRefPtr<WebGLActiveInfo> WebGLRenderingContext::getActiveAttrib(WebGLProgram* program, GC3Duint index, ExceptionCode& ec)
     2341PassRefPtr<WebGLActiveInfo> WebGLRenderingContextBase::getActiveAttrib(WebGLProgram* program, GC3Duint index, ExceptionCode& ec)
    23362342{
    23372343    UNUSED_PARAM(ec);
     
    23472353}
    23482354
    2349 PassRefPtr<WebGLActiveInfo> WebGLRenderingContext::getActiveUniform(WebGLProgram* program, GC3Duint index, ExceptionCode& ec)
     2355PassRefPtr<WebGLActiveInfo> WebGLRenderingContextBase::getActiveUniform(WebGLProgram* program, GC3Duint index, ExceptionCode& ec)
    23502356{
    23512357    UNUSED_PARAM(ec);
     
    23642370}
    23652371
    2366 bool WebGLRenderingContext::getAttachedShaders(WebGLProgram* program, Vector<RefPtr<WebGLShader>>& shaderObjects, ExceptionCode& ec)
     2372bool WebGLRenderingContextBase::getAttachedShaders(WebGLProgram* program, Vector<RefPtr<WebGLShader>>& shaderObjects, ExceptionCode& ec)
    23672373{
    23682374    UNUSED_PARAM(ec);
     
    23832389}
    23842390
    2385 GC3Dint WebGLRenderingContext::getAttribLocation(WebGLProgram* program, const String& name)
     2391GC3Dint WebGLRenderingContextBase::getAttribLocation(WebGLProgram* program, const String& name)
    23862392{
    23872393    if (isContextLostOrPending() || !validateWebGLObject("getAttribLocation", program))
     
    24002406}
    24012407
    2402 WebGLGetInfo WebGLRenderingContext::getBufferParameter(GC3Denum target, GC3Denum pname, ExceptionCode& ec)
     2408WebGLGetInfo WebGLRenderingContextBase::getBufferParameter(GC3Denum target, GC3Denum pname, ExceptionCode& ec)
    24032409{
    24042410    UNUSED_PARAM(ec);
     
    24222428}
    24232429
    2424 PassRefPtr<WebGLContextAttributes> WebGLRenderingContext::getContextAttributes()
     2430PassRefPtr<WebGLContextAttributes> WebGLRenderingContextBase::getContextAttributes()
    24252431{
    24262432    if (isContextLostOrPending())
     
    24452451}
    24462452
    2447 GC3Denum WebGLRenderingContext::getError()
     2453GC3Denum WebGLRenderingContextBase::getError()
    24482454{
    24492455    if (m_isPendingPolicyResolution)
     
    24522458}
    24532459
    2454 WebGLExtension* WebGLRenderingContext::getExtension(const String& name)
     2460WebGLExtension* WebGLRenderingContextBase::getExtension(const String& name)
    24552461{
    24562462    if (isContextLostOrPending())
     
    26152621}
    26162622
    2617 WebGLGetInfo WebGLRenderingContext::getFramebufferAttachmentParameter(GC3Denum target, GC3Denum attachment, GC3Denum pname, ExceptionCode& ec)
     2623WebGLGetInfo WebGLRenderingContextBase::getFramebufferAttachmentParameter(GC3Denum target, GC3Denum attachment, GC3Denum pname, ExceptionCode& ec)
    26182624{
    26192625    UNUSED_PARAM(ec);
     
    26752681}
    26762682
    2677 WebGLGetInfo WebGLRenderingContext::getParameter(GC3Denum pname, ExceptionCode& ec)
     2683WebGLGetInfo WebGLRenderingContextBase::getParameter(GC3Denum pname, ExceptionCode& ec)
    26782684{
    26792685    UNUSED_PARAM(ec);
     
    29132919}
    29142920
    2915 WebGLGetInfo WebGLRenderingContext::getProgramParameter(WebGLProgram* program, GC3Denum pname, ExceptionCode& ec)
     2921WebGLGetInfo WebGLRenderingContextBase::getProgramParameter(WebGLProgram* program, GC3Denum pname, ExceptionCode& ec)
    29162922{
    29172923    UNUSED_PARAM(ec);
     
    29412947}
    29422948
    2943 String WebGLRenderingContext::getProgramInfoLog(WebGLProgram* program, ExceptionCode& ec)
     2949String WebGLRenderingContextBase::getProgramInfoLog(WebGLProgram* program, ExceptionCode& ec)
    29442950{
    29452951    UNUSED_PARAM(ec);
     
    29512957}
    29522958
    2953 WebGLGetInfo WebGLRenderingContext::getRenderbufferParameter(GC3Denum target, GC3Denum pname, ExceptionCode& ec)
     2959WebGLGetInfo WebGLRenderingContextBase::getRenderbufferParameter(GC3Denum target, GC3Denum pname, ExceptionCode& ec)
    29542960{
    29552961    UNUSED_PARAM(ec);
     
    30173023}
    30183024
    3019 WebGLGetInfo WebGLRenderingContext::getShaderParameter(WebGLShader* shader, GC3Denum pname, ExceptionCode& ec)
     3025WebGLGetInfo WebGLRenderingContextBase::getShaderParameter(WebGLShader* shader, GC3Denum pname, ExceptionCode& ec)
    30203026{
    30213027    UNUSED_PARAM(ec);
     
    30383044}
    30393045
    3040 String WebGLRenderingContext::getShaderInfoLog(WebGLShader* shader, ExceptionCode& ec)
     3046String WebGLRenderingContextBase::getShaderInfoLog(WebGLShader* shader, ExceptionCode& ec)
    30413047{
    30423048    UNUSED_PARAM(ec);
     
    30483054}
    30493055
    3050 PassRefPtr<WebGLShaderPrecisionFormat> WebGLRenderingContext::getShaderPrecisionFormat(GC3Denum shaderType, GC3Denum precisionType, ExceptionCode& ec)
     3056PassRefPtr<WebGLShaderPrecisionFormat> WebGLRenderingContextBase::getShaderPrecisionFormat(GC3Denum shaderType, GC3Denum precisionType, ExceptionCode& ec)
    30513057{
    30523058    UNUSED_PARAM(ec);
     
    30803086}
    30813087
    3082 String WebGLRenderingContext::getShaderSource(WebGLShader* shader, ExceptionCode& ec)
     3088String WebGLRenderingContextBase::getShaderSource(WebGLShader* shader, ExceptionCode& ec)
    30833089{
    30843090    UNUSED_PARAM(ec);
     
    30903096}
    30913097
    3092 Vector<String> WebGLRenderingContext::getSupportedExtensions()
     3098Vector<String> WebGLRenderingContextBase::getSupportedExtensions()
    30933099{
    30943100    Vector<String> result;
     
    31443150}
    31453151
    3146 WebGLGetInfo WebGLRenderingContext::getTexParameter(GC3Denum target, GC3Denum pname, ExceptionCode& ec)
     3152WebGLGetInfo WebGLRenderingContextBase::getTexParameter(GC3Denum target, GC3Denum pname, ExceptionCode& ec)
    31473153{
    31483154    UNUSED_PARAM(ec);
     
    31733179}
    31743180
    3175 WebGLGetInfo WebGLRenderingContext::getUniform(WebGLProgram* program, const WebGLUniformLocation* uniformLocation, ExceptionCode& ec)
     3181WebGLGetInfo WebGLRenderingContextBase::getUniform(WebGLProgram* program, const WebGLUniformLocation* uniformLocation, ExceptionCode& ec)
    31763182{
    31773183    UNUSED_PARAM(ec);
     
    33013307}
    33023308
    3303 PassRefPtr<WebGLUniformLocation> WebGLRenderingContext::getUniformLocation(WebGLProgram* program, const String& name, ExceptionCode& ec)
     3309PassRefPtr<WebGLUniformLocation> WebGLRenderingContextBase::getUniformLocation(WebGLProgram* program, const String& name, ExceptionCode& ec)
    33043310{
    33053311    UNUSED_PARAM(ec);
     
    33403346}
    33413347
    3342 WebGLGetInfo WebGLRenderingContext::getVertexAttrib(GC3Duint index, GC3Denum pname, ExceptionCode& ec)
     3348WebGLGetInfo WebGLRenderingContextBase::getVertexAttrib(GC3Duint index, GC3Denum pname, ExceptionCode& ec)
    33433349{
    33443350    UNUSED_PARAM(ec);
     
    33823388}
    33833389
    3384 long long WebGLRenderingContext::getVertexAttribOffset(GC3Duint index, GC3Denum pname)
     3390long long WebGLRenderingContextBase::getVertexAttribOffset(GC3Duint index, GC3Denum pname)
    33853391{
    33863392    if (isContextLostOrPending())
     
    33903396}
    33913397
    3392 void WebGLRenderingContext::hint(GC3Denum target, GC3Denum mode)
     3398void WebGLRenderingContextBase::hint(GC3Denum target, GC3Denum mode)
    33933399{
    33943400    if (isContextLostOrPending())
     
    34113417}
    34123418
    3413 GC3Dboolean WebGLRenderingContext::isBuffer(WebGLBuffer* buffer)
     3419GC3Dboolean WebGLRenderingContextBase::isBuffer(WebGLBuffer* buffer)
    34143420{
    34153421    if (!buffer || isContextLostOrPending())
     
    34223428}
    34233429
    3424 bool WebGLRenderingContext::isContextLost() const
     3430bool WebGLRenderingContextBase::isContextLost() const
    34253431{
    34263432    return m_contextLost;
    34273433}
    34283434
    3429 bool WebGLRenderingContext::isContextLostOrPending()
     3435bool WebGLRenderingContextBase::isContextLostOrPending()
    34303436{
    34313437    if (m_isPendingPolicyResolution && !m_hasRequestedPolicyResolution) {
     
    34453451}
    34463452
    3447 GC3Dboolean WebGLRenderingContext::isEnabled(GC3Denum cap)
     3453GC3Dboolean WebGLRenderingContextBase::isEnabled(GC3Denum cap)
    34483454{
    34493455    if (isContextLostOrPending() || !validateCapability("isEnabled", cap))
     
    34543460}
    34553461
    3456 GC3Dboolean WebGLRenderingContext::isFramebuffer(WebGLFramebuffer* framebuffer)
     3462GC3Dboolean WebGLRenderingContextBase::isFramebuffer(WebGLFramebuffer* framebuffer)
    34573463{
    34583464    if (!framebuffer || isContextLostOrPending())
     
    34653471}
    34663472
    3467 GC3Dboolean WebGLRenderingContext::isProgram(WebGLProgram* program)
     3473GC3Dboolean WebGLRenderingContextBase::isProgram(WebGLProgram* program)
    34683474{
    34693475    if (!program || isContextLostOrPending())
     
    34733479}
    34743480
    3475 GC3Dboolean WebGLRenderingContext::isRenderbuffer(WebGLRenderbuffer* renderbuffer)
     3481GC3Dboolean WebGLRenderingContextBase::isRenderbuffer(WebGLRenderbuffer* renderbuffer)
    34763482{
    34773483    if (!renderbuffer || isContextLostOrPending())
     
    34843490}
    34853491
    3486 GC3Dboolean WebGLRenderingContext::isShader(WebGLShader* shader)
     3492GC3Dboolean WebGLRenderingContextBase::isShader(WebGLShader* shader)
    34873493{
    34883494    if (!shader || isContextLostOrPending())
     
    34923498}
    34933499
    3494 GC3Dboolean WebGLRenderingContext::isTexture(WebGLTexture* texture)
     3500GC3Dboolean WebGLRenderingContextBase::isTexture(WebGLTexture* texture)
    34953501{
    34963502    if (!texture || isContextLostOrPending())
     
    35033509}
    35043510
    3505 void WebGLRenderingContext::lineWidth(GC3Dfloat width)
     3511void WebGLRenderingContextBase::lineWidth(GC3Dfloat width)
    35063512{
    35073513    if (isContextLostOrPending())
     
    35103516}
    35113517
    3512 void WebGLRenderingContext::linkProgram(WebGLProgram* program, ExceptionCode& ec)
     3518void WebGLRenderingContextBase::linkProgram(WebGLProgram* program, ExceptionCode& ec)
    35133519{
    35143520    UNUSED_PARAM(ec);
     
    35283534}
    35293535
    3530 void WebGLRenderingContext::pixelStorei(GC3Denum pname, GC3Dint param)
     3536void WebGLRenderingContextBase::pixelStorei(GC3Denum pname, GC3Dint param)
    35313537{
    35323538    if (isContextLostOrPending())
     
    35663572}
    35673573
    3568 void WebGLRenderingContext::polygonOffset(GC3Dfloat factor, GC3Dfloat units)
     3574void WebGLRenderingContextBase::polygonOffset(GC3Dfloat factor, GC3Dfloat units)
    35693575{
    35703576    if (isContextLostOrPending())
     
    35733579}
    35743580
    3575 void WebGLRenderingContext::readPixels(GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height, GC3Denum format, GC3Denum type, ArrayBufferView* pixels, ExceptionCode&)
     3581void WebGLRenderingContextBase::readPixels(GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height, GC3Denum format, GC3Denum type, ArrayBufferView* pixels, ExceptionCode&)
    35763582{
    35773583    if (isContextLostOrPending())
     
    36633669}
    36643670
    3665 void WebGLRenderingContext::releaseShaderCompiler()
     3671void WebGLRenderingContextBase::releaseShaderCompiler()
    36663672{
    36673673    if (isContextLostOrPending())
     
    36703676}
    36713677
    3672 void WebGLRenderingContext::renderbufferStorage(GC3Denum target, GC3Denum internalformat, GC3Dsizei width, GC3Dsizei height)
     3678void WebGLRenderingContextBase::renderbufferStorage(GC3Denum target, GC3Denum internalformat, GC3Dsizei width, GC3Dsizei height)
    36733679{
    36743680    if (isContextLostOrPending())
     
    37153721}
    37163722
    3717 void WebGLRenderingContext::sampleCoverage(GC3Dfloat value, GC3Dboolean invert)
     3723void WebGLRenderingContextBase::sampleCoverage(GC3Dfloat value, GC3Dboolean invert)
    37183724{
    37193725    if (isContextLostOrPending())
     
    37223728}
    37233729
    3724 void WebGLRenderingContext::scissor(GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height)
     3730void WebGLRenderingContextBase::scissor(GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height)
    37253731{
    37263732    if (isContextLostOrPending())
     
    37313737}
    37323738
    3733 void WebGLRenderingContext::shaderSource(WebGLShader* shader, const String& string, ExceptionCode& ec)
     3739void WebGLRenderingContextBase::shaderSource(WebGLShader* shader, const String& string, ExceptionCode& ec)
    37343740{
    37353741    UNUSED_PARAM(ec);
     
    37433749}
    37443750
    3745 void WebGLRenderingContext::stencilFunc(GC3Denum func, GC3Dint ref, GC3Duint mask)
     3751void WebGLRenderingContextBase::stencilFunc(GC3Denum func, GC3Dint ref, GC3Duint mask)
    37463752{
    37473753    if (isContextLostOrPending())
     
    37563762}
    37573763
    3758 void WebGLRenderingContext::stencilFuncSeparate(GC3Denum face, GC3Denum func, GC3Dint ref, GC3Duint mask)
     3764void WebGLRenderingContextBase::stencilFuncSeparate(GC3Denum face, GC3Denum func, GC3Dint ref, GC3Duint mask)
    37593765{
    37603766    if (isContextLostOrPending())
     
    37843790}
    37853791
    3786 void WebGLRenderingContext::stencilMask(GC3Duint mask)
     3792void WebGLRenderingContextBase::stencilMask(GC3Duint mask)
    37873793{
    37883794    if (isContextLostOrPending())
     
    37933799}
    37943800
    3795 void WebGLRenderingContext::stencilMaskSeparate(GC3Denum face, GC3Duint mask)
     3801void WebGLRenderingContextBase::stencilMaskSeparate(GC3Denum face, GC3Duint mask)
    37963802{
    37973803    if (isContextLostOrPending())
     
    38153821}
    38163822
    3817 void WebGLRenderingContext::stencilOp(GC3Denum fail, GC3Denum zfail, GC3Denum zpass)
     3823void WebGLRenderingContextBase::stencilOp(GC3Denum fail, GC3Denum zfail, GC3Denum zpass)
    38183824{
    38193825    if (isContextLostOrPending())
     
    38223828}
    38233829
    3824 void WebGLRenderingContext::stencilOpSeparate(GC3Denum face, GC3Denum fail, GC3Denum zfail, GC3Denum zpass)
     3830void WebGLRenderingContextBase::stencilOpSeparate(GC3Denum face, GC3Denum fail, GC3Denum zfail, GC3Denum zpass)
    38253831{
    38263832    if (isContextLostOrPending())
     
    38293835}
    38303836
    3831 void WebGLRenderingContext::texImage2DBase(GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Dsizei width, GC3Dsizei height, GC3Dint border, GC3Denum format, GC3Denum type, const void* pixels, ExceptionCode& ec)
     3837void WebGLRenderingContextBase::texImage2DBase(GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Dsizei width, GC3Dsizei height, GC3Dint border, GC3Denum format, GC3Denum type, const void* pixels, ExceptionCode& ec)
    38323838{
    38333839    // FIXME: For now we ignore any errors returned.
     
    38643870}
    38653871
    3866 void WebGLRenderingContext::texImage2DImpl(GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Denum format, GC3Denum type, Image* image, GraphicsContext3D::ImageHtmlDomSource domSource, bool flipY, bool premultiplyAlpha, ExceptionCode& ec)
     3872void WebGLRenderingContextBase::texImage2DImpl(GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Denum format, GC3Denum type, Image* image, GraphicsContext3D::ImageHtmlDomSource domSource, bool flipY, bool premultiplyAlpha, ExceptionCode& ec)
    38673873{
    38683874    ec = 0;
     
    38943900}
    38953901
    3896 bool WebGLRenderingContext::validateTexFunc(const char* functionName, TexFuncValidationFunctionType functionType, TexFuncValidationSourceType sourceType, GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Dsizei width, GC3Dsizei height, GC3Dint border, GC3Denum format, GC3Denum type, GC3Dint xoffset, GC3Dint yoffset)
     3902bool WebGLRenderingContextBase::validateTexFunc(const char* functionName, TexFuncValidationFunctionType functionType, TexFuncValidationSourceType sourceType, GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Dsizei width, GC3Dsizei height, GC3Dint border, GC3Denum format, GC3Denum type, GC3Dint xoffset, GC3Dint yoffset)
    38973903{
    38983904    if (!validateTexFuncParameters(functionName, functionType, target, level, internalformat, width, height, border, format, type))
     
    39373943}
    39383944
    3939 void WebGLRenderingContext::texImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat,
     3945void WebGLRenderingContextBase::texImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat,
    39403946                                       GC3Dsizei width, GC3Dsizei height, GC3Dint border,
    39413947                                       GC3Denum format, GC3Denum type, ArrayBufferView* pixels, ExceptionCode& ec)
     
    39653971}
    39663972
    3967 void WebGLRenderingContext::texImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat,
     3973void WebGLRenderingContextBase::texImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat,
    39683974                                       GC3Denum format, GC3Denum type, ImageData* pixels, ExceptionCode& ec)
    39693975{
     
    39903996}
    39913997
    3992 PassRefPtr<Image> WebGLRenderingContext::drawImageIntoBuffer(Image* image, int width, int height, int deviceScaleFactor)
     3998PassRefPtr<Image> WebGLRenderingContextBase::drawImageIntoBuffer(Image* image, int width, int height, int deviceScaleFactor)
    39933999{
    39944000    IntSize size(width, height);
     
    40064012}
    40074013
    4008 void WebGLRenderingContext::texImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat,
     4014void WebGLRenderingContextBase::texImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat,
    40094015                                       GC3Denum format, GC3Denum type, HTMLImageElement* image, ExceptionCode& ec)
    40104016{
     
    40234029}
    40244030
    4025 void WebGLRenderingContext::texImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat,
     4031void WebGLRenderingContextBase::texImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat,
    40264032                                       GC3Denum format, GC3Denum type, HTMLCanvasElement* canvas, ExceptionCode& ec)
    40274033{
     
    40534059
    40544060#if ENABLE(VIDEO)
    4055 PassRefPtr<Image> WebGLRenderingContext::videoFrameToImage(HTMLVideoElement* video, BackingStoreCopy backingStoreCopy, ExceptionCode&)
     4061PassRefPtr<Image> WebGLRenderingContextBase::videoFrameToImage(HTMLVideoElement* video, BackingStoreCopy backingStoreCopy, ExceptionCode&)
    40564062{
    40574063    IntSize size(video->videoWidth(), video->videoHeight());
     
    40674073}
    40684074
    4069 void WebGLRenderingContext::texImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat,
     4075void WebGLRenderingContextBase::texImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat,
    40704076                                       GC3Denum format, GC3Denum type, HTMLVideoElement* video, ExceptionCode& ec)
    40714077{
     
    40994105#endif
    41004106
    4101 void WebGLRenderingContext::texParameter(GC3Denum target, GC3Denum pname, GC3Dfloat paramf, GC3Dint parami, bool isFloat)
     4107void WebGLRenderingContextBase::texParameter(GC3Denum target, GC3Denum pname, GC3Dfloat paramf, GC3Dint parami, bool isFloat)
    41024108{
    41034109    if (isContextLostOrPending())
     
    41374143}
    41384144
    4139 void WebGLRenderingContext::texParameterf(GC3Denum target, GC3Denum pname, GC3Dfloat param)
     4145void WebGLRenderingContextBase::texParameterf(GC3Denum target, GC3Denum pname, GC3Dfloat param)
    41404146{
    41414147    texParameter(target, pname, param, 0, true);
    41424148}
    41434149
    4144 void WebGLRenderingContext::texParameteri(GC3Denum target, GC3Denum pname, GC3Dint param)
     4150void WebGLRenderingContextBase::texParameteri(GC3Denum target, GC3Denum pname, GC3Dint param)
    41454151{
    41464152    texParameter(target, pname, 0, param, false);
    41474153}
    41484154
    4149 void WebGLRenderingContext::texSubImage2DBase(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, GC3Dsizei width, GC3Dsizei height, GC3Denum format, GC3Denum type, const void* pixels, ExceptionCode& ec)
     4155void WebGLRenderingContextBase::texSubImage2DBase(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, GC3Dsizei width, GC3Dsizei height, GC3Denum format, GC3Denum type, const void* pixels, ExceptionCode& ec)
    41504156{
    41514157    // FIXME: For now we ignore any errors returned
     
    41694175}
    41704176
    4171 void WebGLRenderingContext::texSubImage2DImpl(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, GC3Denum format, GC3Denum type, Image* image, GraphicsContext3D::ImageHtmlDomSource domSource, bool flipY, bool premultiplyAlpha, ExceptionCode& ec)
     4177void WebGLRenderingContextBase::texSubImage2DImpl(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, GC3Denum format, GC3Denum type, Image* image, GraphicsContext3D::ImageHtmlDomSource domSource, bool flipY, bool premultiplyAlpha, ExceptionCode& ec)
    41724178{
    41734179    ec = 0;
     
    41994205}
    42004206
    4201 void WebGLRenderingContext::texSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset,
     4207void WebGLRenderingContextBase::texSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset,
    42024208                                          GC3Dsizei width, GC3Dsizei height,
    42034209                                          GC3Denum format, GC3Denum type, ArrayBufferView* pixels, ExceptionCode& ec)
     
    42264232}
    42274233
    4228 void WebGLRenderingContext::texSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset,
     4234void WebGLRenderingContextBase::texSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset,
    42294235                                          GC3Denum format, GC3Denum type, ImageData* pixels, ExceptionCode& ec)
    42304236{
     
    42524258}
    42534259
    4254 void WebGLRenderingContext::texSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset,
     4260void WebGLRenderingContextBase::texSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset,
    42554261                                          GC3Denum format, GC3Denum type, HTMLImageElement* image, ExceptionCode& ec)
    42564262{
     
    42694275}
    42704276
    4271 void WebGLRenderingContext::texSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset,
     4277void WebGLRenderingContextBase::texSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset,
    42724278                                          GC3Denum format, GC3Denum type, HTMLCanvasElement* canvas, ExceptionCode& ec)
    42734279{
     
    42854291
    42864292#if ENABLE(VIDEO)
    4287 void WebGLRenderingContext::texSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset,
     4293void WebGLRenderingContextBase::texSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset,
    42884294                                          GC3Denum format, GC3Denum type, HTMLVideoElement* video, ExceptionCode& ec)
    42894295{
     
    43004306#endif
    43014307
    4302 void WebGLRenderingContext::uniform1f(const WebGLUniformLocation* location, GC3Dfloat x, ExceptionCode& ec)
     4308void WebGLRenderingContextBase::uniform1f(const WebGLUniformLocation* location, GC3Dfloat x, ExceptionCode& ec)
    43034309{
    43044310    UNUSED_PARAM(ec);
     
    43144320}
    43154321
    4316 void WebGLRenderingContext::uniform1fv(const WebGLUniformLocation* location, Float32Array* v, ExceptionCode& ec)
     4322void WebGLRenderingContextBase::uniform1fv(const WebGLUniformLocation* location, Float32Array* v, ExceptionCode& ec)
    43174323{
    43184324    UNUSED_PARAM(ec);
     
    43234329}
    43244330
    4325 void WebGLRenderingContext::uniform1fv(const WebGLUniformLocation* location, GC3Dfloat* v, GC3Dsizei size, ExceptionCode& ec)
     4331void WebGLRenderingContextBase::uniform1fv(const WebGLUniformLocation* location, GC3Dfloat* v, GC3Dsizei size, ExceptionCode& ec)
    43264332{
    43274333    UNUSED_PARAM(ec);
     
    43324338}
    43334339
    4334 void WebGLRenderingContext::uniform1i(const WebGLUniformLocation* location, GC3Dint x, ExceptionCode& ec)
     4340void WebGLRenderingContextBase::uniform1i(const WebGLUniformLocation* location, GC3Dint x, ExceptionCode& ec)
    43354341{
    43364342    UNUSED_PARAM(ec);
     
    43514357}
    43524358
    4353 void WebGLRenderingContext::uniform1iv(const WebGLUniformLocation* location, Int32Array* v, ExceptionCode& ec)
     4359void WebGLRenderingContextBase::uniform1iv(const WebGLUniformLocation* location, Int32Array* v, ExceptionCode& ec)
    43544360{
    43554361    UNUSED_PARAM(ec);
     
    43694375}
    43704376
    4371 void WebGLRenderingContext::uniform1iv(const WebGLUniformLocation* location, GC3Dint* v, GC3Dsizei size, ExceptionCode& ec)
     4377void WebGLRenderingContextBase::uniform1iv(const WebGLUniformLocation* location, GC3Dint* v, GC3Dsizei size, ExceptionCode& ec)
    43724378{
    43734379    UNUSED_PARAM(ec);
     
    43864392}
    43874393
    4388 void WebGLRenderingContext::uniform2f(const WebGLUniformLocation* location, GC3Dfloat x, GC3Dfloat y, ExceptionCode& ec)
     4394void WebGLRenderingContextBase::uniform2f(const WebGLUniformLocation* location, GC3Dfloat x, GC3Dfloat y, ExceptionCode& ec)
    43894395{
    43904396    UNUSED_PARAM(ec);
     
    44004406}
    44014407
    4402 void WebGLRenderingContext::uniform2fv(const WebGLUniformLocation* location, Float32Array* v, ExceptionCode& ec)
     4408void WebGLRenderingContextBase::uniform2fv(const WebGLUniformLocation* location, Float32Array* v, ExceptionCode& ec)
    44034409{
    44044410    UNUSED_PARAM(ec);
     
    44094415}
    44104416
    4411 void WebGLRenderingContext::uniform2fv(const WebGLUniformLocation* location, GC3Dfloat* v, GC3Dsizei size, ExceptionCode& ec)
     4417void WebGLRenderingContextBase::uniform2fv(const WebGLUniformLocation* location, GC3Dfloat* v, GC3Dsizei size, ExceptionCode& ec)
    44124418{
    44134419    UNUSED_PARAM(ec);
     
    44184424}
    44194425
    4420 void WebGLRenderingContext::uniform2i(const WebGLUniformLocation* location, GC3Dint x, GC3Dint y, ExceptionCode& ec)
     4426void WebGLRenderingContextBase::uniform2i(const WebGLUniformLocation* location, GC3Dint x, GC3Dint y, ExceptionCode& ec)
    44214427{
    44224428    UNUSED_PARAM(ec);
     
    44324438}
    44334439
    4434 void WebGLRenderingContext::uniform2iv(const WebGLUniformLocation* location, Int32Array* v, ExceptionCode& ec)
     4440void WebGLRenderingContextBase::uniform2iv(const WebGLUniformLocation* location, Int32Array* v, ExceptionCode& ec)
    44354441{
    44364442    UNUSED_PARAM(ec);
     
    44414447}
    44424448
    4443 void WebGLRenderingContext::uniform2iv(const WebGLUniformLocation* location, GC3Dint* v, GC3Dsizei size, ExceptionCode& ec)
     4449void WebGLRenderingContextBase::uniform2iv(const WebGLUniformLocation* location, GC3Dint* v, GC3Dsizei size, ExceptionCode& ec)
    44444450{
    44454451    UNUSED_PARAM(ec);
     
    44504456}
    44514457
    4452 void WebGLRenderingContext::uniform3f(const WebGLUniformLocation* location, GC3Dfloat x, GC3Dfloat y, GC3Dfloat z, ExceptionCode& ec)
     4458void WebGLRenderingContextBase::uniform3f(const WebGLUniformLocation* location, GC3Dfloat x, GC3Dfloat y, GC3Dfloat z, ExceptionCode& ec)
    44534459{
    44544460    UNUSED_PARAM(ec);
     
    44644470}
    44654471
    4466 void WebGLRenderingContext::uniform3fv(const WebGLUniformLocation* location, Float32Array* v, ExceptionCode& ec)
     4472void WebGLRenderingContextBase::uniform3fv(const WebGLUniformLocation* location, Float32Array* v, ExceptionCode& ec)
    44674473{
    44684474    UNUSED_PARAM(ec);
     
    44734479}
    44744480
    4475 void WebGLRenderingContext::uniform3fv(const WebGLUniformLocation* location, GC3Dfloat* v, GC3Dsizei size, ExceptionCode& ec)
     4481void WebGLRenderingContextBase::uniform3fv(const WebGLUniformLocation* location, GC3Dfloat* v, GC3Dsizei size, ExceptionCode& ec)
    44764482{
    44774483    UNUSED_PARAM(ec);
     
    44824488}
    44834489
    4484 void WebGLRenderingContext::uniform3i(const WebGLUniformLocation* location, GC3Dint x, GC3Dint y, GC3Dint z, ExceptionCode& ec)
     4490void WebGLRenderingContextBase::uniform3i(const WebGLUniformLocation* location, GC3Dint x, GC3Dint y, GC3Dint z, ExceptionCode& ec)
    44854491{
    44864492    UNUSED_PARAM(ec);
     
    44964502}
    44974503
    4498 void WebGLRenderingContext::uniform3iv(const WebGLUniformLocation* location, Int32Array* v, ExceptionCode& ec)
     4504void WebGLRenderingContextBase::uniform3iv(const WebGLUniformLocation* location, Int32Array* v, ExceptionCode& ec)
    44994505{
    45004506    UNUSED_PARAM(ec);
     
    45054511}
    45064512
    4507 void WebGLRenderingContext::uniform3iv(const WebGLUniformLocation* location, GC3Dint* v, GC3Dsizei size, ExceptionCode& ec)
     4513void WebGLRenderingContextBase::uniform3iv(const WebGLUniformLocation* location, GC3Dint* v, GC3Dsizei size, ExceptionCode& ec)
    45084514{
    45094515    UNUSED_PARAM(ec);
     
    45144520}
    45154521
    4516 void WebGLRenderingContext::uniform4f(const WebGLUniformLocation* location, GC3Dfloat x, GC3Dfloat y, GC3Dfloat z, GC3Dfloat w, ExceptionCode& ec)
     4522void WebGLRenderingContextBase::uniform4f(const WebGLUniformLocation* location, GC3Dfloat x, GC3Dfloat y, GC3Dfloat z, GC3Dfloat w, ExceptionCode& ec)
    45174523{
    45184524    UNUSED_PARAM(ec);
     
    45284534}
    45294535
    4530 void WebGLRenderingContext::uniform4fv(const WebGLUniformLocation* location, Float32Array* v, ExceptionCode& ec)
     4536void WebGLRenderingContextBase::uniform4fv(const WebGLUniformLocation* location, Float32Array* v, ExceptionCode& ec)
    45314537{
    45324538    UNUSED_PARAM(ec);
     
    45374543}
    45384544
    4539 void WebGLRenderingContext::uniform4fv(const WebGLUniformLocation* location, GC3Dfloat* v, GC3Dsizei size, ExceptionCode& ec)
     4545void WebGLRenderingContextBase::uniform4fv(const WebGLUniformLocation* location, GC3Dfloat* v, GC3Dsizei size, ExceptionCode& ec)
    45404546{
    45414547    UNUSED_PARAM(ec);
     
    45464552}
    45474553
    4548 void WebGLRenderingContext::uniform4i(const WebGLUniformLocation* location, GC3Dint x, GC3Dint y, GC3Dint z, GC3Dint w, ExceptionCode& ec)
     4554void WebGLRenderingContextBase::uniform4i(const WebGLUniformLocation* location, GC3Dint x, GC3Dint y, GC3Dint z, GC3Dint w, ExceptionCode& ec)
    45494555{
    45504556    UNUSED_PARAM(ec);
     
    45604566}
    45614567
    4562 void WebGLRenderingContext::uniform4iv(const WebGLUniformLocation* location, Int32Array* v, ExceptionCode& ec)
     4568void WebGLRenderingContextBase::uniform4iv(const WebGLUniformLocation* location, Int32Array* v, ExceptionCode& ec)
    45634569{
    45644570    UNUSED_PARAM(ec);
     
    45694575}
    45704576
    4571 void WebGLRenderingContext::uniform4iv(const WebGLUniformLocation* location, GC3Dint* v, GC3Dsizei size, ExceptionCode& ec)
     4577void WebGLRenderingContextBase::uniform4iv(const WebGLUniformLocation* location, GC3Dint* v, GC3Dsizei size, ExceptionCode& ec)
    45724578{
    45734579    UNUSED_PARAM(ec);
     
    45784584}
    45794585
    4580 void WebGLRenderingContext::uniformMatrix2fv(const WebGLUniformLocation* location, GC3Dboolean transpose, Float32Array* v, ExceptionCode& ec)
     4586void WebGLRenderingContextBase::uniformMatrix2fv(const WebGLUniformLocation* location, GC3Dboolean transpose, Float32Array* v, ExceptionCode& ec)
    45814587{
    45824588    UNUSED_PARAM(ec);
     
    45864592}
    45874593
    4588 void WebGLRenderingContext::uniformMatrix2fv(const WebGLUniformLocation* location, GC3Dboolean transpose, GC3Dfloat* v, GC3Dsizei size, ExceptionCode& ec)
     4594void WebGLRenderingContextBase::uniformMatrix2fv(const WebGLUniformLocation* location, GC3Dboolean transpose, GC3Dfloat* v, GC3Dsizei size, ExceptionCode& ec)
    45894595{
    45904596    UNUSED_PARAM(ec);
     
    45944600}
    45954601
    4596 void WebGLRenderingContext::uniformMatrix3fv(const WebGLUniformLocation* location, GC3Dboolean transpose, Float32Array* v, ExceptionCode& ec)
     4602void WebGLRenderingContextBase::uniformMatrix3fv(const WebGLUniformLocation* location, GC3Dboolean transpose, Float32Array* v, ExceptionCode& ec)
    45974603{
    45984604    UNUSED_PARAM(ec);
     
    46024608}
    46034609
    4604 void WebGLRenderingContext::uniformMatrix3fv(const WebGLUniformLocation* location, GC3Dboolean transpose, GC3Dfloat* v, GC3Dsizei size, ExceptionCode& ec)
     4610void WebGLRenderingContextBase::uniformMatrix3fv(const WebGLUniformLocation* location, GC3Dboolean transpose, GC3Dfloat* v, GC3Dsizei size, ExceptionCode& ec)
    46054611{
    46064612    UNUSED_PARAM(ec);
     
    46104616}
    46114617
    4612 void WebGLRenderingContext::uniformMatrix4fv(const WebGLUniformLocation* location, GC3Dboolean transpose, Float32Array* v, ExceptionCode& ec)
     4618void WebGLRenderingContextBase::uniformMatrix4fv(const WebGLUniformLocation* location, GC3Dboolean transpose, Float32Array* v, ExceptionCode& ec)
    46134619{
    46144620    UNUSED_PARAM(ec);
     
    46184624}
    46194625
    4620 void WebGLRenderingContext::uniformMatrix4fv(const WebGLUniformLocation* location, GC3Dboolean transpose, GC3Dfloat* v, GC3Dsizei size, ExceptionCode& ec)
     4626void WebGLRenderingContextBase::uniformMatrix4fv(const WebGLUniformLocation* location, GC3Dboolean transpose, GC3Dfloat* v, GC3Dsizei size, ExceptionCode& ec)
    46214627{
    46224628    UNUSED_PARAM(ec);
     
    46264632}
    46274633
    4628 void WebGLRenderingContext::useProgram(WebGLProgram* program, ExceptionCode& ec)
     4634void WebGLRenderingContextBase::useProgram(WebGLProgram* program, ExceptionCode& ec)
    46294635{
    46304636    UNUSED_PARAM(ec);
     
    46484654}
    46494655
    4650 void WebGLRenderingContext::validateProgram(WebGLProgram* program, ExceptionCode& ec)
     4656void WebGLRenderingContextBase::validateProgram(WebGLProgram* program, ExceptionCode& ec)
    46514657{
    46524658    UNUSED_PARAM(ec);
     
    46564662}
    46574663
    4658 void WebGLRenderingContext::vertexAttrib1f(GC3Duint index, GC3Dfloat v0)
     4664void WebGLRenderingContextBase::vertexAttrib1f(GC3Duint index, GC3Dfloat v0)
    46594665{
    46604666    vertexAttribfImpl("vertexAttrib1f", index, 1, v0, 0.0f, 0.0f, 1.0f);
    46614667}
    46624668
    4663 void WebGLRenderingContext::vertexAttrib1fv(GC3Duint index, Float32Array* v)
     4669void WebGLRenderingContextBase::vertexAttrib1fv(GC3Duint index, Float32Array* v)
    46644670{
    46654671    vertexAttribfvImpl("vertexAttrib1fv", index, v, 1);
    46664672}
    46674673
    4668 void WebGLRenderingContext::vertexAttrib1fv(GC3Duint index, GC3Dfloat* v, GC3Dsizei size)
     4674void WebGLRenderingContextBase::vertexAttrib1fv(GC3Duint index, GC3Dfloat* v, GC3Dsizei size)
    46694675{
    46704676    vertexAttribfvImpl("vertexAttrib1fv", index, v, size, 1);
    46714677}
    46724678
    4673 void WebGLRenderingContext::vertexAttrib2f(GC3Duint index, GC3Dfloat v0, GC3Dfloat v1)
     4679void WebGLRenderingContextBase::vertexAttrib2f(GC3Duint index, GC3Dfloat v0, GC3Dfloat v1)
    46744680{
    46754681    vertexAttribfImpl("vertexAttrib2f", index, 2, v0, v1, 0.0f, 1.0f);
    46764682}
    46774683
    4678 void WebGLRenderingContext::vertexAttrib2fv(GC3Duint index, Float32Array* v)
     4684void WebGLRenderingContextBase::vertexAttrib2fv(GC3Duint index, Float32Array* v)
    46794685{
    46804686    vertexAttribfvImpl("vertexAttrib2fv", index, v, 2);
    46814687}
    46824688
    4683 void WebGLRenderingContext::vertexAttrib2fv(GC3Duint index, GC3Dfloat* v, GC3Dsizei size)
     4689void WebGLRenderingContextBase::vertexAttrib2fv(GC3Duint index, GC3Dfloat* v, GC3Dsizei size)
    46844690{
    46854691    vertexAttribfvImpl("vertexAttrib2fv", index, v, size, 2);
    46864692}
    46874693
    4688 void WebGLRenderingContext::vertexAttrib3f(GC3Duint index, GC3Dfloat v0, GC3Dfloat v1, GC3Dfloat v2)
     4694void WebGLRenderingContextBase::vertexAttrib3f(GC3Duint index, GC3Dfloat v0, GC3Dfloat v1, GC3Dfloat v2)
    46894695{
    46904696    vertexAttribfImpl("vertexAttrib3f", index, 3, v0, v1, v2, 1.0f);
    46914697}
    46924698
    4693 void WebGLRenderingContext::vertexAttrib3fv(GC3Duint index, Float32Array* v)
     4699void WebGLRenderingContextBase::vertexAttrib3fv(GC3Duint index, Float32Array* v)
    46944700{
    46954701    vertexAttribfvImpl("vertexAttrib3fv", index, v, 3);
    46964702}
    46974703
    4698 void WebGLRenderingContext::vertexAttrib3fv(GC3Duint index, GC3Dfloat* v, GC3Dsizei size)
     4704void WebGLRenderingContextBase::vertexAttrib3fv(GC3Duint index, GC3Dfloat* v, GC3Dsizei size)
    46994705{
    47004706    vertexAttribfvImpl("vertexAttrib3fv", index, v, size, 3);
    47014707}
    47024708
    4703 void WebGLRenderingContext::vertexAttrib4f(GC3Duint index, GC3Dfloat v0, GC3Dfloat v1, GC3Dfloat v2, GC3Dfloat v3)
     4709void WebGLRenderingContextBase::vertexAttrib4f(GC3Duint index, GC3Dfloat v0, GC3Dfloat v1, GC3Dfloat v2, GC3Dfloat v3)
    47044710{
    47054711    vertexAttribfImpl("vertexAttrib4f", index, 4, v0, v1, v2, v3);
    47064712}
    47074713
    4708 void WebGLRenderingContext::vertexAttrib4fv(GC3Duint index, Float32Array* v)
     4714void WebGLRenderingContextBase::vertexAttrib4fv(GC3Duint index, Float32Array* v)
    47094715{
    47104716    vertexAttribfvImpl("vertexAttrib4fv", index, v, 4);
    47114717}
    47124718
    4713 void WebGLRenderingContext::vertexAttrib4fv(GC3Duint index, GC3Dfloat* v, GC3Dsizei size)
     4719void WebGLRenderingContextBase::vertexAttrib4fv(GC3Duint index, GC3Dfloat* v, GC3Dsizei size)
    47144720{
    47154721    vertexAttribfvImpl("vertexAttrib4fv", index, v, size, 4);
    47164722}
    47174723
    4718 void WebGLRenderingContext::vertexAttribPointer(GC3Duint index, GC3Dint size, GC3Denum type, GC3Dboolean normalized, GC3Dsizei stride, long long offset, ExceptionCode& ec)
     4724void WebGLRenderingContextBase::vertexAttribPointer(GC3Duint index, GC3Dint size, GC3Denum type, GC3Dboolean normalized, GC3Dsizei stride, long long offset, ExceptionCode& ec)
    47194725{
    47204726    UNUSED_PARAM(ec);
     
    47604766}
    47614767
    4762 void WebGLRenderingContext::viewport(GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height)
     4768void WebGLRenderingContextBase::viewport(GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height)
    47634769{
    47644770    if (isContextLostOrPending())
     
    47694775}
    47704776
    4771 void WebGLRenderingContext::forceLostContext(WebGLRenderingContext::LostContextMode mode)
     4777void WebGLRenderingContextBase::forceLostContext(WebGLRenderingContextBase::LostContextMode mode)
    47724778{
    47734779    if (isContextLostOrPending()) {
     
    47794785}
    47804786
    4781 void WebGLRenderingContext::loseContextImpl(WebGLRenderingContext::LostContextMode mode)
     4787void WebGLRenderingContextBase::loseContextImpl(WebGLRenderingContextBase::LostContextMode mode)
    47824788{
    47834789    if (isContextLost())
     
    48224828}
    48234829
    4824 void WebGLRenderingContext::forceRestoreContext()
     4830void WebGLRenderingContextBase::forceRestoreContext()
    48254831{
    48264832    if (!isContextLostOrPending()) {
     
    48394845}
    48404846
    4841 PlatformLayer* WebGLRenderingContext::platformLayer() const
     4847PlatformLayer* WebGLRenderingContextBase::platformLayer() const
    48424848{
    48434849    return (!isContextLost() && !m_isPendingPolicyResolution) ? m_context->platformLayer() : 0;
    48444850}
    48454851
    4846 void WebGLRenderingContext::removeSharedObject(WebGLSharedObject* object)
     4852void WebGLRenderingContextBase::removeSharedObject(WebGLSharedObject* object)
    48474853{
    48484854    if (m_isPendingPolicyResolution)
     
    48524858}
    48534859
    4854 void WebGLRenderingContext::addSharedObject(WebGLSharedObject* object)
     4860void WebGLRenderingContextBase::addSharedObject(WebGLSharedObject* object)
    48554861{
    48564862    if (m_isPendingPolicyResolution)
     
    48614867}
    48624868
    4863 void WebGLRenderingContext::removeContextObject(WebGLContextObject* object)
     4869void WebGLRenderingContextBase::removeContextObject(WebGLContextObject* object)
    48644870{
    48654871    if (m_isPendingPolicyResolution)
     
    48694875}
    48704876
    4871 void WebGLRenderingContext::addContextObject(WebGLContextObject* object)
     4877void WebGLRenderingContextBase::addContextObject(WebGLContextObject* object)
    48724878{
    48734879    if (m_isPendingPolicyResolution)
     
    48784884}
    48794885
    4880 void WebGLRenderingContext::detachAndRemoveAllObjects()
     4886void WebGLRenderingContextBase::detachAndRemoveAllObjects()
    48814887{
    48824888    if (m_isPendingPolicyResolution)
     
    48894895}
    48904896
    4891 bool WebGLRenderingContext::hasPendingActivity() const
     4897bool WebGLRenderingContextBase::hasPendingActivity() const
    48924898{
    48934899    return false;
    48944900}
    48954901
    4896 void WebGLRenderingContext::stop()
     4902void WebGLRenderingContextBase::stop()
    48974903{
    48984904    if (!isContextLost() && !m_isPendingPolicyResolution) {
     
    49024908}
    49034909
    4904 WebGLGetInfo WebGLRenderingContext::getBooleanParameter(GC3Denum pname)
     4910WebGLGetInfo WebGLRenderingContextBase::getBooleanParameter(GC3Denum pname)
    49054911{
    49064912    GC3Dboolean value = 0;
     
    49094915}
    49104916
    4911 WebGLGetInfo WebGLRenderingContext::getBooleanArrayParameter(GC3Denum pname)
     4917WebGLGetInfo WebGLRenderingContextBase::getBooleanArrayParameter(GC3Denum pname)
    49124918{
    49134919    if (pname != GraphicsContext3D::COLOR_WRITEMASK) {
     
    49234929}
    49244930
    4925 WebGLGetInfo WebGLRenderingContext::getFloatParameter(GC3Denum pname)
     4931WebGLGetInfo WebGLRenderingContextBase::getFloatParameter(GC3Denum pname)
    49264932{
    49274933    GC3Dfloat value = 0;
     
    49304936}
    49314937
    4932 WebGLGetInfo WebGLRenderingContext::getIntParameter(GC3Denum pname)
     4938WebGLGetInfo WebGLRenderingContextBase::getIntParameter(GC3Denum pname)
    49334939{
    49344940    GC3Dint value = 0;
     
    49374943}
    49384944
    4939 WebGLGetInfo WebGLRenderingContext::getUnsignedIntParameter(GC3Denum pname)
     4945WebGLGetInfo WebGLRenderingContextBase::getUnsignedIntParameter(GC3Denum pname)
    49404946{
    49414947    GC3Dint value = 0;
     
    49444950}
    49454951
    4946 WebGLGetInfo WebGLRenderingContext::getWebGLFloatArrayParameter(GC3Denum pname)
     4952WebGLGetInfo WebGLRenderingContextBase::getWebGLFloatArrayParameter(GC3Denum pname)
    49474953{
    49484954    GC3Dfloat value[4] = {0};
     
    49654971}
    49664972
    4967 WebGLGetInfo WebGLRenderingContext::getWebGLIntArrayParameter(GC3Denum pname)
     4973WebGLGetInfo WebGLRenderingContextBase::getWebGLIntArrayParameter(GC3Denum pname)
    49684974{
    49694975    GC3Dint value[4] = {0};
     
    49844990}
    49854991
    4986 void WebGLRenderingContext::checkTextureCompleteness(const char* functionName, bool prepareToDraw)
     4992void WebGLRenderingContextBase::checkTextureCompleteness(const char* functionName, bool prepareToDraw)
    49874993{
    49884994    bool resetActiveUnit = false;
     
    50225028}
    50235029
    5024 void WebGLRenderingContext::createFallbackBlackTextures1x1()
     5030void WebGLRenderingContextBase::createFallbackBlackTextures1x1()
    50255031{
    50265032    unsigned char black[] = {0, 0, 0, 255};
     
    50475053}
    50485054
    5049 bool WebGLRenderingContext::isTexInternalFormatColorBufferCombinationValid(GC3Denum texInternalFormat,
     5055bool WebGLRenderingContextBase::isTexInternalFormatColorBufferCombinationValid(GC3Denum texInternalFormat,
    50505056                                                                           GC3Denum colorBufferFormat)
    50515057{
     
    50555061}
    50565062
    5057 GC3Denum WebGLRenderingContext::getBoundFramebufferColorFormat()
     5063GC3Denum WebGLRenderingContextBase::getBoundFramebufferColorFormat()
    50585064{
    50595065    if (m_framebufferBinding && m_framebufferBinding->object())
     
    50645070}
    50655071
    5066 int WebGLRenderingContext::getBoundFramebufferWidth()
     5072int WebGLRenderingContextBase::getBoundFramebufferWidth()
    50675073{
    50685074    if (m_framebufferBinding && m_framebufferBinding->object())
     
    50715077}
    50725078
    5073 int WebGLRenderingContext::getBoundFramebufferHeight()
     5079int WebGLRenderingContextBase::getBoundFramebufferHeight()
    50745080{
    50755081    if (m_framebufferBinding && m_framebufferBinding->object())
     
    50785084}
    50795085
    5080 WebGLTexture* WebGLRenderingContext::validateTextureBinding(const char* functionName, GC3Denum target, bool useSixEnumsForCubeMap)
     5086WebGLTexture* WebGLRenderingContextBase::validateTextureBinding(const char* functionName, GC3Denum target, bool useSixEnumsForCubeMap)
    50815087{
    50825088    WebGLTexture* texture = nullptr;
     
    51135119}
    51145120
    5115 bool WebGLRenderingContext::validateLocationLength(const char* functionName, const String& string)
     5121bool WebGLRenderingContextBase::validateLocationLength(const char* functionName, const String& string)
    51165122{
    51175123    const unsigned maxWebGLLocationLength = 256;
     
    51235129}
    51245130
    5125 bool WebGLRenderingContext::validateSize(const char* functionName, GC3Dint x, GC3Dint y)
     5131bool WebGLRenderingContextBase::validateSize(const char* functionName, GC3Dint x, GC3Dint y)
    51265132{
    51275133    if (x < 0 || y < 0) {
     
    51325138}
    51335139
    5134 bool WebGLRenderingContext::validateString(const char* functionName, const String& string)
     5140bool WebGLRenderingContextBase::validateString(const char* functionName, const String& string)
    51355141{
    51365142    for (size_t i = 0; i < string.length(); ++i) {
     
    51435149}
    51445150
    5145 bool WebGLRenderingContext::validateTexFuncFormatAndType(const char* functionName, GC3Denum format, GC3Denum type, GC3Dint level)
     5151bool WebGLRenderingContextBase::validateTexFuncFormatAndType(const char* functionName, GC3Denum format, GC3Denum type, GC3Dint level)
    51465152{
    51475153    switch (format) {
     
    52655271}
    52665272
    5267 bool WebGLRenderingContext::validateTexFuncLevel(const char* functionName, GC3Denum target, GC3Dint level)
     5273bool WebGLRenderingContextBase::validateTexFuncLevel(const char* functionName, GC3Denum target, GC3Dint level)
    52685274{
    52695275    if (level < 0) {
     
    52955301}
    52965302
    5297 bool WebGLRenderingContext::validateTexFuncParameters(const char* functionName,
     5303bool WebGLRenderingContextBase::validateTexFuncParameters(const char* functionName,
    52985304                                                      TexFuncValidationFunctionType functionType,
    52995305                                                      GC3Denum target, GC3Dint level,
     
    53565362}
    53575363
    5358 bool WebGLRenderingContext::validateTexFuncData(const char* functionName, GC3Dint level,
     5364bool WebGLRenderingContextBase::validateTexFuncData(const char* functionName, GC3Dint level,
    53595365                                                GC3Dsizei width, GC3Dsizei height,
    53605366                                                GC3Denum format, GC3Denum type,
     
    54275433}
    54285434
    5429 bool WebGLRenderingContext::validateCompressedTexFormat(GC3Denum format)
     5435bool WebGLRenderingContextBase::validateCompressedTexFormat(GC3Denum format)
    54305436{
    54315437    return m_compressedTextureFormats.contains(format);
    54325438}
    54335439
    5434 bool WebGLRenderingContext::validateCompressedTexFuncData(const char* functionName,
     5440bool WebGLRenderingContextBase::validateCompressedTexFuncData(const char* functionName,
    54355441                                                          GC3Dsizei width, GC3Dsizei height,
    54365442                                                          GC3Denum format, ArrayBufferView* pixels)
     
    55045510}
    55055511
    5506 bool WebGLRenderingContext::validateCompressedTexDimensions(const char* functionName, GC3Denum target, GC3Dint level, GC3Dsizei width, GC3Dsizei height, GC3Denum format)
     5512bool WebGLRenderingContextBase::validateCompressedTexDimensions(const char* functionName, GC3Denum target, GC3Dint level, GC3Dsizei width, GC3Dsizei height, GC3Denum format)
    55075513{
    55085514    switch (format) {
     
    55385544}
    55395545
    5540 bool WebGLRenderingContext::validateCompressedTexSubDimensions(const char* functionName, GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset,
     5546bool WebGLRenderingContextBase::validateCompressedTexSubDimensions(const char* functionName, GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset,
    55415547                                                               GC3Dsizei width, GC3Dsizei height, GC3Denum format, WebGLTexture* tex)
    55425548{
     
    55845590}
    55855591
    5586 bool WebGLRenderingContext::validateDrawMode(const char* functionName, GC3Denum mode)
     5592bool WebGLRenderingContextBase::validateDrawMode(const char* functionName, GC3Denum mode)
    55875593{
    55885594    switch (mode) {
     
    56015607}
    56025608
    5603 bool WebGLRenderingContext::validateStencilSettings(const char* functionName)
     5609bool WebGLRenderingContextBase::validateStencilSettings(const char* functionName)
    56045610{
    56055611    if (m_stencilMask != m_stencilMaskBack || m_stencilFuncRef != m_stencilFuncRefBack || m_stencilFuncMask != m_stencilFuncMaskBack) {
     
    56105616}
    56115617
    5612 bool WebGLRenderingContext::validateStencilFunc(const char* functionName, GC3Denum func)
     5618bool WebGLRenderingContextBase::validateStencilFunc(const char* functionName, GC3Denum func)
    56135619{
    56145620    switch (func) {
     
    56285634}
    56295635
    5630 void WebGLRenderingContext::printGLErrorToConsole(const String& message)
     5636void WebGLRenderingContextBase::printGLErrorToConsole(const String& message)
    56315637{
    56325638    if (!m_numGLErrorsToConsoleAllowed)
     
    56405646}
    56415647
    5642 void WebGLRenderingContext::printWarningToConsole(const String& message)
     5648void WebGLRenderingContextBase::printWarningToConsole(const String& message)
    56435649{
    56445650    if (!canvas())
     
    56475653}
    56485654
    5649 bool WebGLRenderingContext::validateFramebufferFuncParameters(const char* functionName, GC3Denum target, GC3Denum attachment)
     5655bool WebGLRenderingContextBase::validateFramebufferFuncParameters(const char* functionName, GC3Denum target, GC3Denum attachment)
    56505656{
    56515657    if (target != GraphicsContext3D::FRAMEBUFFER) {
     
    56705676}
    56715677
    5672 bool WebGLRenderingContext::validateBlendEquation(const char* functionName, GC3Denum mode)
     5678bool WebGLRenderingContextBase::validateBlendEquation(const char* functionName, GC3Denum mode)
    56735679{
    56745680    switch (mode) {
     
    56905696}
    56915697
    5692 bool WebGLRenderingContext::validateBlendFuncFactors(const char* functionName, GC3Denum src, GC3Denum dst)
     5698bool WebGLRenderingContextBase::validateBlendFuncFactors(const char* functionName, GC3Denum src, GC3Denum dst)
    56935699{
    56945700    if (((src == GraphicsContext3D::CONSTANT_COLOR || src == GraphicsContext3D::ONE_MINUS_CONSTANT_COLOR)
     
    57025708}
    57035709
    5704 bool WebGLRenderingContext::validateCapability(const char* functionName, GC3Denum cap)
     5710bool WebGLRenderingContextBase::validateCapability(const char* functionName, GC3Denum cap)
    57055711{
    57065712    switch (cap) {
     
    57215727}
    57225728
    5723 bool WebGLRenderingContext::validateUniformParameters(const char* functionName, const WebGLUniformLocation* location, Float32Array* v, GC3Dsizei requiredMinSize)
     5729bool WebGLRenderingContextBase::validateUniformParameters(const char* functionName, const WebGLUniformLocation* location, Float32Array* v, GC3Dsizei requiredMinSize)
    57245730{
    57255731    if (!v) {
     
    57305736}
    57315737
    5732 bool WebGLRenderingContext::validateUniformParameters(const char* functionName, const WebGLUniformLocation* location, Int32Array* v, GC3Dsizei requiredMinSize)
     5738bool WebGLRenderingContextBase::validateUniformParameters(const char* functionName, const WebGLUniformLocation* location, Int32Array* v, GC3Dsizei requiredMinSize)
    57335739{
    57345740    if (!v) {
     
    57395745}
    57405746
    5741 bool WebGLRenderingContext::validateUniformParameters(const char* functionName, const WebGLUniformLocation* location, void* v, GC3Dsizei size, GC3Dsizei requiredMinSize)
     5747bool WebGLRenderingContextBase::validateUniformParameters(const char* functionName, const WebGLUniformLocation* location, void* v, GC3Dsizei size, GC3Dsizei requiredMinSize)
    57425748{
    57435749    return validateUniformMatrixParameters(functionName, location, false, v, size, requiredMinSize);
    57445750}
    57455751
    5746 bool WebGLRenderingContext::validateUniformMatrixParameters(const char* functionName, const WebGLUniformLocation* location, GC3Dboolean transpose, Float32Array* v, GC3Dsizei requiredMinSize)
     5752bool WebGLRenderingContextBase::validateUniformMatrixParameters(const char* functionName, const WebGLUniformLocation* location, GC3Dboolean transpose, Float32Array* v, GC3Dsizei requiredMinSize)
    57475753{
    57485754    if (!v) {
     
    57535759}
    57545760
    5755 bool WebGLRenderingContext::validateUniformMatrixParameters(const char* functionName, const WebGLUniformLocation* location, GC3Dboolean transpose, void* v, GC3Dsizei size, GC3Dsizei requiredMinSize)
     5761bool WebGLRenderingContextBase::validateUniformMatrixParameters(const char* functionName, const WebGLUniformLocation* location, GC3Dboolean transpose, void* v, GC3Dsizei size, GC3Dsizei requiredMinSize)
    57565762{
    57575763    if (!location)
     
    57765782}
    57775783
    5778 WebGLBuffer* WebGLRenderingContext::validateBufferDataParameters(const char* functionName, GC3Denum target, GC3Denum usage)
     5784WebGLBuffer* WebGLRenderingContextBase::validateBufferDataParameters(const char* functionName, GC3Denum target, GC3Denum usage)
    57795785{
    57805786    WebGLBuffer* buffer = 0;
     
    58045810}
    58055811
    5806 bool WebGLRenderingContext::validateHTMLImageElement(const char* functionName, HTMLImageElement* image, ExceptionCode& ec)
     5812bool WebGLRenderingContextBase::validateHTMLImageElement(const char* functionName, HTMLImageElement* image, ExceptionCode& ec)
    58075813{
    58085814    if (!image || !image->cachedImage()) {
     
    58225828}
    58235829
    5824 bool WebGLRenderingContext::validateHTMLCanvasElement(const char* functionName, HTMLCanvasElement* canvas, ExceptionCode& ec)
     5830bool WebGLRenderingContextBase::validateHTMLCanvasElement(const char* functionName, HTMLCanvasElement* canvas, ExceptionCode& ec)
    58255831{
    58265832    if (!canvas || !canvas->buffer()) {
     
    58365842
    58375843#if ENABLE(VIDEO)
    5838 bool WebGLRenderingContext::validateHTMLVideoElement(const char* functionName, HTMLVideoElement* video, ExceptionCode& ec)
     5844bool WebGLRenderingContextBase::validateHTMLVideoElement(const char* functionName, HTMLVideoElement* video, ExceptionCode& ec)
    58395845{
    58405846    if (!video || !video->videoWidth() || !video->videoHeight()) {
     
    58505856#endif
    58515857
    5852 void WebGLRenderingContext::vertexAttribfImpl(const char* functionName, GC3Duint index, GC3Dsizei expectedSize, GC3Dfloat v0, GC3Dfloat v1, GC3Dfloat v2, GC3Dfloat v3)
     5858void WebGLRenderingContextBase::vertexAttribfImpl(const char* functionName, GC3Duint index, GC3Dsizei expectedSize, GC3Dfloat v0, GC3Dfloat v1, GC3Dfloat v2, GC3Dfloat v3)
    58535859{
    58545860    if (isContextLostOrPending())
     
    58825888}
    58835889
    5884 void WebGLRenderingContext::vertexAttribfvImpl(const char* functionName, GC3Duint index, Float32Array* v, GC3Dsizei expectedSize)
     5890void WebGLRenderingContextBase::vertexAttribfvImpl(const char* functionName, GC3Duint index, Float32Array* v, GC3Dsizei expectedSize)
    58855891{
    58865892    if (isContextLostOrPending())
     
    58935899}
    58945900
    5895 void WebGLRenderingContext::vertexAttribfvImpl(const char* functionName, GC3Duint index, GC3Dfloat* v, GC3Dsizei size, GC3Dsizei expectedSize)
     5901void WebGLRenderingContextBase::vertexAttribfvImpl(const char* functionName, GC3Duint index, GC3Dfloat* v, GC3Dsizei size, GC3Dsizei expectedSize)
    58965902{
    58975903    if (isContextLostOrPending())
     
    59325938}
    59335939
    5934 void WebGLRenderingContext::initVertexAttrib0()
     5940void WebGLRenderingContextBase::initVertexAttrib0()
    59355941{
    59365942    WebGLVertexArrayObjectOES::VertexAttribState& state = m_boundVertexArrayObject->getVertexAttribState(0);
     
    59525958}
    59535959
    5954 bool WebGLRenderingContext::simulateVertexAttrib0(GC3Dsizei numVertex)
     5960bool WebGLRenderingContextBase::simulateVertexAttrib0(GC3Dsizei numVertex)
    59555961{
    59565962    const WebGLVertexArrayObjectOES::VertexAttribState& state = m_boundVertexArrayObject->getVertexAttribState(0);
     
    59976003}
    59986004
    5999 void WebGLRenderingContext::restoreStatesAfterVertexAttrib0Simulation()
     6005void WebGLRenderingContextBase::restoreStatesAfterVertexAttrib0Simulation()
    60006006{
    60016007    const WebGLVertexArrayObjectOES::VertexAttribState& state = m_boundVertexArrayObject->getVertexAttribState(0);
     
    60076013}
    60086014
    6009 void WebGLRenderingContext::dispatchContextLostEvent()
     6015void WebGLRenderingContextBase::dispatchContextLostEvent()
    60106016{
    60116017    RefPtr<WebGLContextEvent> event = WebGLContextEvent::create(eventNames().webglcontextlostEvent, false, true, "");
     
    60166022}
    60176023
    6018 void WebGLRenderingContext::maybeRestoreContext()
     6024void WebGLRenderingContextBase::maybeRestoreContext()
    60196025{
    60206026    ASSERT(m_contextLost);
     
    61016107}
    61026108
    6103 String WebGLRenderingContext::ensureNotNull(const String& text) const
     6109String WebGLRenderingContextBase::ensureNotNull(const String& text) const
    61046110{
    61056111    if (text.isNull())
     
    61086114}
    61096115
    6110 WebGLRenderingContext::LRUImageBufferCache::LRUImageBufferCache(int capacity)
     6116WebGLRenderingContextBase::LRUImageBufferCache::LRUImageBufferCache(int capacity)
    61116117    : m_buffers(std::make_unique<std::unique_ptr<ImageBuffer>[]>(capacity))
    61126118    , m_capacity(capacity)
     
    61146120}
    61156121
    6116 ImageBuffer* WebGLRenderingContext::LRUImageBufferCache::imageBuffer(const IntSize& size)
     6122ImageBuffer* WebGLRenderingContextBase::LRUImageBufferCache::imageBuffer(const IntSize& size)
    61176123{
    61186124    int i;
     
    61386144}
    61396145
    6140 void WebGLRenderingContext::LRUImageBufferCache::bubbleToFront(int idx)
     6146void WebGLRenderingContextBase::LRUImageBufferCache::bubbleToFront(int idx)
    61416147{
    61426148    for (int i = idx; i > 0; --i)
     
    61686174} // namespace anonymous
    61696175
    6170 void WebGLRenderingContext::synthesizeGLError(GC3Denum error, const char* functionName, const char* description, ConsoleDisplayPreference display)
     6176void WebGLRenderingContextBase::synthesizeGLError(GC3Denum error, const char* functionName, const char* description, ConsoleDisplayPreference display)
    61716177{
    61726178    if (m_synthesizedErrorsToConsole && display == DisplayInConsole) {
     
    61786184
    61796185
    6180 void WebGLRenderingContext::printGLWarningToConsole(const char* functionName, const char* description)
     6186void WebGLRenderingContextBase::printGLWarningToConsole(const char* functionName, const char* description)
    61816187{
    61826188    if (m_synthesizedErrorsToConsole) {
     
    61866192}
    61876193
    6188 void WebGLRenderingContext::applyStencilTest()
     6194void WebGLRenderingContextBase::applyStencilTest()
    61896195{
    61906196    bool haveStencilBuffer = false;
     
    62006206}
    62016207
    6202 void WebGLRenderingContext::enableOrDisable(GC3Denum capability, bool enable)
     6208void WebGLRenderingContextBase::enableOrDisable(GC3Denum capability, bool enable)
    62036209{
    62046210    if (enable)
     
    62086214}
    62096215
    6210 IntSize WebGLRenderingContext::clampedCanvasSize()
     6216IntSize WebGLRenderingContextBase::clampedCanvasSize()
    62116217{
    62126218    return IntSize(clamp(canvas()->width(), 1, m_maxViewportDims[0]),
     
    62146220}
    62156221
    6216 GC3Dint WebGLRenderingContext::getMaxDrawBuffers()
     6222GC3Dint WebGLRenderingContextBase::getMaxDrawBuffers()
    62176223{
    62186224    if (!supportsDrawBuffers())
     
    62266232}
    62276233
    6228 GC3Dint WebGLRenderingContext::getMaxColorAttachments()
     6234GC3Dint WebGLRenderingContextBase::getMaxColorAttachments()
    62296235{
    62306236    if (!supportsDrawBuffers())
     
    62356241}
    62366242
    6237 void WebGLRenderingContext::setBackDrawBuffer(GC3Denum buf)
     6243void WebGLRenderingContextBase::setBackDrawBuffer(GC3Denum buf)
    62386244{
    62396245    m_backDrawBuffer = buf;
    62406246}
    62416247
    6242 void WebGLRenderingContext::restoreCurrentFramebuffer()
     6248void WebGLRenderingContextBase::restoreCurrentFramebuffer()
    62436249{
    62446250    ExceptionCode ec;
     
    62466252}
    62476253
    6248 void WebGLRenderingContext::restoreCurrentTexture2D()
     6254void WebGLRenderingContextBase::restoreCurrentTexture2D()
    62496255{
    62506256    ExceptionCode ec;
     
    62526258}
    62536259
    6254 bool WebGLRenderingContext::supportsDrawBuffers()
     6260bool WebGLRenderingContextBase::supportsDrawBuffers()
    62556261{
    62566262    if (!m_drawBuffersWebGLRequirementsChecked) {
     
    62616267}
    62626268
    6263 void WebGLRenderingContext::drawArraysInstanced(GC3Denum mode, GC3Dint first, GC3Dsizei count, GC3Dsizei primcount)
     6269void WebGLRenderingContextBase::drawArraysInstanced(GC3Denum mode, GC3Dint first, GC3Dsizei count, GC3Dsizei primcount)
    62646270{
    62656271    if (!primcount) {
     
    62886294}
    62896295
    6290 void WebGLRenderingContext::drawElementsInstanced(GC3Denum mode, GC3Dsizei count, GC3Denum type, long long offset, GC3Dsizei primcount)
     6296void WebGLRenderingContextBase::drawElementsInstanced(GC3Denum mode, GC3Dsizei count, GC3Denum type, long long offset, GC3Dsizei primcount)
    62916297{
    62926298    if (!primcount) {
     
    63196325}
    63206326
    6321 void WebGLRenderingContext::vertexAttribDivisor(GC3Duint index, GC3Duint divisor)
     6327void WebGLRenderingContextBase::vertexAttribDivisor(GC3Duint index, GC3Duint divisor)
    63226328{
    63236329    if (isContextLostOrPending())
  • trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h

    r178604 r178674  
    11/*
    2  * Copyright (C) 2009, 2014 Apple Inc. All rights reserved.
     2 * Copyright (C) 2015 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2424 */
    2525
    26 #ifndef WebGLRenderingContext_h
    27 #define WebGLRenderingContext_h
     26#ifndef WebGLRenderingContextBase_h
     27#define WebGLRenderingContextBase_h
    2828
    2929#include "ActiveDOMObject.h"
     
    8686typedef int ExceptionCode;
    8787
    88 class WebGLRenderingContext final : public CanvasRenderingContext, public ActiveDOMObject {
     88class WebGLRenderingContextBase : public CanvasRenderingContext, public ActiveDOMObject {
    8989public:
    90     static std::unique_ptr<WebGLRenderingContext> create(HTMLCanvasElement*, WebGLContextAttributes*);
    91     virtual ~WebGLRenderingContext();
    92 
    93     virtual bool is3d() const override { return true; }
     90    static std::unique_ptr<WebGLRenderingContextBase> create(HTMLCanvasElement*, WebGLContextAttributes*, const String&);
     91    virtual ~WebGLRenderingContextBase();
     92
    9493#if PLATFORM(WIN)
    9594    // FIXME: Implement accelerated 3d canvas on Windows.
     
    336335    void vertexAttribDivisor(GC3Duint index, GC3Duint divisor);
    337336
     337protected:
     338WebGLRenderingContextBase(HTMLCanvasElement*, GraphicsContext3D::Attributes);
     339WebGLRenderingContextBase(HTMLCanvasElement*, PassRefPtr<GraphicsContext3D>, GraphicsContext3D::Attributes);
     340
    338341private:
    339342    friend class WebGLDrawBuffers;
     
    348351    friend class WebGLVertexArrayObjectOES;
    349352
    350     WebGLRenderingContext(HTMLCanvasElement*, GraphicsContext3D::Attributes);
    351     WebGLRenderingContext(HTMLCanvasElement*, PassRefPtr<GraphicsContext3D>, GraphicsContext3D::Attributes);
    352     void initializeNewContext();
    353     void setupFlags();
     353void initializeNewContext();
     354void setupFlags();
    354355
    355356    // ActiveDOMObject
  • trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl

    r178604 r178674  
    11/*
    2  * Copyright (C) 2009 Apple Inc. All rights reserved.
     2 * Copyright (C) 2015 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    4040
    4141[
    42     Conditional=WEBGL,
    43     JSCustomMarkFunction,
    44     DoNotCheckConstants,
    45 ] interface WebGLRenderingContext : CanvasRenderingContext {
     42NoInterfaceObject,
     43Conditional=WEBGL,
     44JSCustomMarkFunction,
     45DoNotCheckConstants,
     46] interface WebGLRenderingContextBase : CanvasRenderingContext {
    4647
    4748    /* ClearBufferMask */
  • trunk/Source/WebCore/html/canvas/WebGLShader.cpp

    r178411 r178674  
    3131
    3232#include "WebGLContextGroup.h"
    33 #include "WebGLRenderingContext.h"
     33#include "WebGLRenderingContextBase.h"
    3434
    3535namespace WebCore {
    3636
    37 PassRefPtr<WebGLShader> WebGLShader::create(WebGLRenderingContext* ctx, GC3Denum type)
     37PassRefPtr<WebGLShader> WebGLShader::create(WebGLRenderingContextBase* ctx, GC3Denum type)
    3838{
    3939    return adoptRef(new WebGLShader(ctx, type));
    4040}
    4141
    42 WebGLShader::WebGLShader(WebGLRenderingContext* ctx, GC3Denum type)
     42WebGLShader::WebGLShader(WebGLRenderingContextBase* ctx, GC3Denum type)
    4343    : WebGLSharedObject(ctx)
    4444    , m_type(type)
  • trunk/Source/WebCore/html/canvas/WebGLShader.h

    r178411 r178674  
    3737    virtual ~WebGLShader();
    3838
    39     static PassRefPtr<WebGLShader> create(WebGLRenderingContext*, GC3Denum);
     39    static PassRefPtr<WebGLShader> create(WebGLRenderingContextBase*, GC3Denum);
    4040
    4141    GC3Denum getType() const { return m_type; }
     
    4848
    4949private:
    50     WebGLShader(WebGLRenderingContext*, GC3Denum);
     50    WebGLShader(WebGLRenderingContextBase*, GC3Denum);
    5151
    5252    virtual void deleteObjectImpl(GraphicsContext3D*, Platform3DObject) override;
  • trunk/Source/WebCore/html/canvas/WebGLSharedObject.cpp

    r178411 r178674  
    3131
    3232#include "WebGLContextGroup.h"
    33 #include "WebGLRenderingContext.h"
     33#include "WebGLRenderingContextBase.h"
    3434
    3535namespace WebCore {
    3636
    37 WebGLSharedObject::WebGLSharedObject(WebGLRenderingContext* context)
     37WebGLSharedObject::WebGLSharedObject(WebGLRenderingContextBase* context)
    3838    : WebGLObject(context),
    3939      m_contextGroup(context->contextGroup())
  • trunk/Source/WebCore/html/canvas/WebGLSharedObject.h

    r178411 r178674  
    3333class GraphicsContext3D;
    3434class WebGLContextGroup;
    35 class WebGLRenderingContext;
     35class WebGLRenderingContextBase;
    3636
    3737// WebGLSharedObject the base class for objects that can be shared by multiple
     
    4949    virtual bool isTexture() const { return false; }
    5050
    51     virtual bool validate(const WebGLContextGroup* contextGroup, const WebGLRenderingContext*) const override
     51    virtual bool validate(const WebGLContextGroup* contextGroup, const WebGLRenderingContextBase*) const override
    5252    {
    5353        return contextGroup == m_contextGroup;
     
    5757
    5858protected:
    59     WebGLSharedObject(WebGLRenderingContext*);
     59    WebGLSharedObject(WebGLRenderingContextBase*);
    6060
    6161    virtual bool hasGroupOrContext() const override
  • trunk/Source/WebCore/html/canvas/WebGLTexture.cpp

    r178411 r178674  
    3232#include "WebGLContextGroup.h"
    3333#include "WebGLFramebuffer.h"
    34 #include "WebGLRenderingContext.h"
     34#include "WebGLRenderingContextBase.h"
    3535
    3636namespace WebCore {
    3737
    38 PassRefPtr<WebGLTexture> WebGLTexture::create(WebGLRenderingContext* ctx)
     38PassRefPtr<WebGLTexture> WebGLTexture::create(WebGLRenderingContextBase* ctx)
    3939{
    4040    return adoptRef(new WebGLTexture(ctx));
    4141}
    4242
    43 WebGLTexture::WebGLTexture(WebGLRenderingContext* ctx)
     43WebGLTexture::WebGLTexture(WebGLRenderingContextBase* ctx)
    4444    : WebGLSharedObject(ctx)
    4545    , m_target(0)
  • trunk/Source/WebCore/html/canvas/WebGLTexture.h

    r178411 r178674  
    4545    virtual ~WebGLTexture();
    4646
    47     static PassRefPtr<WebGLTexture> create(WebGLRenderingContext*);
     47    static PassRefPtr<WebGLTexture> create(WebGLRenderingContextBase*);
    4848
    4949    void setTarget(GC3Denum target, GC3Dint maxLevel);
     
    8383
    8484private:
    85     WebGLTexture(WebGLRenderingContext*);
     85    WebGLTexture(WebGLRenderingContextBase*);
    8686
    8787    virtual void deleteObjectImpl(GraphicsContext3D*, Platform3DObject) override;
  • trunk/Source/WebCore/html/canvas/WebGLVertexArrayObjectOES.cpp

    r178411 r178674  
    3131
    3232#include "Extensions3D.h"
    33 #include "WebGLRenderingContext.h"
     33#include "WebGLRenderingContextBase.h"
    3434
    3535namespace WebCore {
    3636
    37 PassRefPtr<WebGLVertexArrayObjectOES> WebGLVertexArrayObjectOES::create(WebGLRenderingContext* ctx, VaoType type)
     37PassRefPtr<WebGLVertexArrayObjectOES> WebGLVertexArrayObjectOES::create(WebGLRenderingContextBase* ctx, VaoType type)
    3838{
    3939    return adoptRef(new WebGLVertexArrayObjectOES(ctx, type));
    4040}
    4141
    42 WebGLVertexArrayObjectOES::WebGLVertexArrayObjectOES(WebGLRenderingContext* ctx, VaoType type)
     42WebGLVertexArrayObjectOES::WebGLVertexArrayObjectOES(WebGLRenderingContextBase* ctx, VaoType type)
    4343    : WebGLContextObject(ctx)
    4444    , m_type(type)
  • trunk/Source/WebCore/html/canvas/WebGLVertexArrayObjectOES.h

    r178411 r178674  
    4343    virtual ~WebGLVertexArrayObjectOES();
    4444
    45     static PassRefPtr<WebGLVertexArrayObjectOES> create(WebGLRenderingContext*, VaoType);
     45    static PassRefPtr<WebGLVertexArrayObjectOES> create(WebGLRenderingContextBase*, VaoType);
    4646   
    4747    // Cached values for vertex attrib range checks
     
    9090
    9191private:
    92     WebGLVertexArrayObjectOES(WebGLRenderingContext*, VaoType);
     92    WebGLVertexArrayObjectOES(WebGLRenderingContextBase*, VaoType);
    9393
    9494    virtual void deleteObjectImpl(GraphicsContext3D*, Platform3DObject) override;
Note: See TracChangeset for help on using the changeset viewer.