Changeset 178674 in webkit
- Timestamp:
- Jan 19, 2015, 2:15:16 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 8 added
- 85 edited
- 3 copied
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/canvas/webgl/bad-arguments-test-expected.txt (modified) (3 diffs)
-
LayoutTests/fast/canvas/webgl/null-object-behaviour-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt (modified) (1 diff)
-
Source/WebCore/CMakeLists.txt (modified) (5 diffs)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/DerivedSources.cpp (modified) (2 diffs)
-
Source/WebCore/DerivedSources.make (modified) (1 diff)
-
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (modified) (7 diffs)
-
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (modified) (7 diffs)
-
Source/WebCore/WebCore.xcodeproj/project.pbxproj (modified) (14 diffs)
-
Source/WebCore/bindings/js/JSBindingsAllInOne.cpp (modified) (1 diff)
-
Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp (modified) (3 diffs)
-
Source/WebCore/bindings/js/JSDocumentCustom.cpp (modified) (1 diff)
-
Source/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp (modified) (1 diff)
-
Source/WebCore/bindings/js/JSWebGL2RenderingContextCustom.cpp (added)
-
Source/WebCore/bindings/js/JSWebGLRenderingContextBaseCustom.cpp (added)
-
Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp (modified) (3 diffs)
-
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (modified) (1 diff)
-
Source/WebCore/html/HTMLCanvasElement.cpp (modified) (5 diffs)
-
Source/WebCore/html/canvas/ANGLEInstancedArrays.cpp (modified) (2 diffs)
-
Source/WebCore/html/canvas/ANGLEInstancedArrays.h (modified) (1 diff)
-
Source/WebCore/html/canvas/CanvasRenderingContext.h (modified) (1 diff)
-
Source/WebCore/html/canvas/EXTBlendMinMax.cpp (modified) (1 diff)
-
Source/WebCore/html/canvas/EXTBlendMinMax.h (modified) (1 diff)
-
Source/WebCore/html/canvas/EXTFragDepth.cpp (modified) (1 diff)
-
Source/WebCore/html/canvas/EXTFragDepth.h (modified) (1 diff)
-
Source/WebCore/html/canvas/EXTShaderTextureLOD.cpp (modified) (1 diff)
-
Source/WebCore/html/canvas/EXTShaderTextureLOD.h (modified) (1 diff)
-
Source/WebCore/html/canvas/EXTTextureFilterAnisotropic.cpp (modified) (1 diff)
-
Source/WebCore/html/canvas/EXTTextureFilterAnisotropic.h (modified) (1 diff)
-
Source/WebCore/html/canvas/EXTsRGB.cpp (modified) (1 diff)
-
Source/WebCore/html/canvas/EXTsRGB.h (modified) (1 diff)
-
Source/WebCore/html/canvas/OESElementIndexUint.cpp (modified) (1 diff)
-
Source/WebCore/html/canvas/OESElementIndexUint.h (modified) (1 diff)
-
Source/WebCore/html/canvas/OESStandardDerivatives.cpp (modified) (1 diff)
-
Source/WebCore/html/canvas/OESStandardDerivatives.h (modified) (1 diff)
-
Source/WebCore/html/canvas/OESTextureFloat.cpp (modified) (1 diff)
-
Source/WebCore/html/canvas/OESTextureFloat.h (modified) (1 diff)
-
Source/WebCore/html/canvas/OESTextureFloatLinear.cpp (modified) (1 diff)
-
Source/WebCore/html/canvas/OESTextureFloatLinear.h (modified) (1 diff)
-
Source/WebCore/html/canvas/OESTextureHalfFloat.cpp (modified) (1 diff)
-
Source/WebCore/html/canvas/OESTextureHalfFloat.h (modified) (1 diff)
-
Source/WebCore/html/canvas/OESTextureHalfFloatLinear.cpp (modified) (1 diff)
-
Source/WebCore/html/canvas/OESTextureHalfFloatLinear.h (modified) (1 diff)
-
Source/WebCore/html/canvas/OESVertexArrayObject.cpp (modified) (1 diff)
-
Source/WebCore/html/canvas/OESVertexArrayObject.h (modified) (2 diffs)
-
Source/WebCore/html/canvas/WebGL2RenderingContext.cpp (added)
-
Source/WebCore/html/canvas/WebGL2RenderingContext.h (added)
-
Source/WebCore/html/canvas/WebGL2RenderingContext.idl (added)
-
Source/WebCore/html/canvas/WebGLBuffer.cpp (modified) (1 diff)
-
Source/WebCore/html/canvas/WebGLBuffer.h (modified) (2 diffs)
-
Source/WebCore/html/canvas/WebGLCompressedTextureATC.cpp (modified) (2 diffs)
-
Source/WebCore/html/canvas/WebGLCompressedTextureATC.h (modified) (1 diff)
-
Source/WebCore/html/canvas/WebGLCompressedTexturePVRTC.cpp (modified) (2 diffs)
-
Source/WebCore/html/canvas/WebGLCompressedTexturePVRTC.h (modified) (1 diff)
-
Source/WebCore/html/canvas/WebGLCompressedTextureS3TC.cpp (modified) (2 diffs)
-
Source/WebCore/html/canvas/WebGLCompressedTextureS3TC.h (modified) (1 diff)
-
Source/WebCore/html/canvas/WebGLContextGroup.cpp (modified) (3 diffs)
-
Source/WebCore/html/canvas/WebGLContextGroup.h (modified) (5 diffs)
-
Source/WebCore/html/canvas/WebGLContextObject.cpp (modified) (1 diff)
-
Source/WebCore/html/canvas/WebGLContextObject.h (modified) (4 diffs)
-
Source/WebCore/html/canvas/WebGLDebugRendererInfo.cpp (modified) (1 diff)
-
Source/WebCore/html/canvas/WebGLDebugRendererInfo.h (modified) (1 diff)
-
Source/WebCore/html/canvas/WebGLDebugShaders.cpp (modified) (1 diff)
-
Source/WebCore/html/canvas/WebGLDebugShaders.h (modified) (1 diff)
-
Source/WebCore/html/canvas/WebGLDepthTexture.cpp (modified) (1 diff)
-
Source/WebCore/html/canvas/WebGLDepthTexture.h (modified) (1 diff)
-
Source/WebCore/html/canvas/WebGLDrawBuffers.cpp (modified) (4 diffs)
-
Source/WebCore/html/canvas/WebGLDrawBuffers.h (modified) (2 diffs)
-
Source/WebCore/html/canvas/WebGLExtension.cpp (modified) (1 diff)
-
Source/WebCore/html/canvas/WebGLExtension.h (modified) (3 diffs)
-
Source/WebCore/html/canvas/WebGLFramebuffer.cpp (modified) (2 diffs)
-
Source/WebCore/html/canvas/WebGLFramebuffer.h (modified) (2 diffs)
-
Source/WebCore/html/canvas/WebGLLoseContext.cpp (modified) (2 diffs)
-
Source/WebCore/html/canvas/WebGLLoseContext.h (modified) (1 diff)
-
Source/WebCore/html/canvas/WebGLObject.cpp (modified) (1 diff)
-
Source/WebCore/html/canvas/WebGLObject.h (modified) (2 diffs)
-
Source/WebCore/html/canvas/WebGLProgram.cpp (modified) (1 diff)
-
Source/WebCore/html/canvas/WebGLProgram.h (modified) (2 diffs)
-
Source/WebCore/html/canvas/WebGLRenderbuffer.cpp (modified) (2 diffs)
-
Source/WebCore/html/canvas/WebGLRenderbuffer.h (modified) (2 diffs)
-
Source/WebCore/html/canvas/WebGLRenderingContext.cpp (added)
-
Source/WebCore/html/canvas/WebGLRenderingContext.h (added)
-
Source/WebCore/html/canvas/WebGLRenderingContext.idl (added)
-
Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp (copied) (copied from trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp ) (268 diffs)
-
Source/WebCore/html/canvas/WebGLRenderingContextBase.h (copied) (copied from trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h ) (5 diffs)
-
Source/WebCore/html/canvas/WebGLRenderingContextBase.idl (copied) (copied from trunk/Source/WebCore/html/canvas/WebGLRenderingContext.idl ) (2 diffs)
-
Source/WebCore/html/canvas/WebGLShader.cpp (modified) (1 diff)
-
Source/WebCore/html/canvas/WebGLShader.h (modified) (2 diffs)
-
Source/WebCore/html/canvas/WebGLSharedObject.cpp (modified) (1 diff)
-
Source/WebCore/html/canvas/WebGLSharedObject.h (modified) (3 diffs)
-
Source/WebCore/html/canvas/WebGLTexture.cpp (modified) (1 diff)
-
Source/WebCore/html/canvas/WebGLTexture.h (modified) (2 diffs)
-
Source/WebCore/html/canvas/WebGLVertexArrayObjectOES.cpp (modified) (1 diff)
-
Source/WebCore/html/canvas/WebGLVertexArrayObjectOES.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r178666 r178674 1 2015-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 1 13 2015-01-19 Alexey Proskuryakov <ap@apple.com> 2 14 -
trunk/LayoutTests/fast/canvas/webgl/bad-arguments-test-expected.txt
r165640 r178674 6 6 PASS Shader Compiled 7 7 PASS 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.8 PASS context.compileShader(argument) threw exception TypeError: Argument 1 ('shader') to WebGLRenderingContextBase.compileShader must be an instance of WebGLShader. 9 PASS context.linkProgram(argument) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.linkProgram must be an instance of WebGLProgram. 10 PASS context.attachShader(program, argument) threw exception TypeError: Argument 2 ('shader') to WebGLRenderingContextBase.attachShader must be an instance of WebGLShader. 11 PASS context.attachShader(argument, shader) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.attachShader must be an instance of WebGLProgram. 12 PASS context.detachShader(program, argument) threw exception TypeError: Argument 2 ('shader') to WebGLRenderingContextBase.detachShader must be an instance of WebGLShader. 13 PASS context.detachShader(argument, shader) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.detachShader must be an instance of WebGLProgram. 14 PASS context.useProgram(argument) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.useProgram must be an instance of WebGLProgram. 15 PASS context.shaderSource(argument, 'foo') threw exception TypeError: Argument 1 ('shader') to WebGLRenderingContextBase.shaderSource must be an instance of WebGLShader. 16 PASS context.bindAttribLocation(argument, 0, 'foo') threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.bindAttribLocation must be an instance of WebGLProgram. 17 PASS context.bindBuffer(context.ARRAY_BUFFER, argument) threw exception TypeError: Argument 2 ('buffer') to WebGLRenderingContextBase.bindBuffer must be an instance of WebGLBuffer. 18 PASS context.bindFramebuffer(context.FRAMEBUFFER, argument) threw exception TypeError: Argument 2 ('framebuffer') to WebGLRenderingContextBase.bindFramebuffer must be an instance of WebGLFramebuffer. 19 PASS context.bindRenderbuffer(context.RENDERBUFFER, argument) threw exception TypeError: Argument 2 ('renderbuffer') to WebGLRenderingContextBase.bindRenderbuffer must be an instance of WebGLRenderbuffer. 20 PASS context.bindTexture(context.TEXTURE_2D, argument) threw exception TypeError: Argument 2 ('texture') to WebGLRenderingContextBase.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 WebGLRenderingContextBase.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 WebGLRenderingContextBase.framebufferTexture2D must be an instance of WebGLTexture. 23 23 PASS context.uniform2fv(argument, new Float32Array([0.0, 0.0])) threw exception TypeError: Type error. 24 24 PASS context.uniform2iv(argument, new Int32Array([0, 0])) threw exception TypeError: Type error. … … 28 28 PASS context.getUniform(argument, loc) threw exception TypeError: Type error. 29 29 PASS 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.30 PASS context.getUniformLocation(argument, 'u_modelViewProjMatrix') threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.getUniformLocation must be an instance of WebGLProgram. 31 PASS context.getProgramInfoLog(argument) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.getProgramInfoLog must be an instance of WebGLProgram. 32 PASS context.getShaderInfoLog(argument) threw exception TypeError: Argument 1 ('shader') to WebGLRenderingContextBase.getShaderInfoLog must be an instance of WebGLShader. 33 PASS context.getShaderSource(argument) threw exception TypeError: Argument 1 ('shader') to WebGLRenderingContextBase.getShaderSource must be an instance of WebGLShader. 34 PASS context.compileShader(argument) threw exception TypeError: Argument 1 ('shader') to WebGLRenderingContextBase.compileShader must be an instance of WebGLShader. 35 PASS context.linkProgram(argument) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.linkProgram must be an instance of WebGLProgram. 36 PASS context.attachShader(program, argument) threw exception TypeError: Argument 2 ('shader') to WebGLRenderingContextBase.attachShader must be an instance of WebGLShader. 37 PASS context.attachShader(argument, shader) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.attachShader must be an instance of WebGLProgram. 38 PASS context.detachShader(program, argument) threw exception TypeError: Argument 2 ('shader') to WebGLRenderingContextBase.detachShader must be an instance of WebGLShader. 39 PASS context.detachShader(argument, shader) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.detachShader must be an instance of WebGLProgram. 40 PASS context.useProgram(argument) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.useProgram must be an instance of WebGLProgram. 41 PASS context.shaderSource(argument, 'foo') threw exception TypeError: Argument 1 ('shader') to WebGLRenderingContextBase.shaderSource must be an instance of WebGLShader. 42 PASS context.bindAttribLocation(argument, 0, 'foo') threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.bindAttribLocation must be an instance of WebGLProgram. 43 PASS context.bindBuffer(context.ARRAY_BUFFER, argument) threw exception TypeError: Argument 2 ('buffer') to WebGLRenderingContextBase.bindBuffer must be an instance of WebGLBuffer. 44 PASS context.bindFramebuffer(context.FRAMEBUFFER, argument) threw exception TypeError: Argument 2 ('framebuffer') to WebGLRenderingContextBase.bindFramebuffer must be an instance of WebGLFramebuffer. 45 PASS context.bindRenderbuffer(context.RENDERBUFFER, argument) threw exception TypeError: Argument 2 ('renderbuffer') to WebGLRenderingContextBase.bindRenderbuffer must be an instance of WebGLRenderbuffer. 46 PASS context.bindTexture(context.TEXTURE_2D, argument) threw exception TypeError: Argument 2 ('texture') to WebGLRenderingContextBase.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 WebGLRenderingContextBase.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 WebGLRenderingContextBase.framebufferTexture2D must be an instance of WebGLTexture. 49 49 PASS context.uniform2fv(argument, new Float32Array([0.0, 0.0])) threw exception TypeError: Type error. 50 50 PASS context.uniform2iv(argument, new Int32Array([0, 0])) threw exception TypeError: Type error. … … 54 54 PASS context.getUniform(argument, loc) threw exception TypeError: Type error. 55 55 PASS 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.56 PASS context.getUniformLocation(argument, 'u_modelViewProjMatrix') threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.getUniformLocation must be an instance of WebGLProgram. 57 PASS context.getProgramInfoLog(argument) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.getProgramInfoLog must be an instance of WebGLProgram. 58 PASS context.getShaderInfoLog(argument) threw exception TypeError: Argument 1 ('shader') to WebGLRenderingContextBase.getShaderInfoLog must be an instance of WebGLShader. 59 PASS context.getShaderSource(argument) threw exception TypeError: Argument 1 ('shader') to WebGLRenderingContextBase.getShaderSource must be an instance of WebGLShader. 60 60 PASS context.compileShader(argument) is undefined. 61 61 PASS context.linkProgram(argument) is undefined. -
trunk/LayoutTests/fast/canvas/webgl/null-object-behaviour-expected.txt
r165640 r178674 15 15 PASS context.shaderSource(undefined, 'foo') was expected value: INVALID_VALUE. 16 16 PASS 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.17 PASS context.bindBuffer(context.ARRAY_BUFFER, 0) threw exception TypeError: Argument 2 ('buffer') to WebGLRenderingContextBase.bindBuffer must be an instance of WebGLBuffer. 18 PASS context.bindFramebuffer(context.FRAMEBUFFER, 0) threw exception TypeError: Argument 2 ('framebuffer') to WebGLRenderingContextBase.bindFramebuffer must be an instance of WebGLFramebuffer. 19 PASS context.bindRenderbuffer(context.RENDERBUFFER, 0) threw exception TypeError: Argument 2 ('renderbuffer') to WebGLRenderingContextBase.bindRenderbuffer must be an instance of WebGLRenderbuffer. 20 PASS context.bindTexture(context.TEXTURE_2D, 0) threw exception TypeError: Argument 2 ('texture') to WebGLRenderingContextBase.bindTexture must be an instance of WebGLTexture. 21 21 PASS context.bindBuffer(context.ARRAY_BUFFER, null) was expected value: NO_ERROR. 22 22 PASS context.bindFramebuffer(context.FRAMEBUFFER, null) was expected value: NO_ERROR. -
trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt
r178310 r178674 1884 1884 PASS Object.getOwnPropertyDescriptor(global, 'WaveShaperNode').enumerable is false 1885 1885 PASS Object.getOwnPropertyDescriptor(global, 'WaveShaperNode').configurable is true 1886 PASS Object.getOwnPropertyDescriptor(global, 'WebGL2RenderingContext').value is WebGL2RenderingContext 1887 PASS Object.getOwnPropertyDescriptor(global, 'WebGL2RenderingContext').hasOwnProperty('get') is false 1888 PASS Object.getOwnPropertyDescriptor(global, 'WebGL2RenderingContext').hasOwnProperty('set') is false 1889 PASS Object.getOwnPropertyDescriptor(global, 'WebGL2RenderingContext').enumerable is false 1890 PASS Object.getOwnPropertyDescriptor(global, 'WebGL2RenderingContext').configurable is true 1886 1891 PASS Object.getOwnPropertyDescriptor(global, 'WebGLActiveInfo').value is WebGLActiveInfo 1887 1892 PASS Object.getOwnPropertyDescriptor(global, 'WebGLActiveInfo').hasOwnProperty('get') is false -
trunk/Source/WebCore/CMakeLists.txt
r178586 r178674 556 556 html/canvas/WebGLProgram.idl 557 557 html/canvas/WebGLRenderbuffer.idl 558 html/canvas/WebGLRenderingContextBase.idl 558 559 html/canvas/WebGLRenderingContext.idl 560 html/canvas/WebGL2RenderingContext.idl 559 561 html/canvas/WebGLShader.idl 560 562 html/canvas/WebGLShaderPrecisionFormat.idl … … 1146 1148 bindings/js/JSVideoTrackCustom.cpp 1147 1149 bindings/js/JSVideoTrackListCustom.cpp 1150 bindings/js/JSWebGLRenderingContextBaseCustom.cpp 1148 1151 bindings/js/JSWebGLRenderingContextCustom.cpp 1152 bindings/js/JSWebGL2RenderingContextCustom.cpp 1149 1153 bindings/js/JSWebKitPointCustom.cpp 1150 1154 bindings/js/JSWorkerCustom.cpp … … 1689 1693 html/canvas/WebGLProgram.cpp 1690 1694 html/canvas/WebGLRenderbuffer.cpp 1695 html/canvas/WebGLRenderingContextBase.cpp 1691 1696 html/canvas/WebGLRenderingContext.cpp 1697 html/canvas/WebGL2RenderingContext.cpp 1692 1698 html/canvas/WebGLShader.cpp 1693 1699 html/canvas/WebGLShaderPrecisionFormat.cpp … … 2786 2792 html/canvas/WebGLProgram.cpp 2787 2793 html/canvas/WebGLRenderbuffer.cpp 2794 html/canvas/WebGLRenderingContextBase.cpp 2788 2795 html/canvas/WebGLRenderingContext.cpp 2796 html/canvas/WebGL2RenderingContext.cpp 2789 2797 html/canvas/WebGLShader.cpp 2790 2798 html/canvas/WebGLShaderPrecisionFormat.cpp … … 2823 2831 html/canvas/WebGLProgram.idl 2824 2832 html/canvas/WebGLRenderbuffer.idl 2833 html/canvas/WebGLRenderingContextBase.idl 2825 2834 html/canvas/WebGLRenderingContext.idl 2835 html/canvas/WebGL2RenderingContext.idl 2826 2836 html/canvas/WebGLShader.idl 2827 2837 html/canvas/WebGLShaderPrecisionFormat.idl -
trunk/Source/WebCore/ChangeLog
r178673 r178674 1 2015-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 1 170 2015-01-19 Antti Koivisto <antti@apple.com> 2 171 -
trunk/Source/WebCore/DerivedSources.cpp
r178411 r178674 55 55 #include "JSOESTextureHalfFloatLinear.cpp" 56 56 #include "JSOESVertexArrayObject.cpp" 57 #include "JSWebGL2RenderingContext.cpp" 57 58 #include "JSWebGLActiveInfo.cpp" 58 59 #include "JSWebGLBuffer.cpp" … … 71 72 #include "JSWebGLRenderbuffer.cpp" 72 73 #include "JSWebGLRenderingContext.cpp" 74 #include "JSWebGLRenderingContextBase.cpp" 73 75 #include "JSWebGLShader.cpp" 74 76 #include "JSWebGLShaderPrecisionFormat.cpp" -
trunk/Source/WebCore/DerivedSources.make
r178586 r178674 445 445 $(WebCore)/html/canvas/WebGLProgram.idl \ 446 446 $(WebCore)/html/canvas/WebGLRenderbuffer.idl \ 447 $(WebCore)/html/canvas/WebGLRenderingContextBase.idl \ 447 448 $(WebCore)/html/canvas/WebGLRenderingContext.idl \ 449 $(WebCore)/html/canvas/WebGL2RenderingContext.idl \ 448 450 $(WebCore)/html/canvas/WebGLShader.idl \ 449 451 $(WebCore)/html/canvas/WebGLShaderPrecisionFormat.idl \ -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
r178586 r178674 764 764 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild> 765 765 </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> 766 782 <ClCompile Include="..\accessibility\AccessibilityNodeObject.cpp"> 767 783 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild> … … 778 794 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> 779 795 </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> 781 820 <ClCompile Include="..\css\CSSImageSetValue.cpp"> 782 821 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild> … … 6640 6679 <ClCompile Include="..\html\canvas\OESTextureHalfFloatLinear.cpp" /> 6641 6680 <ClCompile Include="..\html\canvas\OESVertexArrayObject.cpp" /> 6681 <ClCompile Include="..\html\canvas\WebGL2RenderingContext.cpp" /> 6642 6682 <ClCompile Include="..\html\canvas\WebGLBuffer.cpp" /> 6643 6683 <ClCompile Include="..\html\canvas\WebGLCompressedTextureATC.cpp" /> … … 6660 6700 <ClCompile Include="..\html\canvas\WebGLRenderbuffer.cpp" /> 6661 6701 <ClCompile Include="..\html\canvas\WebGLRenderingContext.cpp" /> 6702 <ClCompile Include="..\html\canvas\WebGLRenderingContextBase.cpp" /> 6662 6703 <ClCompile Include="..\html\canvas\WebGLShader.cpp" /> 6663 6704 <ClCompile Include="..\html\canvas\WebGLShaderPrecisionFormat.cpp" /> … … 18763 18804 <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSEXTFragDepth.h" /> 18764 18805 <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" /> 18765 18808 <ClInclude Include="..\accessibility\AccessibilityNodeObject.h" /> 18766 18809 <ClInclude Include="..\css\CSSImageSetValue.h" /> … … 18862 18905 <ClInclude Include="..\html\canvas\OESTextureHalfFloatLinear.h" /> 18863 18906 <ClInclude Include="..\html\canvas\OESVertexArrayObject.h" /> 18907 <ClInclude Include="..\html\canvas\WebGL2RenderingContext.h" /> 18864 18908 <ClInclude Include="..\html\canvas\WebGLActiveInfo.h" /> 18865 18909 <ClInclude Include="..\html\canvas\WebGLBuffer.h" /> … … 18883 18927 <ClInclude Include="..\html\canvas\WebGLRenderbuffer.h" /> 18884 18928 <ClInclude Include="..\html\canvas\WebGLRenderingContext.h" /> 18929 <ClInclude Include="..\html\canvas\WebGLRenderingContextBase.h" /> 18885 18930 <ClInclude Include="..\html\canvas\WebGLShader.h" /> 18886 18931 <ClInclude Include="..\html\canvas\WebGLShaderPrecisionFormat.h" /> -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
r178586 r178674 1384 1384 <Filter>platform\graphics</Filter> 1385 1385 </ClCompile> 1386 <ClCompile Include="..\platform\graphics\SegmentedFontData.cpp">1387 <Filter>platform\graphics</Filter>1388 </ClCompile>1389 1386 <ClCompile Include="..\platform\graphics\ShadowBlur.cpp"> 1390 1387 <Filter>platform\graphics</Filter> … … 4846 4843 <Filter>platform\graphics</Filter> 4847 4844 </ClCompile> 4848 <ClCompile Include="..\platform\graphics\Font.cpp">4849 <Filter>platform\graphics</Filter>4850 </ClCompile>4851 4845 <ClCompile Include="..\platform\graphics\FontCache.cpp"> 4852 4846 <Filter>platform\graphics</Filter> 4853 4847 </ClCompile> 4854 <ClCompile Include="..\platform\graphics\FontData.cpp">4855 <Filter>platform\graphics</Filter>4856 </ClCompile>4857 4848 <ClCompile Include="..\platform\graphics\FontDescription.cpp"> 4858 4849 <Filter>platform\graphics</Filter> … … 4862 4853 </ClCompile> 4863 4854 <ClCompile Include="..\platform\graphics\FontGlyphs.cpp"> 4864 <Filter>platform\graphics</Filter>4865 </ClCompile>4866 <ClCompile Include="..\platform\graphics\FontFastPath.cpp">4867 4855 <Filter>platform\graphics</Filter> 4868 4856 </ClCompile> … … 7157 7145 <Filter>html\canvas</Filter> 7158 7146 </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> 7159 7167 </ItemGroup> 7160 7168 <ItemGroup> … … 8425 8433 <Filter>platform\graphics</Filter> 8426 8434 </ClInclude> 8427 <ClInclude Include="..\platform\graphics\SegmentedFontData.h">8428 <Filter>platform\graphics</Filter>8429 </ClInclude>8430 8435 <ClInclude Include="..\platform\graphics\ShadowBlur.h"> 8431 8436 <Filter>platform\graphics</Filter> … … 12713 12718 <Filter>platform\graphics</Filter> 12714 12719 </ClInclude> 12715 <ClInclude Include="..\platform\graphics\Font.h">12716 <Filter>platform\graphics</Filter>12717 </ClInclude>12718 12720 <ClInclude Include="..\platform\graphics\FontCache.h"> 12719 <Filter>platform\graphics</Filter>12720 </ClInclude>12721 <ClInclude Include="..\platform\graphics\FontData.h">12722 12721 <Filter>platform\graphics</Filter> 12723 12722 </ClInclude> … … 15063 15062 <ClInclude Include="..\Modules\webdatabase\SQLStatementSync.h" /> 15064 15063 <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> 15065 15078 </ItemGroup> 15066 15079 <ItemGroup> -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r178634 r178674 5850 5850 D3D4E972130C7CFE007BA540 /* HTMLSummaryElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D3D4E970130C7CFE007BA540 /* HTMLSummaryElement.cpp */; }; 5851 5851 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 */; }; 5852 5862 D619A307144E00BE004BC302 /* ChildListMutationScope.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D619A305144E00BE004BC302 /* ChildListMutationScope.cpp */; }; 5853 5863 D619A308144E00BE004BC302 /* ChildListMutationScope.h in Headers */ = {isa = PBXBuildFile; fileRef = D619A306144E00BE004BC302 /* ChildListMutationScope.h */; }; … … 13332 13342 D3D4E970130C7CFE007BA540 /* HTMLSummaryElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLSummaryElement.cpp; sourceTree = "<group>"; }; 13333 13343 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>"; }; 13334 13356 D619A305144E00BE004BC302 /* ChildListMutationScope.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ChildListMutationScope.cpp; sourceTree = "<group>"; }; 13335 13357 D619A306144E00BE004BC302 /* ChildListMutationScope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChildListMutationScope.h; sourceTree = "<group>"; }; … … 15835 15857 49C7B9BA1042D32F0009D447 /* WebGLRenderbuffer.h */, 15836 15858 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 */, 15837 15865 49C7B9BF1042D32F0009D447 /* WebGLRenderingContext.cpp */, 15838 15866 49C7B9C01042D32F0009D447 /* WebGLRenderingContext.h */, … … 18909 18937 49C7B98A1042D2D30009D447 /* JSWebGLRenderbuffer.cpp */, 18910 18938 49C7B98B1042D2D30009D447 /* JSWebGLRenderbuffer.h */, 18939 D3F3D3651A69B1A50059FC2B /* JSWebGLRenderingContextBase.cpp */, 18940 D3F3D3661A69B1A50059FC2B /* JSWebGLRenderingContextBase.h */, 18941 D3F3D3611A69B1900059FC2B /* JSWebGL2RenderingContext.cpp */, 18942 D3F3D3621A69B1900059FC2B /* JSWebGL2RenderingContext.h */, 18911 18943 49EED1401051969400099FAB /* JSWebGLRenderingContext.cpp */, 18912 18944 49EED1411051969400099FAB /* JSWebGLRenderingContext.h */, … … 21003 21035 BE6DF708171CA2C500DD52B8 /* JSVideoTrackCustom.cpp */, 21004 21036 BE6DF70A171CA2C500DD52B8 /* JSVideoTrackListCustom.cpp */, 21037 D3F3D35A1A69A3B00059FC2B /* JSWebGLRenderingContextBaseCustom.cpp */, 21005 21038 49EED14C1051971A00099FAB /* JSWebGLRenderingContextCustom.cpp */, 21039 D3F3D3591A69A3B00059FC2B /* JSWebGL2RenderingContextCustom.cpp */, 21006 21040 BC275B7811C5D1C300C9206C /* JSWebKitPointCustom.cpp */, 21007 21041 E1CA5CBB0E8CDCAF00E8EF90 /* JSWorkerCustom.cpp */, … … 25087 25121 84224184107E77F400766A87 /* JSSVGFEMorphologyElement.h in Headers */, 25088 25122 B2FA3D8B0AB75A6F000E5AC4 /* JSSVGFEOffsetElement.h in Headers */, 25123 D3F3D36E1A69B7E00059FC2B /* WebGL2RenderingContext.h in Headers */, 25089 25124 B2FA3D8D0AB75A6F000E5AC4 /* JSSVGFEPointLightElement.h in Headers */, 25090 25125 B2FA3D8F0AB75A6F000E5AC4 /* JSSVGFESpecularLightingElement.h in Headers */, 25091 25126 B2FA3D910AB75A6F000E5AC4 /* JSSVGFESpotLightElement.h in Headers */, 25127 D3F3D36A1A69B7B90059FC2B /* WebGLRenderingContextBase.h in Headers */, 25092 25128 B2FA3D930AB75A6F000E5AC4 /* JSSVGFETileElement.h in Headers */, 25093 25129 B2FA3D950AB75A6F000E5AC4 /* JSSVGFETurbulenceElement.h in Headers */, … … 25489 25525 2DCB837919F99BBA00A7FBE4 /* NSSharingServicePickerSPI.h in Headers */, 25490 25526 2DCB837A19F99BBA00A7FBE4 /* NSSharingServiceSPI.h in Headers */, 25527 D3F3D3641A69B1900059FC2B /* JSWebGL2RenderingContext.h in Headers */, 25491 25528 CE1252531A1BEC0600864480 /* NSStringSPI.h in Headers */, 25492 25529 CE1252551A1BEC0E00864480 /* NSURLDownloadSPI.h in Headers */, … … 26351 26388 B2227AB80D00BF220071B782 /* SVGStyleElement.h in Headers */, 26352 26389 B2227ABB0D00BF220071B782 /* SVGSVGElement.h in Headers */, 26390 D3F3D3681A69B1A50059FC2B /* JSWebGLRenderingContextBase.h in Headers */, 26353 26391 B2227ABE0D00BF220071B782 /* SVGSwitchElement.h in Headers */, 26354 26392 B2227AC10D00BF220071B782 /* SVGSymbolElement.h in Headers */, … … 28733 28771 1A2C40AB0DEB55AA005AF19E /* JSTextCustom.cpp in Sources */, 28734 28772 933A14B80B7D1D5200A53FFD /* JSTextEvent.cpp in Sources */, 28773 D3F3D36B1A69B7C50059FC2B /* JSWebGLRenderingContextBaseCustom.cpp in Sources */, 28735 28774 BCEF45F50E687B5C001C1287 /* JSTextMetrics.cpp in Sources */, 28736 28775 070756941422668D00414161 /* JSTextTrack.cpp in Sources */, … … 28758 28797 7C73FB19191EF808007DE061 /* JSUserMessageHandlersNamespaceCustom.cpp in Sources */, 28759 28798 15C77094100D3CA8005BA267 /* JSValidityState.cpp in Sources */, 28799 D3F3D3671A69B1A50059FC2B /* JSWebGLRenderingContextBase.cpp in Sources */, 28760 28800 CDE83DB6183D352A0031EAA3 /* JSVideoPlaybackQuality.cpp in Sources */, 28761 28801 07C59B5F17F4B208000FBCBB /* JSVideoStreamTrack.cpp in Sources */, … … 29041 29081 0014628A103CD1DE000B20DB /* OriginAccessEntry.cpp in Sources */, 29042 29082 FE9E89FB16E2DC0500A908F8 /* OriginLock.cpp in Sources */, 29083 D3F3D36D1A69B7DC0059FC2B /* WebGL2RenderingContext.cpp in Sources */, 29043 29084 FD581FAE1520F91F003A7A75 /* OscillatorNode.cpp in Sources */, 29044 29085 1A0D57360A5C77FE007EDD4C /* OverflowEvent.cpp in Sources */, … … 29117 29158 5189F0DE10B46B0E00F3C739 /* PopStateEvent.cpp in Sources */, 29118 29159 93F19AF808245E59001E9ABC /* Position.cpp in Sources */, 29160 D3F3D3691A69B7B00059FC2B /* WebGLRenderingContextBase.cpp in Sources */, 29119 29161 37919C230B7D188600A56998 /* PositionIterator.cpp in Sources */, 29120 29162 B776D43D1104527500BEB0EC /* PrintContext.cpp in Sources */, … … 29479 29521 97BC6A471505F081001B74AC /* SQLStatement.cpp in Sources */, 29480 29522 FE8A674716CDD19E00930BF8 /* SQLStatementBackend.cpp in Sources */, 29523 D3F3D3631A69B1900059FC2B /* JSWebGL2RenderingContext.cpp in Sources */, 29481 29524 97BC6A4F1505F081001B74AC /* SQLTransaction.cpp in Sources */, 29482 29525 2D4F96F51A1ECC240098BF88 /* TextIndicator.cpp in Sources */, … … 29961 30004 CD82030D1395AB6A00F956C6 /* WebVideoFullscreenHUDWindowController.mm in Sources */, 29962 30005 3FBC4AF3189881560046EE38 /* WebVideoFullscreenInterfaceAVKit.mm in Sources */, 30006 D3F3D36C1A69B7D50059FC2B /* JSWebGL2RenderingContextCustom.cpp in Sources */, 29963 30007 65FD466619B596F6001E2B4D /* WebVideoFullscreenModelVideoElement.mm in Sources */, 29964 30008 F12171F516A8CED2000053CA /* WebVTTElement.cpp in Sources */, -
trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp
r178411 r178674 132 132 #include "JSVideoTrackCustom.cpp" 133 133 #include "JSVideoTrackListCustom.cpp" 134 #include "JSWebGL2RenderingContextCustom.cpp" 135 #include "JSWebGLRenderingContextBaseCustom.cpp" 136 #include "JSWebGLRenderingContextCustom.cpp" 134 137 #include "JSWebKitPointCustom.cpp" 135 138 #include "JSWorkerCustom.cpp" -
trunk/Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp
r178411 r178674 1 1 /* 2 * Copyright (C) 20 09Apple Inc. All rights reserved.2 * Copyright (C) 2015 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 33 33 34 34 #if ENABLE(WEBGL) 35 #include "JSWebGL2RenderingContext.h" 35 36 #include "JSWebGLRenderingContext.h" 37 #include "WebGL2RenderingContext.h" 36 38 #include "WebGLRenderingContext.h" 37 39 #endif … … 52 54 53 55 #if ENABLE(WEBGL) 54 if (object->is 3d())56 if (object->isWebGL1()) 55 57 return wrap<JSWebGLRenderingContext>(globalObject, static_cast<WebGLRenderingContext*>(object)); 58 if (object->isWebGL2()) 59 return wrap<JSWebGL2RenderingContext>(globalObject, static_cast<WebGL2RenderingContext*>(object)); 56 60 #endif 57 61 ASSERT_WITH_SECURITY_IMPLICATION(object->is2d()); -
trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp
r178411 r178674 38 38 39 39 #if ENABLE(WEBGL) 40 #include "JSWebGLRenderingContext .h"40 #include "JSWebGLRenderingContextBase.h" 41 41 #endif 42 42 -
trunk/Source/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp
r178411 r178674 36 36 #if ENABLE(WEBGL) 37 37 #include "JSDictionary.h" 38 #include "JSWebGLRenderingContext .h"38 #include "JSWebGLRenderingContextBase.h" 39 39 #include "WebGLContextAttributes.h" 40 40 #endif -
trunk/Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp
r178411 r178674 1 1 /* 2 * Copyright (C) 20 09Apple Inc. All rights reserved.2 * Copyright (C) 2015 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 27 27 28 28 #if ENABLE(WEBGL) 29 30 29 #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 #endif107 30 108 31 using namespace JSC; 109 32 110 33 namespace 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 WebGLObjectArray143 // 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, kVertexAttrib164 };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 => index192 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, kUniform207 };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 }260 34 261 35 void JSWebGLRenderingContext::visitAdditionalChildren(SlotVisitor& visitor) … … 264 38 } 265 39 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_vertexAttrib4v465 };466 467 enum DataFunctionMatrixToCall {468 f_uniformMatrix2fv, f_uniformMatrix3fv, f_uniformMatrix4fv469 };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 } else497 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 762 40 } // namespace WebCore 763 41 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r178633 r178674 2959 2959 $rootString = " ${implType}* root = &js${interfaceName}->impl();\n"; 2960 2960 } 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"; 2962 2962 } elsif (GetGenerateIsReachable($interface) eq "ImplFrame") { 2963 2963 $rootString = " Frame* root = WTF::getPtr(js${interfaceName}->impl().frame());\n"; -
trunk/Source/WebCore/html/HTMLCanvasElement.cpp
r178411 r178674 55 55 #if ENABLE(WEBGL) 56 56 #include "WebGLContextAttributes.h" 57 #include "WebGLRenderingContext .h"57 #include "WebGLRenderingContextBase.h" 58 58 #endif 59 59 … … 213 213 return nullptr; 214 214 if (!m_context) { 215 m_context = WebGLRenderingContext ::create(this, static_cast<WebGLContextAttributes*>(attrs));215 m_context = WebGLRenderingContextBase::create(this, static_cast<WebGLContextAttributes*>(attrs), type); 216 216 if (m_context) { 217 217 // Need to make sure a RenderLayer and compositing layer get created for the Canvas … … 328 328 #if ENABLE(WEBGL) 329 329 if (is3D() && oldSize != size()) 330 static_cast<WebGLRenderingContext *>(m_context.get())->reshape(width(), height());330 static_cast<WebGLRenderingContextBase*>(m_context.get())->reshape(width(), height()); 331 331 #endif 332 332 … … 395 395 #if ENABLE(WEBGL) 396 396 if (is3D()) 397 static_cast<WebGLRenderingContext *>(m_context.get())->markLayerComposited();397 static_cast<WebGLRenderingContextBase*>(m_context.get())->markLayerComposited(); 398 398 #endif 399 399 } … … 476 476 return nullptr; 477 477 478 WebGLRenderingContext * ctx = static_cast<WebGLRenderingContext*>(m_context.get());478 WebGLRenderingContextBase* ctx = static_cast<WebGLRenderingContextBase*>(m_context.get()); 479 479 480 480 return ctx->paintRenderingResultsToImageData(); -
trunk/Source/WebCore/html/canvas/ANGLEInstancedArrays.cpp
r178411 r178674 35 35 namespace WebCore { 36 36 37 ANGLEInstancedArrays::ANGLEInstancedArrays(WebGLRenderingContext * context)37 ANGLEInstancedArrays::ANGLEInstancedArrays(WebGLRenderingContextBase* context) 38 38 : WebGLExtension(context) 39 39 { … … 49 49 } 50 50 51 bool ANGLEInstancedArrays::supported(WebGLRenderingContext * context)51 bool ANGLEInstancedArrays::supported(WebGLRenderingContextBase* context) 52 52 { 53 53 #if PLATFORM(IOS) || PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 -
trunk/Source/WebCore/html/canvas/ANGLEInstancedArrays.h
r178411 r178674 31 31 namespace WebCore { 32 32 33 class WebGLRenderingContext ;33 class WebGLRenderingContextBase; 34 34 35 35 class ANGLEInstancedArrays final : public WebGLExtension { 36 36 public: 37 explicit ANGLEInstancedArrays(WebGLRenderingContext *);37 explicit ANGLEInstancedArrays(WebGLRenderingContextBase*); 38 38 virtual ~ANGLEInstancedArrays(); 39 39 40 40 virtual ExtensionName getName() const; 41 41 42 static bool supported(WebGLRenderingContext *);42 static bool supported(WebGLRenderingContextBase*); 43 43 44 44 void drawArraysInstancedANGLE(GC3Denum mode, GC3Dint first, GC3Dsizei count, GC3Dsizei primcount); -
trunk/Source/WebCore/html/canvas/CanvasRenderingContext.h
r178411 r178674 53 53 54 54 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(); } 56 58 virtual bool isAccelerated() const { return false; } 57 59 -
trunk/Source/WebCore/html/canvas/EXTBlendMinMax.cpp
r178411 r178674 31 31 namespace WebCore { 32 32 33 EXTBlendMinMax::EXTBlendMinMax(WebGLRenderingContext * context)33 EXTBlendMinMax::EXTBlendMinMax(WebGLRenderingContextBase* context) 34 34 : WebGLExtension(context) 35 35 { -
trunk/Source/WebCore/html/canvas/EXTBlendMinMax.h
r178411 r178674 33 33 class EXTBlendMinMax final : public WebGLExtension { 34 34 public: 35 explicit EXTBlendMinMax(WebGLRenderingContext *);35 explicit EXTBlendMinMax(WebGLRenderingContextBase*); 36 36 virtual ~EXTBlendMinMax(); 37 37 -
trunk/Source/WebCore/html/canvas/EXTFragDepth.cpp
r178411 r178674 31 31 namespace WebCore { 32 32 33 EXTFragDepth::EXTFragDepth(WebGLRenderingContext * context)33 EXTFragDepth::EXTFragDepth(WebGLRenderingContextBase* context) 34 34 : WebGLExtension(context) 35 35 { -
trunk/Source/WebCore/html/canvas/EXTFragDepth.h
r178411 r178674 33 33 class EXTFragDepth final : public WebGLExtension { 34 34 public: 35 explicit EXTFragDepth(WebGLRenderingContext *);35 explicit EXTFragDepth(WebGLRenderingContextBase*); 36 36 virtual ~EXTFragDepth(); 37 37 -
trunk/Source/WebCore/html/canvas/EXTShaderTextureLOD.cpp
r178411 r178674 31 31 namespace WebCore { 32 32 33 EXTShaderTextureLOD::EXTShaderTextureLOD(WebGLRenderingContext * context)33 EXTShaderTextureLOD::EXTShaderTextureLOD(WebGLRenderingContextBase* context) 34 34 : WebGLExtension(context) 35 35 { -
trunk/Source/WebCore/html/canvas/EXTShaderTextureLOD.h
r178411 r178674 33 33 class EXTShaderTextureLOD final : public WebGLExtension { 34 34 public: 35 explicit EXTShaderTextureLOD(WebGLRenderingContext *);35 explicit EXTShaderTextureLOD(WebGLRenderingContextBase*); 36 36 virtual ~EXTShaderTextureLOD(); 37 37 -
trunk/Source/WebCore/html/canvas/EXTTextureFilterAnisotropic.cpp
r178411 r178674 32 32 namespace WebCore { 33 33 34 EXTTextureFilterAnisotropic::EXTTextureFilterAnisotropic(WebGLRenderingContext * context)34 EXTTextureFilterAnisotropic::EXTTextureFilterAnisotropic(WebGLRenderingContextBase* context) 35 35 : WebGLExtension(context) 36 36 { -
trunk/Source/WebCore/html/canvas/EXTTextureFilterAnisotropic.h
r178411 r178674 33 33 class EXTTextureFilterAnisotropic final : public WebGLExtension { 34 34 public: 35 explicit EXTTextureFilterAnisotropic(WebGLRenderingContext *);35 explicit EXTTextureFilterAnisotropic(WebGLRenderingContextBase*); 36 36 virtual ~EXTTextureFilterAnisotropic(); 37 37 -
trunk/Source/WebCore/html/canvas/EXTsRGB.cpp
r178411 r178674 31 31 namespace WebCore { 32 32 33 EXTsRGB::EXTsRGB(WebGLRenderingContext * context)33 EXTsRGB::EXTsRGB(WebGLRenderingContextBase* context) 34 34 : WebGLExtension(context) 35 35 { -
trunk/Source/WebCore/html/canvas/EXTsRGB.h
r178411 r178674 33 33 class EXTsRGB final : public WebGLExtension { 34 34 public: 35 explicit EXTsRGB(WebGLRenderingContext *);35 explicit EXTsRGB(WebGLRenderingContextBase*); 36 36 virtual ~EXTsRGB(); 37 37 -
trunk/Source/WebCore/html/canvas/OESElementIndexUint.cpp
r178411 r178674 32 32 namespace WebCore { 33 33 34 OESElementIndexUint::OESElementIndexUint(WebGLRenderingContext * context)34 OESElementIndexUint::OESElementIndexUint(WebGLRenderingContextBase* context) 35 35 : WebGLExtension(context) 36 36 { -
trunk/Source/WebCore/html/canvas/OESElementIndexUint.h
r178411 r178674 33 33 class OESElementIndexUint final : public WebGLExtension { 34 34 public: 35 explicit OESElementIndexUint(WebGLRenderingContext *);35 explicit OESElementIndexUint(WebGLRenderingContextBase*); 36 36 virtual ~OESElementIndexUint(); 37 37 -
trunk/Source/WebCore/html/canvas/OESStandardDerivatives.cpp
r178411 r178674 32 32 namespace WebCore { 33 33 34 OESStandardDerivatives::OESStandardDerivatives(WebGLRenderingContext * context)34 OESStandardDerivatives::OESStandardDerivatives(WebGLRenderingContextBase* context) 35 35 : WebGLExtension(context) 36 36 { -
trunk/Source/WebCore/html/canvas/OESStandardDerivatives.h
r178411 r178674 33 33 class OESStandardDerivatives final : public WebGLExtension { 34 34 public: 35 explicit OESStandardDerivatives(WebGLRenderingContext *);35 explicit OESStandardDerivatives(WebGLRenderingContextBase*); 36 36 virtual ~OESStandardDerivatives(); 37 37 -
trunk/Source/WebCore/html/canvas/OESTextureFloat.cpp
r178411 r178674 32 32 namespace WebCore { 33 33 34 OESTextureFloat::OESTextureFloat(WebGLRenderingContext * context)34 OESTextureFloat::OESTextureFloat(WebGLRenderingContextBase* context) 35 35 : WebGLExtension(context) 36 36 { -
trunk/Source/WebCore/html/canvas/OESTextureFloat.h
r178411 r178674 33 33 class OESTextureFloat final : public WebGLExtension { 34 34 public: 35 OESTextureFloat(WebGLRenderingContext *);35 OESTextureFloat(WebGLRenderingContextBase*); 36 36 virtual ~OESTextureFloat(); 37 37 -
trunk/Source/WebCore/html/canvas/OESTextureFloatLinear.cpp
r178411 r178674 31 31 namespace WebCore { 32 32 33 OESTextureFloatLinear::OESTextureFloatLinear(WebGLRenderingContext * context)33 OESTextureFloatLinear::OESTextureFloatLinear(WebGLRenderingContextBase* context) 34 34 : WebGLExtension(context) 35 35 { -
trunk/Source/WebCore/html/canvas/OESTextureFloatLinear.h
r178411 r178674 33 33 class OESTextureFloatLinear final : public WebGLExtension { 34 34 public: 35 explicit OESTextureFloatLinear(WebGLRenderingContext *);35 explicit OESTextureFloatLinear(WebGLRenderingContextBase*); 36 36 virtual ~OESTextureFloatLinear(); 37 37 -
trunk/Source/WebCore/html/canvas/OESTextureHalfFloat.cpp
r178411 r178674 32 32 namespace WebCore { 33 33 34 OESTextureHalfFloat::OESTextureHalfFloat(WebGLRenderingContext * context)34 OESTextureHalfFloat::OESTextureHalfFloat(WebGLRenderingContextBase* context) 35 35 : WebGLExtension(context) 36 36 { -
trunk/Source/WebCore/html/canvas/OESTextureHalfFloat.h
r178411 r178674 33 33 class OESTextureHalfFloat final : public WebGLExtension { 34 34 public: 35 OESTextureHalfFloat(WebGLRenderingContext *);35 OESTextureHalfFloat(WebGLRenderingContextBase*); 36 36 virtual ~OESTextureHalfFloat(); 37 37 -
trunk/Source/WebCore/html/canvas/OESTextureHalfFloatLinear.cpp
r178411 r178674 31 31 namespace WebCore { 32 32 33 OESTextureHalfFloatLinear::OESTextureHalfFloatLinear(WebGLRenderingContext * context)33 OESTextureHalfFloatLinear::OESTextureHalfFloatLinear(WebGLRenderingContextBase* context) 34 34 : WebGLExtension(context) 35 35 { -
trunk/Source/WebCore/html/canvas/OESTextureHalfFloatLinear.h
r178411 r178674 33 33 class OESTextureHalfFloatLinear final : public WebGLExtension { 34 34 public: 35 OESTextureHalfFloatLinear(WebGLRenderingContext *);35 OESTextureHalfFloatLinear(WebGLRenderingContextBase*); 36 36 virtual ~OESTextureHalfFloatLinear(); 37 37 -
trunk/Source/WebCore/html/canvas/OESVertexArrayObject.cpp
r178411 r178674 34 34 namespace WebCore { 35 35 36 OESVertexArrayObject::OESVertexArrayObject(WebGLRenderingContext * context)36 OESVertexArrayObject::OESVertexArrayObject(WebGLRenderingContextBase* context) 37 37 : WebGLExtension(context) 38 38 { -
trunk/Source/WebCore/html/canvas/OESVertexArrayObject.h
r178411 r178674 32 32 namespace WebCore { 33 33 34 class WebGLRenderingContext ;34 class WebGLRenderingContextBase; 35 35 class WebGLVertexArrayObjectOES; 36 36 … … 39 39 class OESVertexArrayObject final : public WebGLExtension { 40 40 public: 41 OESVertexArrayObject(WebGLRenderingContext *);41 OESVertexArrayObject(WebGLRenderingContextBase*); 42 42 virtual ~OESVertexArrayObject(); 43 43 -
trunk/Source/WebCore/html/canvas/WebGLBuffer.cpp
r178411 r178674 31 31 32 32 #include "WebGLContextGroup.h" 33 #include "WebGLRenderingContext .h"33 #include "WebGLRenderingContextBase.h" 34 34 35 35 namespace WebCore { 36 36 37 PassRefPtr<WebGLBuffer> WebGLBuffer::create(WebGLRenderingContext * ctx)37 PassRefPtr<WebGLBuffer> WebGLBuffer::create(WebGLRenderingContextBase* ctx) 38 38 { 39 39 return adoptRef(new WebGLBuffer(ctx)); 40 40 } 41 41 42 WebGLBuffer::WebGLBuffer(WebGLRenderingContext * ctx)42 WebGLBuffer::WebGLBuffer(WebGLRenderingContextBase* ctx) 43 43 : WebGLSharedObject(ctx) 44 44 , m_target(0) -
trunk/Source/WebCore/html/canvas/WebGLBuffer.h
r178411 r178674 42 42 virtual ~WebGLBuffer(); 43 43 44 static PassRefPtr<WebGLBuffer> create(WebGLRenderingContext *);44 static PassRefPtr<WebGLBuffer> create(WebGLRenderingContextBase*); 45 45 46 46 bool associateBufferData(GC3Dsizeiptr size); … … 67 67 68 68 protected: 69 WebGLBuffer(WebGLRenderingContext *);69 WebGLBuffer(WebGLRenderingContextBase*); 70 70 71 71 virtual void deleteObjectImpl(GraphicsContext3D*, Platform3DObject) override; -
trunk/Source/WebCore/html/canvas/WebGLCompressedTextureATC.cpp
r178411 r178674 34 34 namespace WebCore { 35 35 36 WebGLCompressedTextureATC::WebGLCompressedTextureATC(WebGLRenderingContext * context)36 WebGLCompressedTextureATC::WebGLCompressedTextureATC(WebGLRenderingContextBase* context) 37 37 : WebGLExtension(context) 38 38 { … … 51 51 } 52 52 53 bool WebGLCompressedTextureATC::supported(WebGLRenderingContext * context)53 bool WebGLCompressedTextureATC::supported(WebGLRenderingContextBase* context) 54 54 { 55 55 Extensions3D* extensions = context->graphicsContext3D()->getExtensions(); -
trunk/Source/WebCore/html/canvas/WebGLCompressedTextureATC.h
r178411 r178674 35 35 class WebGLCompressedTextureATC final : public WebGLExtension { 36 36 public: 37 explicit WebGLCompressedTextureATC(WebGLRenderingContext *);37 explicit WebGLCompressedTextureATC(WebGLRenderingContextBase*); 38 38 virtual ~WebGLCompressedTextureATC(); 39 39 40 static bool supported(WebGLRenderingContext *);40 static bool supported(WebGLRenderingContextBase*); 41 41 42 42 virtual ExtensionName getName() const override; -
trunk/Source/WebCore/html/canvas/WebGLCompressedTexturePVRTC.cpp
r178411 r178674 31 31 32 32 #include "Extensions3D.h" 33 #include "WebGLRenderingContext .h"33 #include "WebGLRenderingContextBase.h" 34 34 35 35 namespace WebCore { 36 36 37 WebGLCompressedTexturePVRTC::WebGLCompressedTexturePVRTC(WebGLRenderingContext * context)37 WebGLCompressedTexturePVRTC::WebGLCompressedTexturePVRTC(WebGLRenderingContextBase* context) 38 38 : WebGLExtension(context) 39 39 { … … 53 53 } 54 54 55 bool WebGLCompressedTexturePVRTC::supported(WebGLRenderingContext * context)55 bool WebGLCompressedTexturePVRTC::supported(WebGLRenderingContextBase* context) 56 56 { 57 57 Extensions3D* extensions = context->graphicsContext3D()->getExtensions(); -
trunk/Source/WebCore/html/canvas/WebGLCompressedTexturePVRTC.h
r178411 r178674 33 33 class WebGLCompressedTexturePVRTC final : public WebGLExtension { 34 34 public: 35 explicit WebGLCompressedTexturePVRTC(WebGLRenderingContext *);35 explicit WebGLCompressedTexturePVRTC(WebGLRenderingContextBase*); 36 36 virtual ~WebGLCompressedTexturePVRTC(); 37 37 38 static bool supported(WebGLRenderingContext *);38 static bool supported(WebGLRenderingContextBase*); 39 39 virtual ExtensionName getName() const override; 40 40 }; -
trunk/Source/WebCore/html/canvas/WebGLCompressedTextureS3TC.cpp
r178411 r178674 31 31 32 32 #include "Extensions3D.h" 33 #include "WebGLRenderingContext .h"33 #include "WebGLRenderingContextBase.h" 34 34 35 35 namespace WebCore { 36 36 37 WebGLCompressedTextureS3TC::WebGLCompressedTextureS3TC(WebGLRenderingContext * context)37 WebGLCompressedTextureS3TC::WebGLCompressedTextureS3TC(WebGLRenderingContextBase* context) 38 38 : WebGLExtension(context) 39 39 { … … 53 53 } 54 54 55 bool WebGLCompressedTextureS3TC::supported(WebGLRenderingContext * context)55 bool WebGLCompressedTextureS3TC::supported(WebGLRenderingContextBase* context) 56 56 { 57 57 Extensions3D* extensions = context->graphicsContext3D()->getExtensions(); -
trunk/Source/WebCore/html/canvas/WebGLCompressedTextureS3TC.h
r178411 r178674 35 35 class WebGLCompressedTextureS3TC final : public WebGLExtension { 36 36 public: 37 explicit WebGLCompressedTextureS3TC(WebGLRenderingContext *);37 explicit WebGLCompressedTextureS3TC(WebGLRenderingContextBase*); 38 38 virtual ~WebGLCompressedTextureS3TC(); 39 39 40 static bool supported(WebGLRenderingContext *);40 static bool supported(WebGLRenderingContextBase*); 41 41 42 42 virtual ExtensionName getName() const override; -
trunk/Source/WebCore/html/canvas/WebGLContextGroup.cpp
r178411 r178674 31 31 32 32 #include "GraphicsContext3D.h" 33 #include "WebGLRenderingContext .h"33 #include "WebGLRenderingContextBase.h" 34 34 #include "WebGLSharedObject.h" 35 35 … … 54 54 { 55 55 ASSERT(!m_contexts.isEmpty()); 56 HashSet<WebGLRenderingContext *>::iterator it = m_contexts.begin();56 HashSet<WebGLRenderingContextBase*>::iterator it = m_contexts.begin(); 57 57 return (*it)->graphicsContext3D(); 58 58 } 59 59 60 void WebGLContextGroup::addContext(WebGLRenderingContext * context)60 void WebGLContextGroup::addContext(WebGLRenderingContextBase* context) 61 61 { 62 62 m_contexts.add(context); 63 63 } 64 64 65 void WebGLContextGroup::removeContext(WebGLRenderingContext * context)65 void WebGLContextGroup::removeContext(WebGLRenderingContextBase* context) 66 66 { 67 67 // We must call detachAndRemoveAllObjects before removing the last context. … … 90 90 } 91 91 92 void WebGLContextGroup::loseContextGroup(WebGLRenderingContext ::LostContextMode mode)92 void WebGLContextGroup::loseContextGroup(WebGLRenderingContextBase::LostContextMode mode) 93 93 { 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) 95 95 (*it)->loseContextImpl(mode); 96 96 -
trunk/Source/WebCore/html/canvas/WebGLContextGroup.h
r178411 r178674 27 27 #define WebGLContextGroup_h 28 28 29 #include <WebGLRenderingContext.h>29 #include "WebGLRenderingContextBase.h" 30 30 #include <wtf/HashSet.h> 31 31 #include <wtf/PassRefPtr.h> … … 37 37 class WebGLExtension; 38 38 class WebGLSharedObject; 39 class WebGLRenderingContext ;39 class WebGLRenderingContextBase; 40 40 41 41 typedef int ExceptionCode; … … 46 46 ~WebGLContextGroup(); 47 47 48 void addContext(WebGLRenderingContext *);49 void removeContext(WebGLRenderingContext *);48 void addContext(WebGLRenderingContextBase*); 49 void removeContext(WebGLRenderingContextBase*); 50 50 51 51 void addObject(WebGLSharedObject*); … … 54 54 GraphicsContext3D* getAGraphicsContext3D(); 55 55 56 void loseContextGroup(WebGLRenderingContext ::LostContextMode);56 void loseContextGroup(WebGLRenderingContextBase::LostContextMode); 57 57 58 58 private: … … 63 63 void detachAndRemoveAllObjects(); 64 64 65 HashSet<WebGLRenderingContext *> m_contexts;65 HashSet<WebGLRenderingContextBase*> m_contexts; 66 66 HashSet<WebGLSharedObject*> m_groupObjects; 67 67 }; -
trunk/Source/WebCore/html/canvas/WebGLContextObject.cpp
r178411 r178674 30 30 #include "WebGLContextObject.h" 31 31 32 #include "WebGLRenderingContext .h"32 #include "WebGLRenderingContextBase.h" 33 33 34 34 namespace WebCore { 35 35 36 WebGLContextObject::WebGLContextObject(WebGLRenderingContext * context)36 WebGLContextObject::WebGLContextObject(WebGLRenderingContextBase* context) 37 37 : WebGLObject(context) 38 38 , m_context(context) -
trunk/Source/WebCore/html/canvas/WebGLContextObject.h
r178411 r178674 32 32 33 33 class GraphicsContext3D; 34 class WebGLRenderingContext ;34 class WebGLRenderingContextBase; 35 35 36 36 // WebGLContextObject the base class for objects that are owned by a specific … … 40 40 virtual ~WebGLContextObject(); 41 41 42 WebGLRenderingContext * context() const { return m_context; }42 WebGLRenderingContextBase* context() const { return m_context; } 43 43 44 virtual bool validate(const WebGLContextGroup*, const WebGLRenderingContext * context) const override44 virtual bool validate(const WebGLContextGroup*, const WebGLRenderingContextBase* context) const override 45 45 { 46 46 return context == m_context; … … 50 50 51 51 protected: 52 WebGLContextObject(WebGLRenderingContext *);52 WebGLContextObject(WebGLRenderingContextBase*); 53 53 54 54 virtual bool hasGroupOrContext() const override … … 60 60 61 61 private: 62 WebGLRenderingContext * m_context;62 WebGLRenderingContextBase* m_context; 63 63 }; 64 64 -
trunk/Source/WebCore/html/canvas/WebGLDebugRendererInfo.cpp
r178411 r178674 30 30 #include "WebGLDebugRendererInfo.h" 31 31 32 #include "WebGLRenderingContext .h"32 #include "WebGLRenderingContextBase.h" 33 33 34 34 namespace WebCore { 35 35 36 WebGLDebugRendererInfo::WebGLDebugRendererInfo(WebGLRenderingContext * context)36 WebGLDebugRendererInfo::WebGLDebugRendererInfo(WebGLRenderingContextBase* context) 37 37 : WebGLExtension(context) 38 38 { -
trunk/Source/WebCore/html/canvas/WebGLDebugRendererInfo.h
r178411 r178674 38 38 }; 39 39 40 explicit WebGLDebugRendererInfo(WebGLRenderingContext *);40 explicit WebGLDebugRendererInfo(WebGLRenderingContextBase*); 41 41 virtual ~WebGLDebugRendererInfo(); 42 42 -
trunk/Source/WebCore/html/canvas/WebGLDebugShaders.cpp
r178411 r178674 31 31 32 32 #include "Extensions3D.h" 33 #include "WebGLRenderingContext .h"33 #include "WebGLRenderingContextBase.h" 34 34 #include "WebGLShader.h" 35 35 36 36 namespace WebCore { 37 37 38 WebGLDebugShaders::WebGLDebugShaders(WebGLRenderingContext * context)38 WebGLDebugShaders::WebGLDebugShaders(WebGLRenderingContextBase* context) 39 39 : WebGLExtension(context) 40 40 { -
trunk/Source/WebCore/html/canvas/WebGLDebugShaders.h
r178411 r178674 37 37 class WebGLDebugShaders final : public WebGLExtension { 38 38 public: 39 explicit WebGLDebugShaders(WebGLRenderingContext *);39 explicit WebGLDebugShaders(WebGLRenderingContextBase*); 40 40 virtual ~WebGLDebugShaders(); 41 41 -
trunk/Source/WebCore/html/canvas/WebGLDepthTexture.cpp
r178411 r178674 34 34 namespace WebCore { 35 35 36 WebGLDepthTexture::WebGLDepthTexture(WebGLRenderingContext * context)36 WebGLDepthTexture::WebGLDepthTexture(WebGLRenderingContextBase* context) 37 37 : WebGLExtension(context) 38 38 { -
trunk/Source/WebCore/html/canvas/WebGLDepthTexture.h
r178411 r178674 33 33 class WebGLDepthTexture final : public WebGLExtension { 34 34 public: 35 explicit WebGLDepthTexture(WebGLRenderingContext *);35 explicit WebGLDepthTexture(WebGLRenderingContextBase*); 36 36 virtual ~WebGLDepthTexture(); 37 37 -
trunk/Source/WebCore/html/canvas/WebGLDrawBuffers.cpp
r178411 r178674 33 33 namespace WebCore { 34 34 35 WebGLDrawBuffers::WebGLDrawBuffers(WebGLRenderingContext * context)35 WebGLDrawBuffers::WebGLDrawBuffers(WebGLRenderingContextBase* context) 36 36 : WebGLExtension(context) 37 37 { … … 49 49 #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101000) 50 50 51 bool WebGLDrawBuffers::supported(WebGLRenderingContext *)51 bool WebGLDrawBuffers::supported(WebGLRenderingContextBase*) 52 52 { 53 53 return false; … … 56 56 #else 57 57 58 bool WebGLDrawBuffers::supported(WebGLRenderingContext * context)58 bool WebGLDrawBuffers::supported(WebGLRenderingContextBase* context) 59 59 { 60 60 Extensions3D* extensions = context->graphicsContext3D()->getExtensions(); … … 100 100 101 101 // static 102 bool WebGLDrawBuffers::satisfiesWebGLRequirements(WebGLRenderingContext * webglContext)102 bool WebGLDrawBuffers::satisfiesWebGLRequirements(WebGLRenderingContextBase* webglContext) 103 103 { 104 104 GraphicsContext3D* context = webglContext->graphicsContext3D(); -
trunk/Source/WebCore/html/canvas/WebGLDrawBuffers.h
r178411 r178674 33 33 class WebGLDrawBuffers final : public WebGLExtension { 34 34 public: 35 explicit WebGLDrawBuffers(WebGLRenderingContext *);35 explicit WebGLDrawBuffers(WebGLRenderingContextBase*); 36 36 virtual ~WebGLDrawBuffers(); 37 37 38 static bool supported(WebGLRenderingContext *);38 static bool supported(WebGLRenderingContextBase*); 39 39 40 40 virtual ExtensionName getName() const override; … … 43 43 44 44 private: 45 static bool satisfiesWebGLRequirements(WebGLRenderingContext *);45 static bool satisfiesWebGLRequirements(WebGLRenderingContextBase*); 46 46 }; 47 47 -
trunk/Source/WebCore/html/canvas/WebGLExtension.cpp
r178411 r178674 32 32 namespace WebCore { 33 33 34 WebGLExtension::WebGLExtension(WebGLRenderingContext * context)34 WebGLExtension::WebGLExtension(WebGLRenderingContextBase* context) 35 35 : m_context(context) 36 36 { -
trunk/Source/WebCore/html/canvas/WebGLExtension.h
r178411 r178674 27 27 #define WebGLExtension_h 28 28 29 #include "WebGLRenderingContext .h"29 #include "WebGLRenderingContextBase.h" 30 30 31 31 namespace WebCore { … … 61 61 void ref() { m_context->ref(); } 62 62 void deref() { m_context->deref(); } 63 WebGLRenderingContext * context() { return m_context; }63 WebGLRenderingContextBase* context() { return m_context; } 64 64 65 65 virtual ~WebGLExtension(); … … 67 67 68 68 protected: 69 WebGLExtension(WebGLRenderingContext *);70 WebGLRenderingContext * m_context;69 WebGLExtension(WebGLRenderingContextBase*); 70 WebGLRenderingContextBase* m_context; 71 71 }; 72 72 -
trunk/Source/WebCore/html/canvas/WebGLFramebuffer.cpp
r178411 r178674 33 33 #include "WebGLContextGroup.h" 34 34 #include "WebGLDrawBuffers.h" 35 #include "WebGLRenderingContext .h"35 #include "WebGLRenderingContextBase.h" 36 36 37 37 namespace WebCore { … … 270 270 } 271 271 272 PassRefPtr<WebGLFramebuffer> WebGLFramebuffer::create(WebGLRenderingContext * ctx)272 PassRefPtr<WebGLFramebuffer> WebGLFramebuffer::create(WebGLRenderingContextBase* ctx) 273 273 { 274 274 return adoptRef(new WebGLFramebuffer(ctx)); 275 275 } 276 276 277 WebGLFramebuffer::WebGLFramebuffer(WebGLRenderingContext * ctx)277 WebGLFramebuffer::WebGLFramebuffer(WebGLRenderingContextBase* ctx) 278 278 : WebGLContextObject(ctx) 279 279 , m_hasEverBeenBound(false) -
trunk/Source/WebCore/html/canvas/WebGLFramebuffer.h
r178411 r178674 62 62 virtual ~WebGLFramebuffer(); 63 63 64 static PassRefPtr<WebGLFramebuffer> create(WebGLRenderingContext *);64 static PassRefPtr<WebGLFramebuffer> create(WebGLRenderingContextBase*); 65 65 66 66 void setAttachmentForBoundFramebuffer(GC3Denum attachment, GC3Denum texTarget, WebGLTexture*, GC3Dint level); … … 102 102 103 103 protected: 104 WebGLFramebuffer(WebGLRenderingContext *);104 WebGLFramebuffer(WebGLRenderingContextBase*); 105 105 106 106 virtual void deleteObjectImpl(GraphicsContext3D*, Platform3DObject) override; -
trunk/Source/WebCore/html/canvas/WebGLLoseContext.cpp
r178411 r178674 30 30 #include "WebGLLoseContext.h" 31 31 32 #include "WebGLRenderingContext .h"32 #include "WebGLRenderingContextBase.h" 33 33 34 34 namespace WebCore { 35 35 36 WebGLLoseContext::WebGLLoseContext(WebGLRenderingContext * context)36 WebGLLoseContext::WebGLLoseContext(WebGLRenderingContextBase* context) 37 37 : WebGLExtension(context) 38 38 { … … 50 50 void WebGLLoseContext::loseContext() 51 51 { 52 m_context->forceLostContext(WebGLRenderingContext ::SyntheticLostContext);52 m_context->forceLostContext(WebGLRenderingContextBase::SyntheticLostContext); 53 53 } 54 54 -
trunk/Source/WebCore/html/canvas/WebGLLoseContext.h
r178411 r178674 31 31 namespace WebCore { 32 32 33 class WebGLRenderingContext ;33 class WebGLRenderingContextBase; 34 34 35 35 class WebGLLoseContext final : public WebGLExtension { 36 36 public: 37 explicit WebGLLoseContext(WebGLRenderingContext *);37 explicit WebGLLoseContext(WebGLRenderingContextBase*); 38 38 virtual ~WebGLLoseContext(); 39 39 -
trunk/Source/WebCore/html/canvas/WebGLObject.cpp
r178411 r178674 35 35 #include "WebGLDebugShaders.h" 36 36 #include "WebGLLoseContext.h" 37 #include "WebGLRenderingContext .h"37 #include "WebGLRenderingContextBase.h" 38 38 39 39 namespace WebCore { 40 40 41 WebGLObject::WebGLObject(WebGLRenderingContext *)41 WebGLObject::WebGLObject(WebGLRenderingContextBase*) 42 42 : m_object(0) 43 43 , m_attachmentCount(0) -
trunk/Source/WebCore/html/canvas/WebGLObject.h
r178411 r178674 35 35 class GraphicsContext3D; 36 36 class WebGLContextGroup; 37 class WebGLRenderingContext ;37 class WebGLRenderingContextBase; 38 38 39 39 class WebGLObject : public RefCounted<WebGLObject> { … … 57 57 58 58 // 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; 60 60 61 61 protected: 62 WebGLObject(WebGLRenderingContext *);62 WebGLObject(WebGLRenderingContextBase*); 63 63 64 64 // setObject should be only called once right after creating a WebGLObject. -
trunk/Source/WebCore/html/canvas/WebGLProgram.cpp
r178411 r178674 31 31 32 32 #include "WebGLContextGroup.h" 33 #include "WebGLRenderingContext .h"33 #include "WebGLRenderingContextBase.h" 34 34 35 35 namespace WebCore { 36 36 37 PassRefPtr<WebGLProgram> WebGLProgram::create(WebGLRenderingContext * ctx)37 PassRefPtr<WebGLProgram> WebGLProgram::create(WebGLRenderingContextBase* ctx) 38 38 { 39 39 return adoptRef(new WebGLProgram(ctx)); 40 40 } 41 41 42 WebGLProgram::WebGLProgram(WebGLRenderingContext * ctx)42 WebGLProgram::WebGLProgram(WebGLRenderingContextBase* ctx) 43 43 : WebGLSharedObject(ctx) 44 44 , m_linkStatus(false) -
trunk/Source/WebCore/html/canvas/WebGLProgram.h
r178411 r178674 40 40 virtual ~WebGLProgram(); 41 41 42 static PassRefPtr<WebGLProgram> create(WebGLRenderingContext *);42 static PassRefPtr<WebGLProgram> create(WebGLRenderingContextBase*); 43 43 44 44 unsigned numActiveAttribLocations(); … … 63 63 64 64 protected: 65 WebGLProgram(WebGLRenderingContext *);65 WebGLProgram(WebGLRenderingContextBase*); 66 66 67 67 virtual void deleteObjectImpl(GraphicsContext3D*, Platform3DObject) override; -
trunk/Source/WebCore/html/canvas/WebGLRenderbuffer.cpp
r178411 r178674 31 31 32 32 #include "WebGLContextGroup.h" 33 #include "WebGLRenderingContext .h"33 #include "WebGLRenderingContextBase.h" 34 34 35 35 namespace WebCore { 36 36 37 PassRefPtr<WebGLRenderbuffer> WebGLRenderbuffer::create(WebGLRenderingContext * ctx)37 PassRefPtr<WebGLRenderbuffer> WebGLRenderbuffer::create(WebGLRenderingContextBase* ctx) 38 38 { 39 39 return adoptRef(new WebGLRenderbuffer(ctx)); … … 45 45 } 46 46 47 WebGLRenderbuffer::WebGLRenderbuffer(WebGLRenderingContext * ctx)47 WebGLRenderbuffer::WebGLRenderbuffer(WebGLRenderingContextBase* ctx) 48 48 : WebGLSharedObject(ctx) 49 49 , m_internalFormat(GraphicsContext3D::RGBA4) -
trunk/Source/WebCore/html/canvas/WebGLRenderbuffer.h
r178411 r178674 38 38 virtual ~WebGLRenderbuffer(); 39 39 40 static PassRefPtr<WebGLRenderbuffer> create(WebGLRenderingContext *);40 static PassRefPtr<WebGLRenderbuffer> create(WebGLRenderingContextBase*); 41 41 42 42 void setInternalFormat(GC3Denum internalformat) … … 66 66 67 67 protected: 68 WebGLRenderbuffer(WebGLRenderingContext *);68 WebGLRenderbuffer(WebGLRenderingContextBase*); 69 69 70 70 virtual void deleteObjectImpl(GraphicsContext3D*, Platform3DObject) override; -
trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
r178604 r178674 1 1 /* 2 * Copyright (C) 20 09, 2013, 2014Apple Inc. All rights reserved.2 * Copyright (C) 2015 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 27 27 28 28 #if ENABLE(WEBGL) 29 30 #include "WebGLRenderingContext.h" 29 #include "WebGLRenderingContextBase.h" 31 30 32 31 #include "ANGLEInstancedArrays.h" … … 65 64 #include "RenderBox.h" 66 65 #include "Settings.h" 66 #include "WebGL2RenderingContext.h" 67 67 #include "WebGLActiveInfo.h" 68 68 #include "WebGLBuffer.h" … … 81 81 #include "WebGLProgram.h" 82 82 #include "WebGLRenderbuffer.h" 83 #include "WebGLRenderingContext.h" 83 84 #include "WebGLShader.h" 84 85 #include "WebGLShaderPrecisionFormat.h" … … 372 373 WTF_MAKE_FAST_ALLOCATED; 373 374 public: 374 explicit WebGLRenderingContextLostCallback(WebGLRenderingContext * cb) : m_context(cb) { }375 explicit WebGLRenderingContextLostCallback(WebGLRenderingContextBase* cb) : m_context(cb) { } 375 376 virtual void onContextLost() override { m_context->forceLostContext(WebGLRenderingContext::RealLostContext); } 376 377 virtual ~WebGLRenderingContextLostCallback() {} 377 378 private: 378 WebGLRenderingContext * m_context;379 WebGLRenderingContextBase* m_context; 379 380 }; 380 381 … … 382 383 WTF_MAKE_FAST_ALLOCATED; 383 384 public: 384 explicit WebGLRenderingContextErrorMessageCallback(WebGLRenderingContext * cb) : m_context(cb) { }385 explicit WebGLRenderingContextErrorMessageCallback(WebGLRenderingContextBase* cb) : m_context(cb) { } 385 386 virtual void onErrorMessage(const String& message, GC3Dint) override 386 387 { … … 390 391 virtual ~WebGLRenderingContextErrorMessageCallback() { } 391 392 private: 392 WebGLRenderingContext * m_context;393 WebGLRenderingContextBase* m_context; 393 394 }; 394 395 395 std::unique_ptr<WebGLRenderingContext > WebGLRenderingContext::create(HTMLCanvasElement* canvas, WebGLContextAttributes* attrs)396 std::unique_ptr<WebGLRenderingContextBase> WebGLRenderingContextBase::create(HTMLCanvasElement* canvas, WebGLContextAttributes* attrs, const String& type) 396 397 { 397 398 Document& document = canvas->document(); … … 443 444 if (isPendingPolicyResolution) { 444 445 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)); 448 451 } 449 452 … … 460 463 extensions->pushGroupMarkerEXT("WebGLRenderingContext"); 461 464 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)); 463 470 renderingContext->suspendIfNeeded(); 464 471 … … 466 473 } 467 474 468 WebGLRenderingContext ::WebGLRenderingContext(HTMLCanvasElement* passedCanvas, GraphicsContext3D::Attributes attributes)475 WebGLRenderingContextBase::WebGLRenderingContextBase(HTMLCanvasElement* passedCanvas, GraphicsContext3D::Attributes attributes) 469 476 : CanvasRenderingContext(passedCanvas) 470 477 , ActiveDOMObject(&passedCanvas->document()) 471 478 , m_context(0) 472 479 , m_drawingBuffer(0) 473 , m_dispatchContextLostEventTimer(*this, &WebGLRenderingContext ::dispatchContextLostEvent)480 , m_dispatchContextLostEventTimer(*this, &WebGLRenderingContextBase::dispatchContextLostEvent) 474 481 , m_restoreAllowed(false) 475 , m_restoreTimer(*this, &WebGLRenderingContext ::maybeRestoreContext)482 , m_restoreTimer(*this, &WebGLRenderingContextBase::maybeRestoreContext) 476 483 , m_generatedImageCache(0) 477 484 , m_contextLost(false) … … 485 492 } 486 493 487 WebGLRenderingContext::WebGLRenderingContext(HTMLCanvasElement* passedCanvas, PassRefPtr<GraphicsContext3D> context, 488 GraphicsContext3D::Attributes attributes) 494 WebGLRenderingContextBase::WebGLRenderingContextBase(HTMLCanvasElement* passedCanvas, PassRefPtr<GraphicsContext3D> context, GraphicsContext3D::Attributes attributes) 489 495 : CanvasRenderingContext(passedCanvas) 490 496 , ActiveDOMObject(&passedCanvas->document()) 491 497 , m_context(context) 492 498 , m_drawingBuffer(0) 493 , m_dispatchContextLostEventTimer(*this, &WebGLRenderingContext ::dispatchContextLostEvent)499 , m_dispatchContextLostEventTimer(*this, &WebGLRenderingContextBase::dispatchContextLostEvent) 494 500 , m_restoreAllowed(false) 495 , m_restoreTimer(*this, &WebGLRenderingContext ::maybeRestoreContext)501 , m_restoreTimer(*this, &WebGLRenderingContextBase::maybeRestoreContext) 496 502 , m_generatedImageCache(4) 497 503 , m_contextLost(false) … … 517 523 } 518 524 519 void WebGLRenderingContext ::initializeNewContext()525 void WebGLRenderingContextBase::initializeNewContext() 520 526 { 521 527 ASSERT(!m_contextLost); … … 598 604 } 599 605 600 void WebGLRenderingContext ::setupFlags()606 void WebGLRenderingContextBase::setupFlags() 601 607 { 602 608 ASSERT(m_context); … … 618 624 } 619 625 620 bool WebGLRenderingContext ::allowPrivilegedExtensions() const626 bool WebGLRenderingContextBase::allowPrivilegedExtensions() const 621 627 { 622 628 if (Page* page = canvas()->document().page()) … … 625 631 } 626 632 627 void WebGLRenderingContext ::addCompressedTextureFormat(GC3Denum format)633 void WebGLRenderingContextBase::addCompressedTextureFormat(GC3Denum format) 628 634 { 629 635 if (!m_compressedTextureFormats.contains(format)) … … 631 637 } 632 638 633 WebGLRenderingContext ::~WebGLRenderingContext()639 WebGLRenderingContextBase::~WebGLRenderingContextBase() 634 640 { 635 641 // Remove all references to WebGLObjects so if they are the last reference … … 658 664 } 659 665 660 void WebGLRenderingContext ::destroyGraphicsContext3D()666 void WebGLRenderingContextBase::destroyGraphicsContext3D() 661 667 { 662 668 if (m_isPendingPolicyResolution) … … 675 681 } 676 682 677 void WebGLRenderingContext ::markContextChanged()683 void WebGLRenderingContextBase::markContextChanged() 678 684 { 679 685 if (m_framebufferBinding) … … 699 705 } 700 706 701 bool WebGLRenderingContext ::clearIfComposited(GC3Dbitfield mask)707 bool WebGLRenderingContextBase::clearIfComposited(GC3Dbitfield mask) 702 708 { 703 709 if (isContextLostOrPending()) … … 753 759 } 754 760 755 void WebGLRenderingContext ::restoreStateAfterClear()761 void WebGLRenderingContextBase::restoreStateAfterClear() 756 762 { 757 763 // Restore the state that the context set. … … 768 774 } 769 775 770 void WebGLRenderingContext ::markLayerComposited()776 void WebGLRenderingContextBase::markLayerComposited() 771 777 { 772 778 if (isContextLostOrPending()) … … 775 781 } 776 782 777 void WebGLRenderingContext ::paintRenderingResultsToCanvas()783 void WebGLRenderingContextBase::paintRenderingResultsToCanvas() 778 784 { 779 785 if (isContextLostOrPending()) … … 811 817 } 812 818 813 PassRefPtr<ImageData> WebGLRenderingContext ::paintRenderingResultsToImageData()819 PassRefPtr<ImageData> WebGLRenderingContextBase::paintRenderingResultsToImageData() 814 820 { 815 821 if (isContextLostOrPending()) … … 830 836 } 831 837 832 void WebGLRenderingContext ::reshape(int width, int height)838 void WebGLRenderingContextBase::reshape(int width, int height) 833 839 { 834 840 if (isContextLostOrPending()) … … 867 873 } 868 874 869 int WebGLRenderingContext ::drawingBufferWidth() const875 int WebGLRenderingContextBase::drawingBufferWidth() const 870 876 { 871 877 if (m_drawingBuffer) … … 875 881 } 876 882 877 int WebGLRenderingContext ::drawingBufferHeight() const883 int WebGLRenderingContextBase::drawingBufferHeight() const 878 884 { 879 885 if (m_drawingBuffer) … … 883 889 } 884 890 885 unsigned int WebGLRenderingContext::sizeInBytes(GC3Denum type)891 unsigned WebGLRenderingContextBase::sizeInBytes(GC3Denum type) 886 892 { 887 893 switch (type) { … … 905 911 } 906 912 907 void WebGLRenderingContext ::activeTexture(GC3Denum texture, ExceptionCode& ec)913 void WebGLRenderingContextBase::activeTexture(GC3Denum texture, ExceptionCode& ec) 908 914 { 909 915 UNUSED_PARAM(ec); … … 921 927 } 922 928 923 void WebGLRenderingContext ::attachShader(WebGLProgram* program, WebGLShader* shader, ExceptionCode& ec)929 void WebGLRenderingContextBase::attachShader(WebGLProgram* program, WebGLShader* shader, ExceptionCode& ec) 924 930 { 925 931 UNUSED_PARAM(ec); … … 934 940 } 935 941 936 void WebGLRenderingContext ::bindAttribLocation(WebGLProgram* program, GC3Duint index, const String& name, ExceptionCode& ec)942 void WebGLRenderingContextBase::bindAttribLocation(WebGLProgram* program, GC3Duint index, const String& name, ExceptionCode& ec) 937 943 { 938 944 UNUSED_PARAM(ec); … … 954 960 } 955 961 956 bool WebGLRenderingContext ::checkObjectToBeBound(const char* functionName, WebGLObject* object, bool& deleted)962 bool WebGLRenderingContextBase::checkObjectToBeBound(const char* functionName, WebGLObject* object, bool& deleted) 957 963 { 958 964 deleted = false; … … 969 975 } 970 976 971 void WebGLRenderingContext ::bindBuffer(GC3Denum target, WebGLBuffer* buffer, ExceptionCode& ec)977 void WebGLRenderingContextBase::bindBuffer(GC3Denum target, WebGLBuffer* buffer, ExceptionCode& ec) 972 978 { 973 979 UNUSED_PARAM(ec); … … 995 1001 } 996 1002 997 void WebGLRenderingContext ::bindFramebuffer(GC3Denum target, WebGLFramebuffer* buffer, ExceptionCode& ec)1003 void WebGLRenderingContextBase::bindFramebuffer(GC3Denum target, WebGLFramebuffer* buffer, ExceptionCode& ec) 998 1004 { 999 1005 UNUSED_PARAM(ec); … … 1020 1026 } 1021 1027 1022 void WebGLRenderingContext ::bindRenderbuffer(GC3Denum target, WebGLRenderbuffer* renderBuffer, ExceptionCode& ec)1028 void WebGLRenderingContextBase::bindRenderbuffer(GC3Denum target, WebGLRenderbuffer* renderBuffer, ExceptionCode& ec) 1023 1029 { 1024 1030 UNUSED_PARAM(ec); … … 1038 1044 } 1039 1045 1040 void WebGLRenderingContext ::bindTexture(GC3Denum target, WebGLTexture* texture, ExceptionCode& ec)1046 void WebGLRenderingContextBase::bindTexture(GC3Denum target, WebGLTexture* texture, ExceptionCode& ec) 1041 1047 { 1042 1048 UNUSED_PARAM(ec); … … 1079 1085 } 1080 1086 1081 void WebGLRenderingContext ::blendColor(GC3Dfloat red, GC3Dfloat green, GC3Dfloat blue, GC3Dfloat alpha)1087 void WebGLRenderingContextBase::blendColor(GC3Dfloat red, GC3Dfloat green, GC3Dfloat blue, GC3Dfloat alpha) 1082 1088 { 1083 1089 if (isContextLostOrPending()) … … 1086 1092 } 1087 1093 1088 void WebGLRenderingContext ::blendEquation(GC3Denum mode)1094 void WebGLRenderingContextBase::blendEquation(GC3Denum mode) 1089 1095 { 1090 1096 if (isContextLostOrPending() || !validateBlendEquation("blendEquation", mode)) … … 1093 1099 } 1094 1100 1095 void WebGLRenderingContext ::blendEquationSeparate(GC3Denum modeRGB, GC3Denum modeAlpha)1101 void WebGLRenderingContextBase::blendEquationSeparate(GC3Denum modeRGB, GC3Denum modeAlpha) 1096 1102 { 1097 1103 if (isContextLostOrPending() || !validateBlendEquation("blendEquation", modeRGB) || !validateBlendEquation("blendEquation", modeAlpha)) … … 1101 1107 1102 1108 1103 void WebGLRenderingContext ::blendFunc(GC3Denum sfactor, GC3Denum dfactor)1109 void WebGLRenderingContextBase::blendFunc(GC3Denum sfactor, GC3Denum dfactor) 1104 1110 { 1105 1111 if (isContextLostOrPending() || !validateBlendFuncFactors("blendFunc", sfactor, dfactor)) … … 1108 1114 } 1109 1115 1110 void WebGLRenderingContext ::blendFuncSeparate(GC3Denum srcRGB, GC3Denum dstRGB, GC3Denum srcAlpha, GC3Denum dstAlpha)1116 void WebGLRenderingContextBase::blendFuncSeparate(GC3Denum srcRGB, GC3Denum dstRGB, GC3Denum srcAlpha, GC3Denum dstAlpha) 1111 1117 { 1112 1118 // Note: Alpha does not have the same restrictions as RGB. … … 1116 1122 } 1117 1123 1118 void WebGLRenderingContext ::bufferData(GC3Denum target, long long size, GC3Denum usage, ExceptionCode& ec)1124 void WebGLRenderingContextBase::bufferData(GC3Denum target, long long size, GC3Denum usage, ExceptionCode& ec) 1119 1125 { 1120 1126 UNUSED_PARAM(ec); … … 1147 1153 } 1148 1154 1149 void WebGLRenderingContext ::bufferData(GC3Denum target, ArrayBuffer* data, GC3Denum usage, ExceptionCode& ec)1155 void WebGLRenderingContextBase::bufferData(GC3Denum target, ArrayBuffer* data, GC3Denum usage, ExceptionCode& ec) 1150 1156 { 1151 1157 UNUSED_PARAM(ec); … … 1174 1180 } 1175 1181 1176 void WebGLRenderingContext ::bufferData(GC3Denum target, ArrayBufferView* data, GC3Denum usage, ExceptionCode& ec)1182 void WebGLRenderingContextBase::bufferData(GC3Denum target, ArrayBufferView* data, GC3Denum usage, ExceptionCode& ec) 1177 1183 { 1178 1184 UNUSED_PARAM(ec); … … 1201 1207 } 1202 1208 1203 void WebGLRenderingContext ::bufferSubData(GC3Denum target, long long offset, ArrayBuffer* data, ExceptionCode& ec)1209 void WebGLRenderingContextBase::bufferSubData(GC3Denum target, long long offset, ArrayBuffer* data, ExceptionCode& ec) 1204 1210 { 1205 1211 UNUSED_PARAM(ec); … … 1230 1236 } 1231 1237 1232 void WebGLRenderingContext ::bufferSubData(GC3Denum target, long long offset, ArrayBufferView* data, ExceptionCode& ec)1238 void WebGLRenderingContextBase::bufferSubData(GC3Denum target, long long offset, ArrayBufferView* data, ExceptionCode& ec) 1233 1239 { 1234 1240 UNUSED_PARAM(ec); … … 1259 1265 } 1260 1266 1261 GC3Denum WebGLRenderingContext ::checkFramebufferStatus(GC3Denum target)1267 GC3Denum WebGLRenderingContextBase::checkFramebufferStatus(GC3Denum target) 1262 1268 { 1263 1269 if (isContextLostOrPending()) … … 1279 1285 } 1280 1286 1281 void WebGLRenderingContext ::clear(GC3Dbitfield mask)1287 void WebGLRenderingContextBase::clear(GC3Dbitfield mask) 1282 1288 { 1283 1289 if (isContextLostOrPending()) … … 1297 1303 } 1298 1304 1299 void WebGLRenderingContext ::clearColor(GC3Dfloat r, GC3Dfloat g, GC3Dfloat b, GC3Dfloat a)1305 void WebGLRenderingContextBase::clearColor(GC3Dfloat r, GC3Dfloat g, GC3Dfloat b, GC3Dfloat a) 1300 1306 { 1301 1307 if (isContextLostOrPending()) … … 1316 1322 } 1317 1323 1318 void WebGLRenderingContext ::clearDepth(GC3Dfloat depth)1324 void WebGLRenderingContextBase::clearDepth(GC3Dfloat depth) 1319 1325 { 1320 1326 if (isContextLostOrPending()) … … 1324 1330 } 1325 1331 1326 void WebGLRenderingContext ::clearStencil(GC3Dint s)1332 void WebGLRenderingContextBase::clearStencil(GC3Dint s) 1327 1333 { 1328 1334 if (isContextLostOrPending()) … … 1332 1338 } 1333 1339 1334 void WebGLRenderingContext ::colorMask(GC3Dboolean red, GC3Dboolean green, GC3Dboolean blue, GC3Dboolean alpha)1340 void WebGLRenderingContextBase::colorMask(GC3Dboolean red, GC3Dboolean green, GC3Dboolean blue, GC3Dboolean alpha) 1335 1341 { 1336 1342 if (isContextLostOrPending()) … … 1343 1349 } 1344 1350 1345 void WebGLRenderingContext ::compileShader(WebGLShader* shader, ExceptionCode& ec)1351 void WebGLRenderingContextBase::compileShader(WebGLShader* shader, ExceptionCode& ec) 1346 1352 { 1347 1353 UNUSED_PARAM(ec); … … 1354 1360 } 1355 1361 1356 void WebGLRenderingContext ::compressedTexImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Dsizei width,1362 void WebGLRenderingContextBase::compressedTexImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Dsizei width, 1357 1363 GC3Dsizei height, GC3Dint border, ArrayBufferView* data) 1358 1364 { … … 1397 1403 } 1398 1404 1399 void WebGLRenderingContext ::compressedTexSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset,1405 void WebGLRenderingContextBase::compressedTexSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, 1400 1406 GC3Dsizei width, GC3Dsizei height, GC3Denum format, ArrayBufferView* data) 1401 1407 { … … 1428 1434 } 1429 1435 1430 bool WebGLRenderingContext ::validateSettableTexFormat(const char* functionName, GC3Denum format)1436 bool WebGLRenderingContextBase::validateSettableTexFormat(const char* functionName, GC3Denum format) 1431 1437 { 1432 1438 if (GraphicsContext3D::getClearBitsByFormat(format) & (GraphicsContext3D::DEPTH_BUFFER_BIT | GraphicsContext3D::STENCIL_BUFFER_BIT)) { … … 1437 1443 } 1438 1444 1439 void WebGLRenderingContext ::copyTexImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height, GC3Dint border)1445 void WebGLRenderingContextBase::copyTexImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height, GC3Dint border) 1440 1446 { 1441 1447 if (isContextLostOrPending()) … … 1483 1489 } 1484 1490 1485 void WebGLRenderingContext ::copyTexSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height)1491 void WebGLRenderingContextBase::copyTexSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height) 1486 1492 { 1487 1493 if (isContextLostOrPending()) … … 1553 1559 } 1554 1560 1555 PassRefPtr<WebGLBuffer> WebGLRenderingContext ::createBuffer()1561 PassRefPtr<WebGLBuffer> WebGLRenderingContextBase::createBuffer() 1556 1562 { 1557 1563 if (isContextLostOrPending()) … … 1562 1568 } 1563 1569 1564 PassRefPtr<WebGLFramebuffer> WebGLRenderingContext ::createFramebuffer()1570 PassRefPtr<WebGLFramebuffer> WebGLRenderingContextBase::createFramebuffer() 1565 1571 { 1566 1572 if (isContextLostOrPending()) … … 1571 1577 } 1572 1578 1573 PassRefPtr<WebGLTexture> WebGLRenderingContext ::createTexture()1579 PassRefPtr<WebGLTexture> WebGLRenderingContextBase::createTexture() 1574 1580 { 1575 1581 if (isContextLostOrPending()) … … 1580 1586 } 1581 1587 1582 PassRefPtr<WebGLProgram> WebGLRenderingContext ::createProgram()1588 PassRefPtr<WebGLProgram> WebGLRenderingContextBase::createProgram() 1583 1589 { 1584 1590 if (isContextLostOrPending()) … … 1589 1595 } 1590 1596 1591 PassRefPtr<WebGLRenderbuffer> WebGLRenderingContext ::createRenderbuffer()1597 PassRefPtr<WebGLRenderbuffer> WebGLRenderingContextBase::createRenderbuffer() 1592 1598 { 1593 1599 if (isContextLostOrPending()) … … 1598 1604 } 1599 1605 1600 PassRefPtr<WebGLShader> WebGLRenderingContext ::createShader(GC3Denum type, ExceptionCode& ec)1606 PassRefPtr<WebGLShader> WebGLRenderingContextBase::createShader(GC3Denum type, ExceptionCode& ec) 1601 1607 { 1602 1608 UNUSED_PARAM(ec); … … 1613 1619 } 1614 1620 1615 void WebGLRenderingContext ::cullFace(GC3Denum mode)1621 void WebGLRenderingContextBase::cullFace(GC3Denum mode) 1616 1622 { 1617 1623 if (isContextLostOrPending()) … … 1620 1626 } 1621 1627 1622 bool WebGLRenderingContext ::deleteObject(WebGLObject* object)1628 bool WebGLRenderingContextBase::deleteObject(WebGLObject* object) 1623 1629 { 1624 1630 if (isContextLostOrPending() || !object) … … 1635 1641 } 1636 1642 1637 void WebGLRenderingContext ::deleteBuffer(WebGLBuffer* buffer)1643 void WebGLRenderingContextBase::deleteBuffer(WebGLBuffer* buffer) 1638 1644 { 1639 1645 if (!deleteObject(buffer)) … … 1645 1651 } 1646 1652 1647 void WebGLRenderingContext ::deleteFramebuffer(WebGLFramebuffer* framebuffer)1653 void WebGLRenderingContextBase::deleteFramebuffer(WebGLFramebuffer* framebuffer) 1648 1654 { 1649 1655 if (!deleteObject(framebuffer)) … … 1660 1666 } 1661 1667 1662 void WebGLRenderingContext ::deleteProgram(WebGLProgram* program)1668 void WebGLRenderingContextBase::deleteProgram(WebGLProgram* program) 1663 1669 { 1664 1670 deleteObject(program); … … 1667 1673 } 1668 1674 1669 void WebGLRenderingContext ::deleteRenderbuffer(WebGLRenderbuffer* renderbuffer)1675 void WebGLRenderingContextBase::deleteRenderbuffer(WebGLRenderbuffer* renderbuffer) 1670 1676 { 1671 1677 if (!deleteObject(renderbuffer)) … … 1677 1683 } 1678 1684 1679 void WebGLRenderingContext ::deleteShader(WebGLShader* shader)1685 void WebGLRenderingContextBase::deleteShader(WebGLShader* shader) 1680 1686 { 1681 1687 deleteObject(shader); 1682 1688 } 1683 1689 1684 void WebGLRenderingContext ::deleteTexture(WebGLTexture* texture)1690 void WebGLRenderingContextBase::deleteTexture(WebGLTexture* texture) 1685 1691 { 1686 1692 if (!deleteObject(texture)) … … 1696 1702 } 1697 1703 1698 void WebGLRenderingContext ::depthFunc(GC3Denum func)1704 void WebGLRenderingContextBase::depthFunc(GC3Denum func) 1699 1705 { 1700 1706 if (isContextLostOrPending()) … … 1703 1709 } 1704 1710 1705 void WebGLRenderingContext ::depthMask(GC3Dboolean flag)1711 void WebGLRenderingContextBase::depthMask(GC3Dboolean flag) 1706 1712 { 1707 1713 if (isContextLostOrPending()) … … 1711 1717 } 1712 1718 1713 void WebGLRenderingContext ::depthRange(GC3Dfloat zNear, GC3Dfloat zFar)1719 void WebGLRenderingContextBase::depthRange(GC3Dfloat zNear, GC3Dfloat zFar) 1714 1720 { 1715 1721 if (isContextLostOrPending()) … … 1722 1728 } 1723 1729 1724 void WebGLRenderingContext ::detachShader(WebGLProgram* program, WebGLShader* shader, ExceptionCode& ec)1730 void WebGLRenderingContextBase::detachShader(WebGLProgram* program, WebGLShader* shader, ExceptionCode& ec) 1725 1731 { 1726 1732 UNUSED_PARAM(ec); … … 1735 1741 } 1736 1742 1737 void WebGLRenderingContext ::disable(GC3Denum cap)1743 void WebGLRenderingContextBase::disable(GC3Denum cap) 1738 1744 { 1739 1745 if (isContextLostOrPending() || !validateCapability("disable", cap)) … … 1752 1758 } 1753 1759 1754 void WebGLRenderingContext ::disableVertexAttribArray(GC3Duint index, ExceptionCode& ec)1760 void WebGLRenderingContextBase::disableVertexAttribArray(GC3Duint index, ExceptionCode& ec) 1755 1761 { 1756 1762 UNUSED_PARAM(ec); … … 1769 1775 } 1770 1776 1771 bool WebGLRenderingContext ::validateElementArraySize(GC3Dsizei count, GC3Denum type, GC3Dintptr offset)1777 bool WebGLRenderingContextBase::validateElementArraySize(GC3Dsizei count, GC3Denum type, GC3Dintptr offset) 1772 1778 { 1773 1779 RefPtr<WebGLBuffer> elementArrayBuffer = m_boundVertexArrayObject->getElementArrayBuffer(); … … 1809 1815 } 1810 1816 1811 bool WebGLRenderingContext ::validateIndexArrayConservative(GC3Denum type, unsigned& numElementsRequired)1817 bool WebGLRenderingContextBase::validateIndexArrayConservative(GC3Denum type, unsigned& numElementsRequired) 1812 1818 { 1813 1819 // Performs conservative validation by caching a maximum index of … … 1871 1877 } 1872 1878 1873 bool WebGLRenderingContext ::validateIndexArrayPrecise(GC3Dsizei count, GC3Denum type, GC3Dintptr offset, unsigned& numElementsRequired)1879 bool WebGLRenderingContextBase::validateIndexArrayPrecise(GC3Dsizei count, GC3Denum type, GC3Dintptr offset, unsigned& numElementsRequired) 1874 1880 { 1875 1881 ASSERT(count >= 0 && offset >= 0); … … 1924 1930 } 1925 1931 1926 bool WebGLRenderingContext ::validateVertexAttributes(unsigned elementCount, unsigned primitiveCount)1932 bool WebGLRenderingContextBase::validateVertexAttributes(unsigned elementCount, unsigned primitiveCount) 1927 1933 { 1928 1934 if (!m_currentProgram) … … 1977 1983 } 1978 1984 1979 bool WebGLRenderingContext ::validateWebGLObject(const char* functionName, WebGLObject* object)1985 bool WebGLRenderingContextBase::validateWebGLObject(const char* functionName, WebGLObject* object) 1980 1986 { 1981 1987 if (!object || !object->object()) { … … 1990 1996 } 1991 1997 1992 bool WebGLRenderingContext ::validateDrawArrays(const char* functionName, GC3Denum mode, GC3Dint first, GC3Dsizei count, GC3Dsizei primitiveCount)1998 bool WebGLRenderingContextBase::validateDrawArrays(const char* functionName, GC3Denum mode, GC3Dint first, GC3Dsizei count, GC3Dsizei primitiveCount) 1993 1999 { 1994 2000 if (isContextLostOrPending() || !validateDrawMode(functionName, mode)) … … 2039 2045 } 2040 2046 2041 void WebGLRenderingContext ::drawArrays(GC3Denum mode, GC3Dint first, GC3Dsizei count, ExceptionCode& ec)2047 void WebGLRenderingContextBase::drawArrays(GC3Denum mode, GC3Dint first, GC3Dsizei count, ExceptionCode& ec) 2042 2048 { 2043 2049 UNUSED_PARAM(ec); … … 2063 2069 } 2064 2070 2065 bool WebGLRenderingContext ::validateDrawElements(const char* functionName, GC3Denum mode, GC3Dsizei count, GC3Denum type, long long offset, unsigned& numElements, GC3Dsizei primitiveCount)2071 bool WebGLRenderingContextBase::validateDrawElements(const char* functionName, GC3Denum mode, GC3Dsizei count, GC3Denum type, long long offset, unsigned& numElements, GC3Dsizei primitiveCount) 2066 2072 { 2067 2073 if (isContextLostOrPending() || !validateDrawMode(functionName, mode)) … … 2143 2149 } 2144 2150 2145 void WebGLRenderingContext ::drawElements(GC3Denum mode, GC3Dsizei count, GC3Denum type, long long offset, ExceptionCode& ec)2151 void WebGLRenderingContextBase::drawElements(GC3Denum mode, GC3Dsizei count, GC3Denum type, long long offset, ExceptionCode& ec) 2146 2152 { 2147 2153 UNUSED_PARAM(ec); … … 2171 2177 } 2172 2178 2173 void WebGLRenderingContext ::enable(GC3Denum cap)2179 void WebGLRenderingContextBase::enable(GC3Denum cap) 2174 2180 { 2175 2181 if (isContextLostOrPending() || !validateCapability("enable", cap)) … … 2188 2194 } 2189 2195 2190 void WebGLRenderingContext ::enableVertexAttribArray(GC3Duint index, ExceptionCode& ec)2196 void WebGLRenderingContextBase::enableVertexAttribArray(GC3Duint index, ExceptionCode& ec) 2191 2197 { 2192 2198 UNUSED_PARAM(ec); … … 2204 2210 } 2205 2211 2206 void WebGLRenderingContext ::finish()2212 void WebGLRenderingContextBase::finish() 2207 2213 { 2208 2214 if (isContextLostOrPending()) … … 2211 2217 } 2212 2218 2213 void WebGLRenderingContext ::flush()2219 void WebGLRenderingContextBase::flush() 2214 2220 { 2215 2221 if (isContextLostOrPending()) … … 2218 2224 } 2219 2225 2220 void WebGLRenderingContext ::framebufferRenderbuffer(GC3Denum target, GC3Denum attachment, GC3Denum renderbuffertarget, WebGLRenderbuffer* buffer, ExceptionCode& ec)2226 void WebGLRenderingContextBase::framebufferRenderbuffer(GC3Denum target, GC3Denum attachment, GC3Denum renderbuffertarget, WebGLRenderbuffer* buffer, ExceptionCode& ec) 2221 2227 { 2222 2228 UNUSED_PARAM(ec); … … 2251 2257 } 2252 2258 2253 void WebGLRenderingContext ::framebufferTexture2D(GC3Denum target, GC3Denum attachment, GC3Denum textarget, WebGLTexture* texture, GC3Dint level, ExceptionCode& ec)2259 void WebGLRenderingContextBase::framebufferTexture2D(GC3Denum target, GC3Denum attachment, GC3Denum textarget, WebGLTexture* texture, GC3Dint level, ExceptionCode& ec) 2254 2260 { 2255 2261 UNUSED_PARAM(ec); … … 2290 2296 } 2291 2297 2292 void WebGLRenderingContext ::frontFace(GC3Denum mode)2298 void WebGLRenderingContextBase::frontFace(GC3Denum mode) 2293 2299 { 2294 2300 if (isContextLostOrPending()) … … 2297 2303 } 2298 2304 2299 void WebGLRenderingContext ::generateMipmap(GC3Denum target)2305 void WebGLRenderingContextBase::generateMipmap(GC3Denum target) 2300 2306 { 2301 2307 if (isContextLostOrPending()) … … 2333 2339 } 2334 2340 2335 PassRefPtr<WebGLActiveInfo> WebGLRenderingContext ::getActiveAttrib(WebGLProgram* program, GC3Duint index, ExceptionCode& ec)2341 PassRefPtr<WebGLActiveInfo> WebGLRenderingContextBase::getActiveAttrib(WebGLProgram* program, GC3Duint index, ExceptionCode& ec) 2336 2342 { 2337 2343 UNUSED_PARAM(ec); … … 2347 2353 } 2348 2354 2349 PassRefPtr<WebGLActiveInfo> WebGLRenderingContext ::getActiveUniform(WebGLProgram* program, GC3Duint index, ExceptionCode& ec)2355 PassRefPtr<WebGLActiveInfo> WebGLRenderingContextBase::getActiveUniform(WebGLProgram* program, GC3Duint index, ExceptionCode& ec) 2350 2356 { 2351 2357 UNUSED_PARAM(ec); … … 2364 2370 } 2365 2371 2366 bool WebGLRenderingContext ::getAttachedShaders(WebGLProgram* program, Vector<RefPtr<WebGLShader>>& shaderObjects, ExceptionCode& ec)2372 bool WebGLRenderingContextBase::getAttachedShaders(WebGLProgram* program, Vector<RefPtr<WebGLShader>>& shaderObjects, ExceptionCode& ec) 2367 2373 { 2368 2374 UNUSED_PARAM(ec); … … 2383 2389 } 2384 2390 2385 GC3Dint WebGLRenderingContext ::getAttribLocation(WebGLProgram* program, const String& name)2391 GC3Dint WebGLRenderingContextBase::getAttribLocation(WebGLProgram* program, const String& name) 2386 2392 { 2387 2393 if (isContextLostOrPending() || !validateWebGLObject("getAttribLocation", program)) … … 2400 2406 } 2401 2407 2402 WebGLGetInfo WebGLRenderingContext ::getBufferParameter(GC3Denum target, GC3Denum pname, ExceptionCode& ec)2408 WebGLGetInfo WebGLRenderingContextBase::getBufferParameter(GC3Denum target, GC3Denum pname, ExceptionCode& ec) 2403 2409 { 2404 2410 UNUSED_PARAM(ec); … … 2422 2428 } 2423 2429 2424 PassRefPtr<WebGLContextAttributes> WebGLRenderingContext ::getContextAttributes()2430 PassRefPtr<WebGLContextAttributes> WebGLRenderingContextBase::getContextAttributes() 2425 2431 { 2426 2432 if (isContextLostOrPending()) … … 2445 2451 } 2446 2452 2447 GC3Denum WebGLRenderingContext ::getError()2453 GC3Denum WebGLRenderingContextBase::getError() 2448 2454 { 2449 2455 if (m_isPendingPolicyResolution) … … 2452 2458 } 2453 2459 2454 WebGLExtension* WebGLRenderingContext ::getExtension(const String& name)2460 WebGLExtension* WebGLRenderingContextBase::getExtension(const String& name) 2455 2461 { 2456 2462 if (isContextLostOrPending()) … … 2615 2621 } 2616 2622 2617 WebGLGetInfo WebGLRenderingContext ::getFramebufferAttachmentParameter(GC3Denum target, GC3Denum attachment, GC3Denum pname, ExceptionCode& ec)2623 WebGLGetInfo WebGLRenderingContextBase::getFramebufferAttachmentParameter(GC3Denum target, GC3Denum attachment, GC3Denum pname, ExceptionCode& ec) 2618 2624 { 2619 2625 UNUSED_PARAM(ec); … … 2675 2681 } 2676 2682 2677 WebGLGetInfo WebGLRenderingContext ::getParameter(GC3Denum pname, ExceptionCode& ec)2683 WebGLGetInfo WebGLRenderingContextBase::getParameter(GC3Denum pname, ExceptionCode& ec) 2678 2684 { 2679 2685 UNUSED_PARAM(ec); … … 2913 2919 } 2914 2920 2915 WebGLGetInfo WebGLRenderingContext ::getProgramParameter(WebGLProgram* program, GC3Denum pname, ExceptionCode& ec)2921 WebGLGetInfo WebGLRenderingContextBase::getProgramParameter(WebGLProgram* program, GC3Denum pname, ExceptionCode& ec) 2916 2922 { 2917 2923 UNUSED_PARAM(ec); … … 2941 2947 } 2942 2948 2943 String WebGLRenderingContext ::getProgramInfoLog(WebGLProgram* program, ExceptionCode& ec)2949 String WebGLRenderingContextBase::getProgramInfoLog(WebGLProgram* program, ExceptionCode& ec) 2944 2950 { 2945 2951 UNUSED_PARAM(ec); … … 2951 2957 } 2952 2958 2953 WebGLGetInfo WebGLRenderingContext ::getRenderbufferParameter(GC3Denum target, GC3Denum pname, ExceptionCode& ec)2959 WebGLGetInfo WebGLRenderingContextBase::getRenderbufferParameter(GC3Denum target, GC3Denum pname, ExceptionCode& ec) 2954 2960 { 2955 2961 UNUSED_PARAM(ec); … … 3017 3023 } 3018 3024 3019 WebGLGetInfo WebGLRenderingContext ::getShaderParameter(WebGLShader* shader, GC3Denum pname, ExceptionCode& ec)3025 WebGLGetInfo WebGLRenderingContextBase::getShaderParameter(WebGLShader* shader, GC3Denum pname, ExceptionCode& ec) 3020 3026 { 3021 3027 UNUSED_PARAM(ec); … … 3038 3044 } 3039 3045 3040 String WebGLRenderingContext ::getShaderInfoLog(WebGLShader* shader, ExceptionCode& ec)3046 String WebGLRenderingContextBase::getShaderInfoLog(WebGLShader* shader, ExceptionCode& ec) 3041 3047 { 3042 3048 UNUSED_PARAM(ec); … … 3048 3054 } 3049 3055 3050 PassRefPtr<WebGLShaderPrecisionFormat> WebGLRenderingContext ::getShaderPrecisionFormat(GC3Denum shaderType, GC3Denum precisionType, ExceptionCode& ec)3056 PassRefPtr<WebGLShaderPrecisionFormat> WebGLRenderingContextBase::getShaderPrecisionFormat(GC3Denum shaderType, GC3Denum precisionType, ExceptionCode& ec) 3051 3057 { 3052 3058 UNUSED_PARAM(ec); … … 3080 3086 } 3081 3087 3082 String WebGLRenderingContext ::getShaderSource(WebGLShader* shader, ExceptionCode& ec)3088 String WebGLRenderingContextBase::getShaderSource(WebGLShader* shader, ExceptionCode& ec) 3083 3089 { 3084 3090 UNUSED_PARAM(ec); … … 3090 3096 } 3091 3097 3092 Vector<String> WebGLRenderingContext ::getSupportedExtensions()3098 Vector<String> WebGLRenderingContextBase::getSupportedExtensions() 3093 3099 { 3094 3100 Vector<String> result; … … 3144 3150 } 3145 3151 3146 WebGLGetInfo WebGLRenderingContext ::getTexParameter(GC3Denum target, GC3Denum pname, ExceptionCode& ec)3152 WebGLGetInfo WebGLRenderingContextBase::getTexParameter(GC3Denum target, GC3Denum pname, ExceptionCode& ec) 3147 3153 { 3148 3154 UNUSED_PARAM(ec); … … 3173 3179 } 3174 3180 3175 WebGLGetInfo WebGLRenderingContext ::getUniform(WebGLProgram* program, const WebGLUniformLocation* uniformLocation, ExceptionCode& ec)3181 WebGLGetInfo WebGLRenderingContextBase::getUniform(WebGLProgram* program, const WebGLUniformLocation* uniformLocation, ExceptionCode& ec) 3176 3182 { 3177 3183 UNUSED_PARAM(ec); … … 3301 3307 } 3302 3308 3303 PassRefPtr<WebGLUniformLocation> WebGLRenderingContext ::getUniformLocation(WebGLProgram* program, const String& name, ExceptionCode& ec)3309 PassRefPtr<WebGLUniformLocation> WebGLRenderingContextBase::getUniformLocation(WebGLProgram* program, const String& name, ExceptionCode& ec) 3304 3310 { 3305 3311 UNUSED_PARAM(ec); … … 3340 3346 } 3341 3347 3342 WebGLGetInfo WebGLRenderingContext ::getVertexAttrib(GC3Duint index, GC3Denum pname, ExceptionCode& ec)3348 WebGLGetInfo WebGLRenderingContextBase::getVertexAttrib(GC3Duint index, GC3Denum pname, ExceptionCode& ec) 3343 3349 { 3344 3350 UNUSED_PARAM(ec); … … 3382 3388 } 3383 3389 3384 long long WebGLRenderingContext ::getVertexAttribOffset(GC3Duint index, GC3Denum pname)3390 long long WebGLRenderingContextBase::getVertexAttribOffset(GC3Duint index, GC3Denum pname) 3385 3391 { 3386 3392 if (isContextLostOrPending()) … … 3390 3396 } 3391 3397 3392 void WebGLRenderingContext ::hint(GC3Denum target, GC3Denum mode)3398 void WebGLRenderingContextBase::hint(GC3Denum target, GC3Denum mode) 3393 3399 { 3394 3400 if (isContextLostOrPending()) … … 3411 3417 } 3412 3418 3413 GC3Dboolean WebGLRenderingContext ::isBuffer(WebGLBuffer* buffer)3419 GC3Dboolean WebGLRenderingContextBase::isBuffer(WebGLBuffer* buffer) 3414 3420 { 3415 3421 if (!buffer || isContextLostOrPending()) … … 3422 3428 } 3423 3429 3424 bool WebGLRenderingContext ::isContextLost() const3430 bool WebGLRenderingContextBase::isContextLost() const 3425 3431 { 3426 3432 return m_contextLost; 3427 3433 } 3428 3434 3429 bool WebGLRenderingContext ::isContextLostOrPending()3435 bool WebGLRenderingContextBase::isContextLostOrPending() 3430 3436 { 3431 3437 if (m_isPendingPolicyResolution && !m_hasRequestedPolicyResolution) { … … 3445 3451 } 3446 3452 3447 GC3Dboolean WebGLRenderingContext ::isEnabled(GC3Denum cap)3453 GC3Dboolean WebGLRenderingContextBase::isEnabled(GC3Denum cap) 3448 3454 { 3449 3455 if (isContextLostOrPending() || !validateCapability("isEnabled", cap)) … … 3454 3460 } 3455 3461 3456 GC3Dboolean WebGLRenderingContext ::isFramebuffer(WebGLFramebuffer* framebuffer)3462 GC3Dboolean WebGLRenderingContextBase::isFramebuffer(WebGLFramebuffer* framebuffer) 3457 3463 { 3458 3464 if (!framebuffer || isContextLostOrPending()) … … 3465 3471 } 3466 3472 3467 GC3Dboolean WebGLRenderingContext ::isProgram(WebGLProgram* program)3473 GC3Dboolean WebGLRenderingContextBase::isProgram(WebGLProgram* program) 3468 3474 { 3469 3475 if (!program || isContextLostOrPending()) … … 3473 3479 } 3474 3480 3475 GC3Dboolean WebGLRenderingContext ::isRenderbuffer(WebGLRenderbuffer* renderbuffer)3481 GC3Dboolean WebGLRenderingContextBase::isRenderbuffer(WebGLRenderbuffer* renderbuffer) 3476 3482 { 3477 3483 if (!renderbuffer || isContextLostOrPending()) … … 3484 3490 } 3485 3491 3486 GC3Dboolean WebGLRenderingContext ::isShader(WebGLShader* shader)3492 GC3Dboolean WebGLRenderingContextBase::isShader(WebGLShader* shader) 3487 3493 { 3488 3494 if (!shader || isContextLostOrPending()) … … 3492 3498 } 3493 3499 3494 GC3Dboolean WebGLRenderingContext ::isTexture(WebGLTexture* texture)3500 GC3Dboolean WebGLRenderingContextBase::isTexture(WebGLTexture* texture) 3495 3501 { 3496 3502 if (!texture || isContextLostOrPending()) … … 3503 3509 } 3504 3510 3505 void WebGLRenderingContext ::lineWidth(GC3Dfloat width)3511 void WebGLRenderingContextBase::lineWidth(GC3Dfloat width) 3506 3512 { 3507 3513 if (isContextLostOrPending()) … … 3510 3516 } 3511 3517 3512 void WebGLRenderingContext ::linkProgram(WebGLProgram* program, ExceptionCode& ec)3518 void WebGLRenderingContextBase::linkProgram(WebGLProgram* program, ExceptionCode& ec) 3513 3519 { 3514 3520 UNUSED_PARAM(ec); … … 3528 3534 } 3529 3535 3530 void WebGLRenderingContext ::pixelStorei(GC3Denum pname, GC3Dint param)3536 void WebGLRenderingContextBase::pixelStorei(GC3Denum pname, GC3Dint param) 3531 3537 { 3532 3538 if (isContextLostOrPending()) … … 3566 3572 } 3567 3573 3568 void WebGLRenderingContext ::polygonOffset(GC3Dfloat factor, GC3Dfloat units)3574 void WebGLRenderingContextBase::polygonOffset(GC3Dfloat factor, GC3Dfloat units) 3569 3575 { 3570 3576 if (isContextLostOrPending()) … … 3573 3579 } 3574 3580 3575 void WebGLRenderingContext ::readPixels(GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height, GC3Denum format, GC3Denum type, ArrayBufferView* pixels, ExceptionCode&)3581 void WebGLRenderingContextBase::readPixels(GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height, GC3Denum format, GC3Denum type, ArrayBufferView* pixels, ExceptionCode&) 3576 3582 { 3577 3583 if (isContextLostOrPending()) … … 3663 3669 } 3664 3670 3665 void WebGLRenderingContext ::releaseShaderCompiler()3671 void WebGLRenderingContextBase::releaseShaderCompiler() 3666 3672 { 3667 3673 if (isContextLostOrPending()) … … 3670 3676 } 3671 3677 3672 void WebGLRenderingContext ::renderbufferStorage(GC3Denum target, GC3Denum internalformat, GC3Dsizei width, GC3Dsizei height)3678 void WebGLRenderingContextBase::renderbufferStorage(GC3Denum target, GC3Denum internalformat, GC3Dsizei width, GC3Dsizei height) 3673 3679 { 3674 3680 if (isContextLostOrPending()) … … 3715 3721 } 3716 3722 3717 void WebGLRenderingContext ::sampleCoverage(GC3Dfloat value, GC3Dboolean invert)3723 void WebGLRenderingContextBase::sampleCoverage(GC3Dfloat value, GC3Dboolean invert) 3718 3724 { 3719 3725 if (isContextLostOrPending()) … … 3722 3728 } 3723 3729 3724 void WebGLRenderingContext ::scissor(GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height)3730 void WebGLRenderingContextBase::scissor(GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height) 3725 3731 { 3726 3732 if (isContextLostOrPending()) … … 3731 3737 } 3732 3738 3733 void WebGLRenderingContext ::shaderSource(WebGLShader* shader, const String& string, ExceptionCode& ec)3739 void WebGLRenderingContextBase::shaderSource(WebGLShader* shader, const String& string, ExceptionCode& ec) 3734 3740 { 3735 3741 UNUSED_PARAM(ec); … … 3743 3749 } 3744 3750 3745 void WebGLRenderingContext ::stencilFunc(GC3Denum func, GC3Dint ref, GC3Duint mask)3751 void WebGLRenderingContextBase::stencilFunc(GC3Denum func, GC3Dint ref, GC3Duint mask) 3746 3752 { 3747 3753 if (isContextLostOrPending()) … … 3756 3762 } 3757 3763 3758 void WebGLRenderingContext ::stencilFuncSeparate(GC3Denum face, GC3Denum func, GC3Dint ref, GC3Duint mask)3764 void WebGLRenderingContextBase::stencilFuncSeparate(GC3Denum face, GC3Denum func, GC3Dint ref, GC3Duint mask) 3759 3765 { 3760 3766 if (isContextLostOrPending()) … … 3784 3790 } 3785 3791 3786 void WebGLRenderingContext ::stencilMask(GC3Duint mask)3792 void WebGLRenderingContextBase::stencilMask(GC3Duint mask) 3787 3793 { 3788 3794 if (isContextLostOrPending()) … … 3793 3799 } 3794 3800 3795 void WebGLRenderingContext ::stencilMaskSeparate(GC3Denum face, GC3Duint mask)3801 void WebGLRenderingContextBase::stencilMaskSeparate(GC3Denum face, GC3Duint mask) 3796 3802 { 3797 3803 if (isContextLostOrPending()) … … 3815 3821 } 3816 3822 3817 void WebGLRenderingContext ::stencilOp(GC3Denum fail, GC3Denum zfail, GC3Denum zpass)3823 void WebGLRenderingContextBase::stencilOp(GC3Denum fail, GC3Denum zfail, GC3Denum zpass) 3818 3824 { 3819 3825 if (isContextLostOrPending()) … … 3822 3828 } 3823 3829 3824 void WebGLRenderingContext ::stencilOpSeparate(GC3Denum face, GC3Denum fail, GC3Denum zfail, GC3Denum zpass)3830 void WebGLRenderingContextBase::stencilOpSeparate(GC3Denum face, GC3Denum fail, GC3Denum zfail, GC3Denum zpass) 3825 3831 { 3826 3832 if (isContextLostOrPending()) … … 3829 3835 } 3830 3836 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)3837 void WebGLRenderingContextBase::texImage2DBase(GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Dsizei width, GC3Dsizei height, GC3Dint border, GC3Denum format, GC3Denum type, const void* pixels, ExceptionCode& ec) 3832 3838 { 3833 3839 // FIXME: For now we ignore any errors returned. … … 3864 3870 } 3865 3871 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)3872 void WebGLRenderingContextBase::texImage2DImpl(GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Denum format, GC3Denum type, Image* image, GraphicsContext3D::ImageHtmlDomSource domSource, bool flipY, bool premultiplyAlpha, ExceptionCode& ec) 3867 3873 { 3868 3874 ec = 0; … … 3894 3900 } 3895 3901 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)3902 bool 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) 3897 3903 { 3898 3904 if (!validateTexFuncParameters(functionName, functionType, target, level, internalformat, width, height, border, format, type)) … … 3937 3943 } 3938 3944 3939 void WebGLRenderingContext ::texImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat,3945 void WebGLRenderingContextBase::texImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat, 3940 3946 GC3Dsizei width, GC3Dsizei height, GC3Dint border, 3941 3947 GC3Denum format, GC3Denum type, ArrayBufferView* pixels, ExceptionCode& ec) … … 3965 3971 } 3966 3972 3967 void WebGLRenderingContext ::texImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat,3973 void WebGLRenderingContextBase::texImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat, 3968 3974 GC3Denum format, GC3Denum type, ImageData* pixels, ExceptionCode& ec) 3969 3975 { … … 3990 3996 } 3991 3997 3992 PassRefPtr<Image> WebGLRenderingContext ::drawImageIntoBuffer(Image* image, int width, int height, int deviceScaleFactor)3998 PassRefPtr<Image> WebGLRenderingContextBase::drawImageIntoBuffer(Image* image, int width, int height, int deviceScaleFactor) 3993 3999 { 3994 4000 IntSize size(width, height); … … 4006 4012 } 4007 4013 4008 void WebGLRenderingContext ::texImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat,4014 void WebGLRenderingContextBase::texImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat, 4009 4015 GC3Denum format, GC3Denum type, HTMLImageElement* image, ExceptionCode& ec) 4010 4016 { … … 4023 4029 } 4024 4030 4025 void WebGLRenderingContext ::texImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat,4031 void WebGLRenderingContextBase::texImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat, 4026 4032 GC3Denum format, GC3Denum type, HTMLCanvasElement* canvas, ExceptionCode& ec) 4027 4033 { … … 4053 4059 4054 4060 #if ENABLE(VIDEO) 4055 PassRefPtr<Image> WebGLRenderingContext ::videoFrameToImage(HTMLVideoElement* video, BackingStoreCopy backingStoreCopy, ExceptionCode&)4061 PassRefPtr<Image> WebGLRenderingContextBase::videoFrameToImage(HTMLVideoElement* video, BackingStoreCopy backingStoreCopy, ExceptionCode&) 4056 4062 { 4057 4063 IntSize size(video->videoWidth(), video->videoHeight()); … … 4067 4073 } 4068 4074 4069 void WebGLRenderingContext ::texImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat,4075 void WebGLRenderingContextBase::texImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat, 4070 4076 GC3Denum format, GC3Denum type, HTMLVideoElement* video, ExceptionCode& ec) 4071 4077 { … … 4099 4105 #endif 4100 4106 4101 void WebGLRenderingContext ::texParameter(GC3Denum target, GC3Denum pname, GC3Dfloat paramf, GC3Dint parami, bool isFloat)4107 void WebGLRenderingContextBase::texParameter(GC3Denum target, GC3Denum pname, GC3Dfloat paramf, GC3Dint parami, bool isFloat) 4102 4108 { 4103 4109 if (isContextLostOrPending()) … … 4137 4143 } 4138 4144 4139 void WebGLRenderingContext ::texParameterf(GC3Denum target, GC3Denum pname, GC3Dfloat param)4145 void WebGLRenderingContextBase::texParameterf(GC3Denum target, GC3Denum pname, GC3Dfloat param) 4140 4146 { 4141 4147 texParameter(target, pname, param, 0, true); 4142 4148 } 4143 4149 4144 void WebGLRenderingContext ::texParameteri(GC3Denum target, GC3Denum pname, GC3Dint param)4150 void WebGLRenderingContextBase::texParameteri(GC3Denum target, GC3Denum pname, GC3Dint param) 4145 4151 { 4146 4152 texParameter(target, pname, 0, param, false); 4147 4153 } 4148 4154 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)4155 void WebGLRenderingContextBase::texSubImage2DBase(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, GC3Dsizei width, GC3Dsizei height, GC3Denum format, GC3Denum type, const void* pixels, ExceptionCode& ec) 4150 4156 { 4151 4157 // FIXME: For now we ignore any errors returned … … 4169 4175 } 4170 4176 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)4177 void 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) 4172 4178 { 4173 4179 ec = 0; … … 4199 4205 } 4200 4206 4201 void WebGLRenderingContext ::texSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset,4207 void WebGLRenderingContextBase::texSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, 4202 4208 GC3Dsizei width, GC3Dsizei height, 4203 4209 GC3Denum format, GC3Denum type, ArrayBufferView* pixels, ExceptionCode& ec) … … 4226 4232 } 4227 4233 4228 void WebGLRenderingContext ::texSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset,4234 void WebGLRenderingContextBase::texSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, 4229 4235 GC3Denum format, GC3Denum type, ImageData* pixels, ExceptionCode& ec) 4230 4236 { … … 4252 4258 } 4253 4259 4254 void WebGLRenderingContext ::texSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset,4260 void WebGLRenderingContextBase::texSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, 4255 4261 GC3Denum format, GC3Denum type, HTMLImageElement* image, ExceptionCode& ec) 4256 4262 { … … 4269 4275 } 4270 4276 4271 void WebGLRenderingContext ::texSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset,4277 void WebGLRenderingContextBase::texSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, 4272 4278 GC3Denum format, GC3Denum type, HTMLCanvasElement* canvas, ExceptionCode& ec) 4273 4279 { … … 4285 4291 4286 4292 #if ENABLE(VIDEO) 4287 void WebGLRenderingContext ::texSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset,4293 void WebGLRenderingContextBase::texSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, 4288 4294 GC3Denum format, GC3Denum type, HTMLVideoElement* video, ExceptionCode& ec) 4289 4295 { … … 4300 4306 #endif 4301 4307 4302 void WebGLRenderingContext ::uniform1f(const WebGLUniformLocation* location, GC3Dfloat x, ExceptionCode& ec)4308 void WebGLRenderingContextBase::uniform1f(const WebGLUniformLocation* location, GC3Dfloat x, ExceptionCode& ec) 4303 4309 { 4304 4310 UNUSED_PARAM(ec); … … 4314 4320 } 4315 4321 4316 void WebGLRenderingContext ::uniform1fv(const WebGLUniformLocation* location, Float32Array* v, ExceptionCode& ec)4322 void WebGLRenderingContextBase::uniform1fv(const WebGLUniformLocation* location, Float32Array* v, ExceptionCode& ec) 4317 4323 { 4318 4324 UNUSED_PARAM(ec); … … 4323 4329 } 4324 4330 4325 void WebGLRenderingContext ::uniform1fv(const WebGLUniformLocation* location, GC3Dfloat* v, GC3Dsizei size, ExceptionCode& ec)4331 void WebGLRenderingContextBase::uniform1fv(const WebGLUniformLocation* location, GC3Dfloat* v, GC3Dsizei size, ExceptionCode& ec) 4326 4332 { 4327 4333 UNUSED_PARAM(ec); … … 4332 4338 } 4333 4339 4334 void WebGLRenderingContext ::uniform1i(const WebGLUniformLocation* location, GC3Dint x, ExceptionCode& ec)4340 void WebGLRenderingContextBase::uniform1i(const WebGLUniformLocation* location, GC3Dint x, ExceptionCode& ec) 4335 4341 { 4336 4342 UNUSED_PARAM(ec); … … 4351 4357 } 4352 4358 4353 void WebGLRenderingContext ::uniform1iv(const WebGLUniformLocation* location, Int32Array* v, ExceptionCode& ec)4359 void WebGLRenderingContextBase::uniform1iv(const WebGLUniformLocation* location, Int32Array* v, ExceptionCode& ec) 4354 4360 { 4355 4361 UNUSED_PARAM(ec); … … 4369 4375 } 4370 4376 4371 void WebGLRenderingContext ::uniform1iv(const WebGLUniformLocation* location, GC3Dint* v, GC3Dsizei size, ExceptionCode& ec)4377 void WebGLRenderingContextBase::uniform1iv(const WebGLUniformLocation* location, GC3Dint* v, GC3Dsizei size, ExceptionCode& ec) 4372 4378 { 4373 4379 UNUSED_PARAM(ec); … … 4386 4392 } 4387 4393 4388 void WebGLRenderingContext ::uniform2f(const WebGLUniformLocation* location, GC3Dfloat x, GC3Dfloat y, ExceptionCode& ec)4394 void WebGLRenderingContextBase::uniform2f(const WebGLUniformLocation* location, GC3Dfloat x, GC3Dfloat y, ExceptionCode& ec) 4389 4395 { 4390 4396 UNUSED_PARAM(ec); … … 4400 4406 } 4401 4407 4402 void WebGLRenderingContext ::uniform2fv(const WebGLUniformLocation* location, Float32Array* v, ExceptionCode& ec)4408 void WebGLRenderingContextBase::uniform2fv(const WebGLUniformLocation* location, Float32Array* v, ExceptionCode& ec) 4403 4409 { 4404 4410 UNUSED_PARAM(ec); … … 4409 4415 } 4410 4416 4411 void WebGLRenderingContext ::uniform2fv(const WebGLUniformLocation* location, GC3Dfloat* v, GC3Dsizei size, ExceptionCode& ec)4417 void WebGLRenderingContextBase::uniform2fv(const WebGLUniformLocation* location, GC3Dfloat* v, GC3Dsizei size, ExceptionCode& ec) 4412 4418 { 4413 4419 UNUSED_PARAM(ec); … … 4418 4424 } 4419 4425 4420 void WebGLRenderingContext ::uniform2i(const WebGLUniformLocation* location, GC3Dint x, GC3Dint y, ExceptionCode& ec)4426 void WebGLRenderingContextBase::uniform2i(const WebGLUniformLocation* location, GC3Dint x, GC3Dint y, ExceptionCode& ec) 4421 4427 { 4422 4428 UNUSED_PARAM(ec); … … 4432 4438 } 4433 4439 4434 void WebGLRenderingContext ::uniform2iv(const WebGLUniformLocation* location, Int32Array* v, ExceptionCode& ec)4440 void WebGLRenderingContextBase::uniform2iv(const WebGLUniformLocation* location, Int32Array* v, ExceptionCode& ec) 4435 4441 { 4436 4442 UNUSED_PARAM(ec); … … 4441 4447 } 4442 4448 4443 void WebGLRenderingContext ::uniform2iv(const WebGLUniformLocation* location, GC3Dint* v, GC3Dsizei size, ExceptionCode& ec)4449 void WebGLRenderingContextBase::uniform2iv(const WebGLUniformLocation* location, GC3Dint* v, GC3Dsizei size, ExceptionCode& ec) 4444 4450 { 4445 4451 UNUSED_PARAM(ec); … … 4450 4456 } 4451 4457 4452 void WebGLRenderingContext ::uniform3f(const WebGLUniformLocation* location, GC3Dfloat x, GC3Dfloat y, GC3Dfloat z, ExceptionCode& ec)4458 void WebGLRenderingContextBase::uniform3f(const WebGLUniformLocation* location, GC3Dfloat x, GC3Dfloat y, GC3Dfloat z, ExceptionCode& ec) 4453 4459 { 4454 4460 UNUSED_PARAM(ec); … … 4464 4470 } 4465 4471 4466 void WebGLRenderingContext ::uniform3fv(const WebGLUniformLocation* location, Float32Array* v, ExceptionCode& ec)4472 void WebGLRenderingContextBase::uniform3fv(const WebGLUniformLocation* location, Float32Array* v, ExceptionCode& ec) 4467 4473 { 4468 4474 UNUSED_PARAM(ec); … … 4473 4479 } 4474 4480 4475 void WebGLRenderingContext ::uniform3fv(const WebGLUniformLocation* location, GC3Dfloat* v, GC3Dsizei size, ExceptionCode& ec)4481 void WebGLRenderingContextBase::uniform3fv(const WebGLUniformLocation* location, GC3Dfloat* v, GC3Dsizei size, ExceptionCode& ec) 4476 4482 { 4477 4483 UNUSED_PARAM(ec); … … 4482 4488 } 4483 4489 4484 void WebGLRenderingContext ::uniform3i(const WebGLUniformLocation* location, GC3Dint x, GC3Dint y, GC3Dint z, ExceptionCode& ec)4490 void WebGLRenderingContextBase::uniform3i(const WebGLUniformLocation* location, GC3Dint x, GC3Dint y, GC3Dint z, ExceptionCode& ec) 4485 4491 { 4486 4492 UNUSED_PARAM(ec); … … 4496 4502 } 4497 4503 4498 void WebGLRenderingContext ::uniform3iv(const WebGLUniformLocation* location, Int32Array* v, ExceptionCode& ec)4504 void WebGLRenderingContextBase::uniform3iv(const WebGLUniformLocation* location, Int32Array* v, ExceptionCode& ec) 4499 4505 { 4500 4506 UNUSED_PARAM(ec); … … 4505 4511 } 4506 4512 4507 void WebGLRenderingContext ::uniform3iv(const WebGLUniformLocation* location, GC3Dint* v, GC3Dsizei size, ExceptionCode& ec)4513 void WebGLRenderingContextBase::uniform3iv(const WebGLUniformLocation* location, GC3Dint* v, GC3Dsizei size, ExceptionCode& ec) 4508 4514 { 4509 4515 UNUSED_PARAM(ec); … … 4514 4520 } 4515 4521 4516 void WebGLRenderingContext ::uniform4f(const WebGLUniformLocation* location, GC3Dfloat x, GC3Dfloat y, GC3Dfloat z, GC3Dfloat w, ExceptionCode& ec)4522 void WebGLRenderingContextBase::uniform4f(const WebGLUniformLocation* location, GC3Dfloat x, GC3Dfloat y, GC3Dfloat z, GC3Dfloat w, ExceptionCode& ec) 4517 4523 { 4518 4524 UNUSED_PARAM(ec); … … 4528 4534 } 4529 4535 4530 void WebGLRenderingContext ::uniform4fv(const WebGLUniformLocation* location, Float32Array* v, ExceptionCode& ec)4536 void WebGLRenderingContextBase::uniform4fv(const WebGLUniformLocation* location, Float32Array* v, ExceptionCode& ec) 4531 4537 { 4532 4538 UNUSED_PARAM(ec); … … 4537 4543 } 4538 4544 4539 void WebGLRenderingContext ::uniform4fv(const WebGLUniformLocation* location, GC3Dfloat* v, GC3Dsizei size, ExceptionCode& ec)4545 void WebGLRenderingContextBase::uniform4fv(const WebGLUniformLocation* location, GC3Dfloat* v, GC3Dsizei size, ExceptionCode& ec) 4540 4546 { 4541 4547 UNUSED_PARAM(ec); … … 4546 4552 } 4547 4553 4548 void WebGLRenderingContext ::uniform4i(const WebGLUniformLocation* location, GC3Dint x, GC3Dint y, GC3Dint z, GC3Dint w, ExceptionCode& ec)4554 void WebGLRenderingContextBase::uniform4i(const WebGLUniformLocation* location, GC3Dint x, GC3Dint y, GC3Dint z, GC3Dint w, ExceptionCode& ec) 4549 4555 { 4550 4556 UNUSED_PARAM(ec); … … 4560 4566 } 4561 4567 4562 void WebGLRenderingContext ::uniform4iv(const WebGLUniformLocation* location, Int32Array* v, ExceptionCode& ec)4568 void WebGLRenderingContextBase::uniform4iv(const WebGLUniformLocation* location, Int32Array* v, ExceptionCode& ec) 4563 4569 { 4564 4570 UNUSED_PARAM(ec); … … 4569 4575 } 4570 4576 4571 void WebGLRenderingContext ::uniform4iv(const WebGLUniformLocation* location, GC3Dint* v, GC3Dsizei size, ExceptionCode& ec)4577 void WebGLRenderingContextBase::uniform4iv(const WebGLUniformLocation* location, GC3Dint* v, GC3Dsizei size, ExceptionCode& ec) 4572 4578 { 4573 4579 UNUSED_PARAM(ec); … … 4578 4584 } 4579 4585 4580 void WebGLRenderingContext ::uniformMatrix2fv(const WebGLUniformLocation* location, GC3Dboolean transpose, Float32Array* v, ExceptionCode& ec)4586 void WebGLRenderingContextBase::uniformMatrix2fv(const WebGLUniformLocation* location, GC3Dboolean transpose, Float32Array* v, ExceptionCode& ec) 4581 4587 { 4582 4588 UNUSED_PARAM(ec); … … 4586 4592 } 4587 4593 4588 void WebGLRenderingContext ::uniformMatrix2fv(const WebGLUniformLocation* location, GC3Dboolean transpose, GC3Dfloat* v, GC3Dsizei size, ExceptionCode& ec)4594 void WebGLRenderingContextBase::uniformMatrix2fv(const WebGLUniformLocation* location, GC3Dboolean transpose, GC3Dfloat* v, GC3Dsizei size, ExceptionCode& ec) 4589 4595 { 4590 4596 UNUSED_PARAM(ec); … … 4594 4600 } 4595 4601 4596 void WebGLRenderingContext ::uniformMatrix3fv(const WebGLUniformLocation* location, GC3Dboolean transpose, Float32Array* v, ExceptionCode& ec)4602 void WebGLRenderingContextBase::uniformMatrix3fv(const WebGLUniformLocation* location, GC3Dboolean transpose, Float32Array* v, ExceptionCode& ec) 4597 4603 { 4598 4604 UNUSED_PARAM(ec); … … 4602 4608 } 4603 4609 4604 void WebGLRenderingContext ::uniformMatrix3fv(const WebGLUniformLocation* location, GC3Dboolean transpose, GC3Dfloat* v, GC3Dsizei size, ExceptionCode& ec)4610 void WebGLRenderingContextBase::uniformMatrix3fv(const WebGLUniformLocation* location, GC3Dboolean transpose, GC3Dfloat* v, GC3Dsizei size, ExceptionCode& ec) 4605 4611 { 4606 4612 UNUSED_PARAM(ec); … … 4610 4616 } 4611 4617 4612 void WebGLRenderingContext ::uniformMatrix4fv(const WebGLUniformLocation* location, GC3Dboolean transpose, Float32Array* v, ExceptionCode& ec)4618 void WebGLRenderingContextBase::uniformMatrix4fv(const WebGLUniformLocation* location, GC3Dboolean transpose, Float32Array* v, ExceptionCode& ec) 4613 4619 { 4614 4620 UNUSED_PARAM(ec); … … 4618 4624 } 4619 4625 4620 void WebGLRenderingContext ::uniformMatrix4fv(const WebGLUniformLocation* location, GC3Dboolean transpose, GC3Dfloat* v, GC3Dsizei size, ExceptionCode& ec)4626 void WebGLRenderingContextBase::uniformMatrix4fv(const WebGLUniformLocation* location, GC3Dboolean transpose, GC3Dfloat* v, GC3Dsizei size, ExceptionCode& ec) 4621 4627 { 4622 4628 UNUSED_PARAM(ec); … … 4626 4632 } 4627 4633 4628 void WebGLRenderingContext ::useProgram(WebGLProgram* program, ExceptionCode& ec)4634 void WebGLRenderingContextBase::useProgram(WebGLProgram* program, ExceptionCode& ec) 4629 4635 { 4630 4636 UNUSED_PARAM(ec); … … 4648 4654 } 4649 4655 4650 void WebGLRenderingContext ::validateProgram(WebGLProgram* program, ExceptionCode& ec)4656 void WebGLRenderingContextBase::validateProgram(WebGLProgram* program, ExceptionCode& ec) 4651 4657 { 4652 4658 UNUSED_PARAM(ec); … … 4656 4662 } 4657 4663 4658 void WebGLRenderingContext ::vertexAttrib1f(GC3Duint index, GC3Dfloat v0)4664 void WebGLRenderingContextBase::vertexAttrib1f(GC3Duint index, GC3Dfloat v0) 4659 4665 { 4660 4666 vertexAttribfImpl("vertexAttrib1f", index, 1, v0, 0.0f, 0.0f, 1.0f); 4661 4667 } 4662 4668 4663 void WebGLRenderingContext ::vertexAttrib1fv(GC3Duint index, Float32Array* v)4669 void WebGLRenderingContextBase::vertexAttrib1fv(GC3Duint index, Float32Array* v) 4664 4670 { 4665 4671 vertexAttribfvImpl("vertexAttrib1fv", index, v, 1); 4666 4672 } 4667 4673 4668 void WebGLRenderingContext ::vertexAttrib1fv(GC3Duint index, GC3Dfloat* v, GC3Dsizei size)4674 void WebGLRenderingContextBase::vertexAttrib1fv(GC3Duint index, GC3Dfloat* v, GC3Dsizei size) 4669 4675 { 4670 4676 vertexAttribfvImpl("vertexAttrib1fv", index, v, size, 1); 4671 4677 } 4672 4678 4673 void WebGLRenderingContext ::vertexAttrib2f(GC3Duint index, GC3Dfloat v0, GC3Dfloat v1)4679 void WebGLRenderingContextBase::vertexAttrib2f(GC3Duint index, GC3Dfloat v0, GC3Dfloat v1) 4674 4680 { 4675 4681 vertexAttribfImpl("vertexAttrib2f", index, 2, v0, v1, 0.0f, 1.0f); 4676 4682 } 4677 4683 4678 void WebGLRenderingContext ::vertexAttrib2fv(GC3Duint index, Float32Array* v)4684 void WebGLRenderingContextBase::vertexAttrib2fv(GC3Duint index, Float32Array* v) 4679 4685 { 4680 4686 vertexAttribfvImpl("vertexAttrib2fv", index, v, 2); 4681 4687 } 4682 4688 4683 void WebGLRenderingContext ::vertexAttrib2fv(GC3Duint index, GC3Dfloat* v, GC3Dsizei size)4689 void WebGLRenderingContextBase::vertexAttrib2fv(GC3Duint index, GC3Dfloat* v, GC3Dsizei size) 4684 4690 { 4685 4691 vertexAttribfvImpl("vertexAttrib2fv", index, v, size, 2); 4686 4692 } 4687 4693 4688 void WebGLRenderingContext ::vertexAttrib3f(GC3Duint index, GC3Dfloat v0, GC3Dfloat v1, GC3Dfloat v2)4694 void WebGLRenderingContextBase::vertexAttrib3f(GC3Duint index, GC3Dfloat v0, GC3Dfloat v1, GC3Dfloat v2) 4689 4695 { 4690 4696 vertexAttribfImpl("vertexAttrib3f", index, 3, v0, v1, v2, 1.0f); 4691 4697 } 4692 4698 4693 void WebGLRenderingContext ::vertexAttrib3fv(GC3Duint index, Float32Array* v)4699 void WebGLRenderingContextBase::vertexAttrib3fv(GC3Duint index, Float32Array* v) 4694 4700 { 4695 4701 vertexAttribfvImpl("vertexAttrib3fv", index, v, 3); 4696 4702 } 4697 4703 4698 void WebGLRenderingContext ::vertexAttrib3fv(GC3Duint index, GC3Dfloat* v, GC3Dsizei size)4704 void WebGLRenderingContextBase::vertexAttrib3fv(GC3Duint index, GC3Dfloat* v, GC3Dsizei size) 4699 4705 { 4700 4706 vertexAttribfvImpl("vertexAttrib3fv", index, v, size, 3); 4701 4707 } 4702 4708 4703 void WebGLRenderingContext ::vertexAttrib4f(GC3Duint index, GC3Dfloat v0, GC3Dfloat v1, GC3Dfloat v2, GC3Dfloat v3)4709 void WebGLRenderingContextBase::vertexAttrib4f(GC3Duint index, GC3Dfloat v0, GC3Dfloat v1, GC3Dfloat v2, GC3Dfloat v3) 4704 4710 { 4705 4711 vertexAttribfImpl("vertexAttrib4f", index, 4, v0, v1, v2, v3); 4706 4712 } 4707 4713 4708 void WebGLRenderingContext ::vertexAttrib4fv(GC3Duint index, Float32Array* v)4714 void WebGLRenderingContextBase::vertexAttrib4fv(GC3Duint index, Float32Array* v) 4709 4715 { 4710 4716 vertexAttribfvImpl("vertexAttrib4fv", index, v, 4); 4711 4717 } 4712 4718 4713 void WebGLRenderingContext ::vertexAttrib4fv(GC3Duint index, GC3Dfloat* v, GC3Dsizei size)4719 void WebGLRenderingContextBase::vertexAttrib4fv(GC3Duint index, GC3Dfloat* v, GC3Dsizei size) 4714 4720 { 4715 4721 vertexAttribfvImpl("vertexAttrib4fv", index, v, size, 4); 4716 4722 } 4717 4723 4718 void WebGLRenderingContext ::vertexAttribPointer(GC3Duint index, GC3Dint size, GC3Denum type, GC3Dboolean normalized, GC3Dsizei stride, long long offset, ExceptionCode& ec)4724 void WebGLRenderingContextBase::vertexAttribPointer(GC3Duint index, GC3Dint size, GC3Denum type, GC3Dboolean normalized, GC3Dsizei stride, long long offset, ExceptionCode& ec) 4719 4725 { 4720 4726 UNUSED_PARAM(ec); … … 4760 4766 } 4761 4767 4762 void WebGLRenderingContext ::viewport(GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height)4768 void WebGLRenderingContextBase::viewport(GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height) 4763 4769 { 4764 4770 if (isContextLostOrPending()) … … 4769 4775 } 4770 4776 4771 void WebGLRenderingContext ::forceLostContext(WebGLRenderingContext::LostContextMode mode)4777 void WebGLRenderingContextBase::forceLostContext(WebGLRenderingContextBase::LostContextMode mode) 4772 4778 { 4773 4779 if (isContextLostOrPending()) { … … 4779 4785 } 4780 4786 4781 void WebGLRenderingContext ::loseContextImpl(WebGLRenderingContext::LostContextMode mode)4787 void WebGLRenderingContextBase::loseContextImpl(WebGLRenderingContextBase::LostContextMode mode) 4782 4788 { 4783 4789 if (isContextLost()) … … 4822 4828 } 4823 4829 4824 void WebGLRenderingContext ::forceRestoreContext()4830 void WebGLRenderingContextBase::forceRestoreContext() 4825 4831 { 4826 4832 if (!isContextLostOrPending()) { … … 4839 4845 } 4840 4846 4841 PlatformLayer* WebGLRenderingContext ::platformLayer() const4847 PlatformLayer* WebGLRenderingContextBase::platformLayer() const 4842 4848 { 4843 4849 return (!isContextLost() && !m_isPendingPolicyResolution) ? m_context->platformLayer() : 0; 4844 4850 } 4845 4851 4846 void WebGLRenderingContext ::removeSharedObject(WebGLSharedObject* object)4852 void WebGLRenderingContextBase::removeSharedObject(WebGLSharedObject* object) 4847 4853 { 4848 4854 if (m_isPendingPolicyResolution) … … 4852 4858 } 4853 4859 4854 void WebGLRenderingContext ::addSharedObject(WebGLSharedObject* object)4860 void WebGLRenderingContextBase::addSharedObject(WebGLSharedObject* object) 4855 4861 { 4856 4862 if (m_isPendingPolicyResolution) … … 4861 4867 } 4862 4868 4863 void WebGLRenderingContext ::removeContextObject(WebGLContextObject* object)4869 void WebGLRenderingContextBase::removeContextObject(WebGLContextObject* object) 4864 4870 { 4865 4871 if (m_isPendingPolicyResolution) … … 4869 4875 } 4870 4876 4871 void WebGLRenderingContext ::addContextObject(WebGLContextObject* object)4877 void WebGLRenderingContextBase::addContextObject(WebGLContextObject* object) 4872 4878 { 4873 4879 if (m_isPendingPolicyResolution) … … 4878 4884 } 4879 4885 4880 void WebGLRenderingContext ::detachAndRemoveAllObjects()4886 void WebGLRenderingContextBase::detachAndRemoveAllObjects() 4881 4887 { 4882 4888 if (m_isPendingPolicyResolution) … … 4889 4895 } 4890 4896 4891 bool WebGLRenderingContext ::hasPendingActivity() const4897 bool WebGLRenderingContextBase::hasPendingActivity() const 4892 4898 { 4893 4899 return false; 4894 4900 } 4895 4901 4896 void WebGLRenderingContext ::stop()4902 void WebGLRenderingContextBase::stop() 4897 4903 { 4898 4904 if (!isContextLost() && !m_isPendingPolicyResolution) { … … 4902 4908 } 4903 4909 4904 WebGLGetInfo WebGLRenderingContext ::getBooleanParameter(GC3Denum pname)4910 WebGLGetInfo WebGLRenderingContextBase::getBooleanParameter(GC3Denum pname) 4905 4911 { 4906 4912 GC3Dboolean value = 0; … … 4909 4915 } 4910 4916 4911 WebGLGetInfo WebGLRenderingContext ::getBooleanArrayParameter(GC3Denum pname)4917 WebGLGetInfo WebGLRenderingContextBase::getBooleanArrayParameter(GC3Denum pname) 4912 4918 { 4913 4919 if (pname != GraphicsContext3D::COLOR_WRITEMASK) { … … 4923 4929 } 4924 4930 4925 WebGLGetInfo WebGLRenderingContext ::getFloatParameter(GC3Denum pname)4931 WebGLGetInfo WebGLRenderingContextBase::getFloatParameter(GC3Denum pname) 4926 4932 { 4927 4933 GC3Dfloat value = 0; … … 4930 4936 } 4931 4937 4932 WebGLGetInfo WebGLRenderingContext ::getIntParameter(GC3Denum pname)4938 WebGLGetInfo WebGLRenderingContextBase::getIntParameter(GC3Denum pname) 4933 4939 { 4934 4940 GC3Dint value = 0; … … 4937 4943 } 4938 4944 4939 WebGLGetInfo WebGLRenderingContext ::getUnsignedIntParameter(GC3Denum pname)4945 WebGLGetInfo WebGLRenderingContextBase::getUnsignedIntParameter(GC3Denum pname) 4940 4946 { 4941 4947 GC3Dint value = 0; … … 4944 4950 } 4945 4951 4946 WebGLGetInfo WebGLRenderingContext ::getWebGLFloatArrayParameter(GC3Denum pname)4952 WebGLGetInfo WebGLRenderingContextBase::getWebGLFloatArrayParameter(GC3Denum pname) 4947 4953 { 4948 4954 GC3Dfloat value[4] = {0}; … … 4965 4971 } 4966 4972 4967 WebGLGetInfo WebGLRenderingContext ::getWebGLIntArrayParameter(GC3Denum pname)4973 WebGLGetInfo WebGLRenderingContextBase::getWebGLIntArrayParameter(GC3Denum pname) 4968 4974 { 4969 4975 GC3Dint value[4] = {0}; … … 4984 4990 } 4985 4991 4986 void WebGLRenderingContext ::checkTextureCompleteness(const char* functionName, bool prepareToDraw)4992 void WebGLRenderingContextBase::checkTextureCompleteness(const char* functionName, bool prepareToDraw) 4987 4993 { 4988 4994 bool resetActiveUnit = false; … … 5022 5028 } 5023 5029 5024 void WebGLRenderingContext ::createFallbackBlackTextures1x1()5030 void WebGLRenderingContextBase::createFallbackBlackTextures1x1() 5025 5031 { 5026 5032 unsigned char black[] = {0, 0, 0, 255}; … … 5047 5053 } 5048 5054 5049 bool WebGLRenderingContext ::isTexInternalFormatColorBufferCombinationValid(GC3Denum texInternalFormat,5055 bool WebGLRenderingContextBase::isTexInternalFormatColorBufferCombinationValid(GC3Denum texInternalFormat, 5050 5056 GC3Denum colorBufferFormat) 5051 5057 { … … 5055 5061 } 5056 5062 5057 GC3Denum WebGLRenderingContext ::getBoundFramebufferColorFormat()5063 GC3Denum WebGLRenderingContextBase::getBoundFramebufferColorFormat() 5058 5064 { 5059 5065 if (m_framebufferBinding && m_framebufferBinding->object()) … … 5064 5070 } 5065 5071 5066 int WebGLRenderingContext ::getBoundFramebufferWidth()5072 int WebGLRenderingContextBase::getBoundFramebufferWidth() 5067 5073 { 5068 5074 if (m_framebufferBinding && m_framebufferBinding->object()) … … 5071 5077 } 5072 5078 5073 int WebGLRenderingContext ::getBoundFramebufferHeight()5079 int WebGLRenderingContextBase::getBoundFramebufferHeight() 5074 5080 { 5075 5081 if (m_framebufferBinding && m_framebufferBinding->object()) … … 5078 5084 } 5079 5085 5080 WebGLTexture* WebGLRenderingContext ::validateTextureBinding(const char* functionName, GC3Denum target, bool useSixEnumsForCubeMap)5086 WebGLTexture* WebGLRenderingContextBase::validateTextureBinding(const char* functionName, GC3Denum target, bool useSixEnumsForCubeMap) 5081 5087 { 5082 5088 WebGLTexture* texture = nullptr; … … 5113 5119 } 5114 5120 5115 bool WebGLRenderingContext ::validateLocationLength(const char* functionName, const String& string)5121 bool WebGLRenderingContextBase::validateLocationLength(const char* functionName, const String& string) 5116 5122 { 5117 5123 const unsigned maxWebGLLocationLength = 256; … … 5123 5129 } 5124 5130 5125 bool WebGLRenderingContext ::validateSize(const char* functionName, GC3Dint x, GC3Dint y)5131 bool WebGLRenderingContextBase::validateSize(const char* functionName, GC3Dint x, GC3Dint y) 5126 5132 { 5127 5133 if (x < 0 || y < 0) { … … 5132 5138 } 5133 5139 5134 bool WebGLRenderingContext ::validateString(const char* functionName, const String& string)5140 bool WebGLRenderingContextBase::validateString(const char* functionName, const String& string) 5135 5141 { 5136 5142 for (size_t i = 0; i < string.length(); ++i) { … … 5143 5149 } 5144 5150 5145 bool WebGLRenderingContext ::validateTexFuncFormatAndType(const char* functionName, GC3Denum format, GC3Denum type, GC3Dint level)5151 bool WebGLRenderingContextBase::validateTexFuncFormatAndType(const char* functionName, GC3Denum format, GC3Denum type, GC3Dint level) 5146 5152 { 5147 5153 switch (format) { … … 5265 5271 } 5266 5272 5267 bool WebGLRenderingContext ::validateTexFuncLevel(const char* functionName, GC3Denum target, GC3Dint level)5273 bool WebGLRenderingContextBase::validateTexFuncLevel(const char* functionName, GC3Denum target, GC3Dint level) 5268 5274 { 5269 5275 if (level < 0) { … … 5295 5301 } 5296 5302 5297 bool WebGLRenderingContext ::validateTexFuncParameters(const char* functionName,5303 bool WebGLRenderingContextBase::validateTexFuncParameters(const char* functionName, 5298 5304 TexFuncValidationFunctionType functionType, 5299 5305 GC3Denum target, GC3Dint level, … … 5356 5362 } 5357 5363 5358 bool WebGLRenderingContext ::validateTexFuncData(const char* functionName, GC3Dint level,5364 bool WebGLRenderingContextBase::validateTexFuncData(const char* functionName, GC3Dint level, 5359 5365 GC3Dsizei width, GC3Dsizei height, 5360 5366 GC3Denum format, GC3Denum type, … … 5427 5433 } 5428 5434 5429 bool WebGLRenderingContext ::validateCompressedTexFormat(GC3Denum format)5435 bool WebGLRenderingContextBase::validateCompressedTexFormat(GC3Denum format) 5430 5436 { 5431 5437 return m_compressedTextureFormats.contains(format); 5432 5438 } 5433 5439 5434 bool WebGLRenderingContext ::validateCompressedTexFuncData(const char* functionName,5440 bool WebGLRenderingContextBase::validateCompressedTexFuncData(const char* functionName, 5435 5441 GC3Dsizei width, GC3Dsizei height, 5436 5442 GC3Denum format, ArrayBufferView* pixels) … … 5504 5510 } 5505 5511 5506 bool WebGLRenderingContext ::validateCompressedTexDimensions(const char* functionName, GC3Denum target, GC3Dint level, GC3Dsizei width, GC3Dsizei height, GC3Denum format)5512 bool WebGLRenderingContextBase::validateCompressedTexDimensions(const char* functionName, GC3Denum target, GC3Dint level, GC3Dsizei width, GC3Dsizei height, GC3Denum format) 5507 5513 { 5508 5514 switch (format) { … … 5538 5544 } 5539 5545 5540 bool WebGLRenderingContext ::validateCompressedTexSubDimensions(const char* functionName, GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset,5546 bool WebGLRenderingContextBase::validateCompressedTexSubDimensions(const char* functionName, GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, 5541 5547 GC3Dsizei width, GC3Dsizei height, GC3Denum format, WebGLTexture* tex) 5542 5548 { … … 5584 5590 } 5585 5591 5586 bool WebGLRenderingContext ::validateDrawMode(const char* functionName, GC3Denum mode)5592 bool WebGLRenderingContextBase::validateDrawMode(const char* functionName, GC3Denum mode) 5587 5593 { 5588 5594 switch (mode) { … … 5601 5607 } 5602 5608 5603 bool WebGLRenderingContext ::validateStencilSettings(const char* functionName)5609 bool WebGLRenderingContextBase::validateStencilSettings(const char* functionName) 5604 5610 { 5605 5611 if (m_stencilMask != m_stencilMaskBack || m_stencilFuncRef != m_stencilFuncRefBack || m_stencilFuncMask != m_stencilFuncMaskBack) { … … 5610 5616 } 5611 5617 5612 bool WebGLRenderingContext ::validateStencilFunc(const char* functionName, GC3Denum func)5618 bool WebGLRenderingContextBase::validateStencilFunc(const char* functionName, GC3Denum func) 5613 5619 { 5614 5620 switch (func) { … … 5628 5634 } 5629 5635 5630 void WebGLRenderingContext ::printGLErrorToConsole(const String& message)5636 void WebGLRenderingContextBase::printGLErrorToConsole(const String& message) 5631 5637 { 5632 5638 if (!m_numGLErrorsToConsoleAllowed) … … 5640 5646 } 5641 5647 5642 void WebGLRenderingContext ::printWarningToConsole(const String& message)5648 void WebGLRenderingContextBase::printWarningToConsole(const String& message) 5643 5649 { 5644 5650 if (!canvas()) … … 5647 5653 } 5648 5654 5649 bool WebGLRenderingContext ::validateFramebufferFuncParameters(const char* functionName, GC3Denum target, GC3Denum attachment)5655 bool WebGLRenderingContextBase::validateFramebufferFuncParameters(const char* functionName, GC3Denum target, GC3Denum attachment) 5650 5656 { 5651 5657 if (target != GraphicsContext3D::FRAMEBUFFER) { … … 5670 5676 } 5671 5677 5672 bool WebGLRenderingContext ::validateBlendEquation(const char* functionName, GC3Denum mode)5678 bool WebGLRenderingContextBase::validateBlendEquation(const char* functionName, GC3Denum mode) 5673 5679 { 5674 5680 switch (mode) { … … 5690 5696 } 5691 5697 5692 bool WebGLRenderingContext ::validateBlendFuncFactors(const char* functionName, GC3Denum src, GC3Denum dst)5698 bool WebGLRenderingContextBase::validateBlendFuncFactors(const char* functionName, GC3Denum src, GC3Denum dst) 5693 5699 { 5694 5700 if (((src == GraphicsContext3D::CONSTANT_COLOR || src == GraphicsContext3D::ONE_MINUS_CONSTANT_COLOR) … … 5702 5708 } 5703 5709 5704 bool WebGLRenderingContext ::validateCapability(const char* functionName, GC3Denum cap)5710 bool WebGLRenderingContextBase::validateCapability(const char* functionName, GC3Denum cap) 5705 5711 { 5706 5712 switch (cap) { … … 5721 5727 } 5722 5728 5723 bool WebGLRenderingContext ::validateUniformParameters(const char* functionName, const WebGLUniformLocation* location, Float32Array* v, GC3Dsizei requiredMinSize)5729 bool WebGLRenderingContextBase::validateUniformParameters(const char* functionName, const WebGLUniformLocation* location, Float32Array* v, GC3Dsizei requiredMinSize) 5724 5730 { 5725 5731 if (!v) { … … 5730 5736 } 5731 5737 5732 bool WebGLRenderingContext ::validateUniformParameters(const char* functionName, const WebGLUniformLocation* location, Int32Array* v, GC3Dsizei requiredMinSize)5738 bool WebGLRenderingContextBase::validateUniformParameters(const char* functionName, const WebGLUniformLocation* location, Int32Array* v, GC3Dsizei requiredMinSize) 5733 5739 { 5734 5740 if (!v) { … … 5739 5745 } 5740 5746 5741 bool WebGLRenderingContext ::validateUniformParameters(const char* functionName, const WebGLUniformLocation* location, void* v, GC3Dsizei size, GC3Dsizei requiredMinSize)5747 bool WebGLRenderingContextBase::validateUniformParameters(const char* functionName, const WebGLUniformLocation* location, void* v, GC3Dsizei size, GC3Dsizei requiredMinSize) 5742 5748 { 5743 5749 return validateUniformMatrixParameters(functionName, location, false, v, size, requiredMinSize); 5744 5750 } 5745 5751 5746 bool WebGLRenderingContext ::validateUniformMatrixParameters(const char* functionName, const WebGLUniformLocation* location, GC3Dboolean transpose, Float32Array* v, GC3Dsizei requiredMinSize)5752 bool WebGLRenderingContextBase::validateUniformMatrixParameters(const char* functionName, const WebGLUniformLocation* location, GC3Dboolean transpose, Float32Array* v, GC3Dsizei requiredMinSize) 5747 5753 { 5748 5754 if (!v) { … … 5753 5759 } 5754 5760 5755 bool WebGLRenderingContext ::validateUniformMatrixParameters(const char* functionName, const WebGLUniformLocation* location, GC3Dboolean transpose, void* v, GC3Dsizei size, GC3Dsizei requiredMinSize)5761 bool WebGLRenderingContextBase::validateUniformMatrixParameters(const char* functionName, const WebGLUniformLocation* location, GC3Dboolean transpose, void* v, GC3Dsizei size, GC3Dsizei requiredMinSize) 5756 5762 { 5757 5763 if (!location) … … 5776 5782 } 5777 5783 5778 WebGLBuffer* WebGLRenderingContext ::validateBufferDataParameters(const char* functionName, GC3Denum target, GC3Denum usage)5784 WebGLBuffer* WebGLRenderingContextBase::validateBufferDataParameters(const char* functionName, GC3Denum target, GC3Denum usage) 5779 5785 { 5780 5786 WebGLBuffer* buffer = 0; … … 5804 5810 } 5805 5811 5806 bool WebGLRenderingContext ::validateHTMLImageElement(const char* functionName, HTMLImageElement* image, ExceptionCode& ec)5812 bool WebGLRenderingContextBase::validateHTMLImageElement(const char* functionName, HTMLImageElement* image, ExceptionCode& ec) 5807 5813 { 5808 5814 if (!image || !image->cachedImage()) { … … 5822 5828 } 5823 5829 5824 bool WebGLRenderingContext ::validateHTMLCanvasElement(const char* functionName, HTMLCanvasElement* canvas, ExceptionCode& ec)5830 bool WebGLRenderingContextBase::validateHTMLCanvasElement(const char* functionName, HTMLCanvasElement* canvas, ExceptionCode& ec) 5825 5831 { 5826 5832 if (!canvas || !canvas->buffer()) { … … 5836 5842 5837 5843 #if ENABLE(VIDEO) 5838 bool WebGLRenderingContext ::validateHTMLVideoElement(const char* functionName, HTMLVideoElement* video, ExceptionCode& ec)5844 bool WebGLRenderingContextBase::validateHTMLVideoElement(const char* functionName, HTMLVideoElement* video, ExceptionCode& ec) 5839 5845 { 5840 5846 if (!video || !video->videoWidth() || !video->videoHeight()) { … … 5850 5856 #endif 5851 5857 5852 void WebGLRenderingContext ::vertexAttribfImpl(const char* functionName, GC3Duint index, GC3Dsizei expectedSize, GC3Dfloat v0, GC3Dfloat v1, GC3Dfloat v2, GC3Dfloat v3)5858 void WebGLRenderingContextBase::vertexAttribfImpl(const char* functionName, GC3Duint index, GC3Dsizei expectedSize, GC3Dfloat v0, GC3Dfloat v1, GC3Dfloat v2, GC3Dfloat v3) 5853 5859 { 5854 5860 if (isContextLostOrPending()) … … 5882 5888 } 5883 5889 5884 void WebGLRenderingContext ::vertexAttribfvImpl(const char* functionName, GC3Duint index, Float32Array* v, GC3Dsizei expectedSize)5890 void WebGLRenderingContextBase::vertexAttribfvImpl(const char* functionName, GC3Duint index, Float32Array* v, GC3Dsizei expectedSize) 5885 5891 { 5886 5892 if (isContextLostOrPending()) … … 5893 5899 } 5894 5900 5895 void WebGLRenderingContext ::vertexAttribfvImpl(const char* functionName, GC3Duint index, GC3Dfloat* v, GC3Dsizei size, GC3Dsizei expectedSize)5901 void WebGLRenderingContextBase::vertexAttribfvImpl(const char* functionName, GC3Duint index, GC3Dfloat* v, GC3Dsizei size, GC3Dsizei expectedSize) 5896 5902 { 5897 5903 if (isContextLostOrPending()) … … 5932 5938 } 5933 5939 5934 void WebGLRenderingContext ::initVertexAttrib0()5940 void WebGLRenderingContextBase::initVertexAttrib0() 5935 5941 { 5936 5942 WebGLVertexArrayObjectOES::VertexAttribState& state = m_boundVertexArrayObject->getVertexAttribState(0); … … 5952 5958 } 5953 5959 5954 bool WebGLRenderingContext ::simulateVertexAttrib0(GC3Dsizei numVertex)5960 bool WebGLRenderingContextBase::simulateVertexAttrib0(GC3Dsizei numVertex) 5955 5961 { 5956 5962 const WebGLVertexArrayObjectOES::VertexAttribState& state = m_boundVertexArrayObject->getVertexAttribState(0); … … 5997 6003 } 5998 6004 5999 void WebGLRenderingContext ::restoreStatesAfterVertexAttrib0Simulation()6005 void WebGLRenderingContextBase::restoreStatesAfterVertexAttrib0Simulation() 6000 6006 { 6001 6007 const WebGLVertexArrayObjectOES::VertexAttribState& state = m_boundVertexArrayObject->getVertexAttribState(0); … … 6007 6013 } 6008 6014 6009 void WebGLRenderingContext ::dispatchContextLostEvent()6015 void WebGLRenderingContextBase::dispatchContextLostEvent() 6010 6016 { 6011 6017 RefPtr<WebGLContextEvent> event = WebGLContextEvent::create(eventNames().webglcontextlostEvent, false, true, ""); … … 6016 6022 } 6017 6023 6018 void WebGLRenderingContext ::maybeRestoreContext()6024 void WebGLRenderingContextBase::maybeRestoreContext() 6019 6025 { 6020 6026 ASSERT(m_contextLost); … … 6101 6107 } 6102 6108 6103 String WebGLRenderingContext ::ensureNotNull(const String& text) const6109 String WebGLRenderingContextBase::ensureNotNull(const String& text) const 6104 6110 { 6105 6111 if (text.isNull()) … … 6108 6114 } 6109 6115 6110 WebGLRenderingContext ::LRUImageBufferCache::LRUImageBufferCache(int capacity)6116 WebGLRenderingContextBase::LRUImageBufferCache::LRUImageBufferCache(int capacity) 6111 6117 : m_buffers(std::make_unique<std::unique_ptr<ImageBuffer>[]>(capacity)) 6112 6118 , m_capacity(capacity) … … 6114 6120 } 6115 6121 6116 ImageBuffer* WebGLRenderingContext ::LRUImageBufferCache::imageBuffer(const IntSize& size)6122 ImageBuffer* WebGLRenderingContextBase::LRUImageBufferCache::imageBuffer(const IntSize& size) 6117 6123 { 6118 6124 int i; … … 6138 6144 } 6139 6145 6140 void WebGLRenderingContext ::LRUImageBufferCache::bubbleToFront(int idx)6146 void WebGLRenderingContextBase::LRUImageBufferCache::bubbleToFront(int idx) 6141 6147 { 6142 6148 for (int i = idx; i > 0; --i) … … 6168 6174 } // namespace anonymous 6169 6175 6170 void WebGLRenderingContext ::synthesizeGLError(GC3Denum error, const char* functionName, const char* description, ConsoleDisplayPreference display)6176 void WebGLRenderingContextBase::synthesizeGLError(GC3Denum error, const char* functionName, const char* description, ConsoleDisplayPreference display) 6171 6177 { 6172 6178 if (m_synthesizedErrorsToConsole && display == DisplayInConsole) { … … 6178 6184 6179 6185 6180 void WebGLRenderingContext ::printGLWarningToConsole(const char* functionName, const char* description)6186 void WebGLRenderingContextBase::printGLWarningToConsole(const char* functionName, const char* description) 6181 6187 { 6182 6188 if (m_synthesizedErrorsToConsole) { … … 6186 6192 } 6187 6193 6188 void WebGLRenderingContext ::applyStencilTest()6194 void WebGLRenderingContextBase::applyStencilTest() 6189 6195 { 6190 6196 bool haveStencilBuffer = false; … … 6200 6206 } 6201 6207 6202 void WebGLRenderingContext ::enableOrDisable(GC3Denum capability, bool enable)6208 void WebGLRenderingContextBase::enableOrDisable(GC3Denum capability, bool enable) 6203 6209 { 6204 6210 if (enable) … … 6208 6214 } 6209 6215 6210 IntSize WebGLRenderingContext ::clampedCanvasSize()6216 IntSize WebGLRenderingContextBase::clampedCanvasSize() 6211 6217 { 6212 6218 return IntSize(clamp(canvas()->width(), 1, m_maxViewportDims[0]), … … 6214 6220 } 6215 6221 6216 GC3Dint WebGLRenderingContext ::getMaxDrawBuffers()6222 GC3Dint WebGLRenderingContextBase::getMaxDrawBuffers() 6217 6223 { 6218 6224 if (!supportsDrawBuffers()) … … 6226 6232 } 6227 6233 6228 GC3Dint WebGLRenderingContext ::getMaxColorAttachments()6234 GC3Dint WebGLRenderingContextBase::getMaxColorAttachments() 6229 6235 { 6230 6236 if (!supportsDrawBuffers()) … … 6235 6241 } 6236 6242 6237 void WebGLRenderingContext ::setBackDrawBuffer(GC3Denum buf)6243 void WebGLRenderingContextBase::setBackDrawBuffer(GC3Denum buf) 6238 6244 { 6239 6245 m_backDrawBuffer = buf; 6240 6246 } 6241 6247 6242 void WebGLRenderingContext ::restoreCurrentFramebuffer()6248 void WebGLRenderingContextBase::restoreCurrentFramebuffer() 6243 6249 { 6244 6250 ExceptionCode ec; … … 6246 6252 } 6247 6253 6248 void WebGLRenderingContext ::restoreCurrentTexture2D()6254 void WebGLRenderingContextBase::restoreCurrentTexture2D() 6249 6255 { 6250 6256 ExceptionCode ec; … … 6252 6258 } 6253 6259 6254 bool WebGLRenderingContext ::supportsDrawBuffers()6260 bool WebGLRenderingContextBase::supportsDrawBuffers() 6255 6261 { 6256 6262 if (!m_drawBuffersWebGLRequirementsChecked) { … … 6261 6267 } 6262 6268 6263 void WebGLRenderingContext ::drawArraysInstanced(GC3Denum mode, GC3Dint first, GC3Dsizei count, GC3Dsizei primcount)6269 void WebGLRenderingContextBase::drawArraysInstanced(GC3Denum mode, GC3Dint first, GC3Dsizei count, GC3Dsizei primcount) 6264 6270 { 6265 6271 if (!primcount) { … … 6288 6294 } 6289 6295 6290 void WebGLRenderingContext ::drawElementsInstanced(GC3Denum mode, GC3Dsizei count, GC3Denum type, long long offset, GC3Dsizei primcount)6296 void WebGLRenderingContextBase::drawElementsInstanced(GC3Denum mode, GC3Dsizei count, GC3Denum type, long long offset, GC3Dsizei primcount) 6291 6297 { 6292 6298 if (!primcount) { … … 6319 6325 } 6320 6326 6321 void WebGLRenderingContext ::vertexAttribDivisor(GC3Duint index, GC3Duint divisor)6327 void WebGLRenderingContextBase::vertexAttribDivisor(GC3Duint index, GC3Duint divisor) 6322 6328 { 6323 6329 if (isContextLostOrPending()) -
trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h
r178604 r178674 1 1 /* 2 * Copyright (C) 20 09, 2014Apple Inc. All rights reserved.2 * Copyright (C) 2015 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #ifndef WebGLRenderingContext _h27 #define WebGLRenderingContext _h26 #ifndef WebGLRenderingContextBase_h 27 #define WebGLRenderingContextBase_h 28 28 29 29 #include "ActiveDOMObject.h" … … 86 86 typedef int ExceptionCode; 87 87 88 class WebGLRenderingContext final: public CanvasRenderingContext, public ActiveDOMObject {88 class WebGLRenderingContextBase : public CanvasRenderingContext, public ActiveDOMObject { 89 89 public: 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 94 93 #if PLATFORM(WIN) 95 94 // FIXME: Implement accelerated 3d canvas on Windows. … … 336 335 void vertexAttribDivisor(GC3Duint index, GC3Duint divisor); 337 336 337 protected: 338 WebGLRenderingContextBase(HTMLCanvasElement*, GraphicsContext3D::Attributes); 339 WebGLRenderingContextBase(HTMLCanvasElement*, PassRefPtr<GraphicsContext3D>, GraphicsContext3D::Attributes); 340 338 341 private: 339 342 friend class WebGLDrawBuffers; … … 348 351 friend class WebGLVertexArrayObjectOES; 349 352 350 WebGLRenderingContext(HTMLCanvasElement*, GraphicsContext3D::Attributes); 351 WebGLRenderingContext(HTMLCanvasElement*, PassRefPtr<GraphicsContext3D>, GraphicsContext3D::Attributes); 352 void initializeNewContext(); 353 void setupFlags(); 353 void initializeNewContext(); 354 void setupFlags(); 354 355 355 356 // ActiveDOMObject -
trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl
r178604 r178674 1 1 /* 2 * Copyright (C) 20 09Apple Inc. All rights reserved.2 * Copyright (C) 2015 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 40 40 41 41 [ 42 Conditional=WEBGL, 43 JSCustomMarkFunction, 44 DoNotCheckConstants, 45 ] interface WebGLRenderingContext : CanvasRenderingContext { 42 NoInterfaceObject, 43 Conditional=WEBGL, 44 JSCustomMarkFunction, 45 DoNotCheckConstants, 46 ] interface WebGLRenderingContextBase : CanvasRenderingContext { 46 47 47 48 /* ClearBufferMask */ -
trunk/Source/WebCore/html/canvas/WebGLShader.cpp
r178411 r178674 31 31 32 32 #include "WebGLContextGroup.h" 33 #include "WebGLRenderingContext .h"33 #include "WebGLRenderingContextBase.h" 34 34 35 35 namespace WebCore { 36 36 37 PassRefPtr<WebGLShader> WebGLShader::create(WebGLRenderingContext * ctx, GC3Denum type)37 PassRefPtr<WebGLShader> WebGLShader::create(WebGLRenderingContextBase* ctx, GC3Denum type) 38 38 { 39 39 return adoptRef(new WebGLShader(ctx, type)); 40 40 } 41 41 42 WebGLShader::WebGLShader(WebGLRenderingContext * ctx, GC3Denum type)42 WebGLShader::WebGLShader(WebGLRenderingContextBase* ctx, GC3Denum type) 43 43 : WebGLSharedObject(ctx) 44 44 , m_type(type) -
trunk/Source/WebCore/html/canvas/WebGLShader.h
r178411 r178674 37 37 virtual ~WebGLShader(); 38 38 39 static PassRefPtr<WebGLShader> create(WebGLRenderingContext *, GC3Denum);39 static PassRefPtr<WebGLShader> create(WebGLRenderingContextBase*, GC3Denum); 40 40 41 41 GC3Denum getType() const { return m_type; } … … 48 48 49 49 private: 50 WebGLShader(WebGLRenderingContext *, GC3Denum);50 WebGLShader(WebGLRenderingContextBase*, GC3Denum); 51 51 52 52 virtual void deleteObjectImpl(GraphicsContext3D*, Platform3DObject) override; -
trunk/Source/WebCore/html/canvas/WebGLSharedObject.cpp
r178411 r178674 31 31 32 32 #include "WebGLContextGroup.h" 33 #include "WebGLRenderingContext .h"33 #include "WebGLRenderingContextBase.h" 34 34 35 35 namespace WebCore { 36 36 37 WebGLSharedObject::WebGLSharedObject(WebGLRenderingContext * context)37 WebGLSharedObject::WebGLSharedObject(WebGLRenderingContextBase* context) 38 38 : WebGLObject(context), 39 39 m_contextGroup(context->contextGroup()) -
trunk/Source/WebCore/html/canvas/WebGLSharedObject.h
r178411 r178674 33 33 class GraphicsContext3D; 34 34 class WebGLContextGroup; 35 class WebGLRenderingContext ;35 class WebGLRenderingContextBase; 36 36 37 37 // WebGLSharedObject the base class for objects that can be shared by multiple … … 49 49 virtual bool isTexture() const { return false; } 50 50 51 virtual bool validate(const WebGLContextGroup* contextGroup, const WebGLRenderingContext *) const override51 virtual bool validate(const WebGLContextGroup* contextGroup, const WebGLRenderingContextBase*) const override 52 52 { 53 53 return contextGroup == m_contextGroup; … … 57 57 58 58 protected: 59 WebGLSharedObject(WebGLRenderingContext *);59 WebGLSharedObject(WebGLRenderingContextBase*); 60 60 61 61 virtual bool hasGroupOrContext() const override -
trunk/Source/WebCore/html/canvas/WebGLTexture.cpp
r178411 r178674 32 32 #include "WebGLContextGroup.h" 33 33 #include "WebGLFramebuffer.h" 34 #include "WebGLRenderingContext .h"34 #include "WebGLRenderingContextBase.h" 35 35 36 36 namespace WebCore { 37 37 38 PassRefPtr<WebGLTexture> WebGLTexture::create(WebGLRenderingContext * ctx)38 PassRefPtr<WebGLTexture> WebGLTexture::create(WebGLRenderingContextBase* ctx) 39 39 { 40 40 return adoptRef(new WebGLTexture(ctx)); 41 41 } 42 42 43 WebGLTexture::WebGLTexture(WebGLRenderingContext * ctx)43 WebGLTexture::WebGLTexture(WebGLRenderingContextBase* ctx) 44 44 : WebGLSharedObject(ctx) 45 45 , m_target(0) -
trunk/Source/WebCore/html/canvas/WebGLTexture.h
r178411 r178674 45 45 virtual ~WebGLTexture(); 46 46 47 static PassRefPtr<WebGLTexture> create(WebGLRenderingContext *);47 static PassRefPtr<WebGLTexture> create(WebGLRenderingContextBase*); 48 48 49 49 void setTarget(GC3Denum target, GC3Dint maxLevel); … … 83 83 84 84 private: 85 WebGLTexture(WebGLRenderingContext *);85 WebGLTexture(WebGLRenderingContextBase*); 86 86 87 87 virtual void deleteObjectImpl(GraphicsContext3D*, Platform3DObject) override; -
trunk/Source/WebCore/html/canvas/WebGLVertexArrayObjectOES.cpp
r178411 r178674 31 31 32 32 #include "Extensions3D.h" 33 #include "WebGLRenderingContext .h"33 #include "WebGLRenderingContextBase.h" 34 34 35 35 namespace WebCore { 36 36 37 PassRefPtr<WebGLVertexArrayObjectOES> WebGLVertexArrayObjectOES::create(WebGLRenderingContext * ctx, VaoType type)37 PassRefPtr<WebGLVertexArrayObjectOES> WebGLVertexArrayObjectOES::create(WebGLRenderingContextBase* ctx, VaoType type) 38 38 { 39 39 return adoptRef(new WebGLVertexArrayObjectOES(ctx, type)); 40 40 } 41 41 42 WebGLVertexArrayObjectOES::WebGLVertexArrayObjectOES(WebGLRenderingContext * ctx, VaoType type)42 WebGLVertexArrayObjectOES::WebGLVertexArrayObjectOES(WebGLRenderingContextBase* ctx, VaoType type) 43 43 : WebGLContextObject(ctx) 44 44 , m_type(type) -
trunk/Source/WebCore/html/canvas/WebGLVertexArrayObjectOES.h
r178411 r178674 43 43 virtual ~WebGLVertexArrayObjectOES(); 44 44 45 static PassRefPtr<WebGLVertexArrayObjectOES> create(WebGLRenderingContext *, VaoType);45 static PassRefPtr<WebGLVertexArrayObjectOES> create(WebGLRenderingContextBase*, VaoType); 46 46 47 47 // Cached values for vertex attrib range checks … … 90 90 91 91 private: 92 WebGLVertexArrayObjectOES(WebGLRenderingContext *, VaoType);92 WebGLVertexArrayObjectOES(WebGLRenderingContextBase*, VaoType); 93 93 94 94 virtual void deleteObjectImpl(GraphicsContext3D*, Platform3DObject) override;
Note:
See TracChangeset
for help on using the changeset viewer.