Commit 10b88eff authored by zmo@google.com's avatar zmo@google.com

2011-01-27 Zhenyao Mo <zmo@google.com>

        Reviewed by Kenneth Russell.

        Remove _LENGTH enumerants
        https://bugs.webkit.org/show_bug.cgi?id=53259

        * html/canvas/WebGLRenderingContext.cpp: Remove queries for *LENGTH.
        (WebCore::WebGLRenderingContext::getProgramParameter):
        (WebCore::WebGLRenderingContext::getShaderParameter):
        * html/canvas/WebGLRenderingContext.idl: Remove *LENGTH.
2011-01-27  Zhenyao Mo  <zmo@google.com>

        Reviewed by Kenneth Russell.

        Remove _LENGTH enumerants
        https://bugs.webkit.org/show_bug.cgi?id=53259

        * fast/canvas/webgl/constants.html:
        * fast/canvas/webgl/gl-getshadersource-expected.txt:
        * fast/canvas/webgl/gl-getshadersource.html:
        * fast/canvas/webgl/gl-object-get-calls-expected.txt:
        * fast/canvas/webgl/gl-object-get-calls.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76944 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent c79f6517
2011-01-27 Zhenyao Mo <zmo@google.com>
Reviewed by Kenneth Russell.
Remove _LENGTH enumerants
https://bugs.webkit.org/show_bug.cgi?id=53259
* fast/canvas/webgl/constants.html:
* fast/canvas/webgl/gl-getshadersource-expected.txt:
* fast/canvas/webgl/gl-getshadersource.html:
* fast/canvas/webgl/gl-object-get-calls-expected.txt:
* fast/canvas/webgl/gl-object-get-calls.html:
2011-01-28 Sergio Villar Senin <svillar@igalia.com>
Unreviewed.
......@@ -245,9 +245,7 @@ LINK_STATUS : 0x8B82,
VALIDATE_STATUS : 0x8B83,
ATTACHED_SHADERS : 0x8B85,
ACTIVE_UNIFORMS : 0x8B86,
ACTIVE_UNIFORM_MAX_LENGTH : 0x8B87,
ACTIVE_ATTRIBUTES : 0x8B89,
ACTIVE_ATTRIBUTE_MAX_LENGTH : 0x8B8A,
SHADING_LANGUAGE_VERSION : 0x8B8C,
CURRENT_PROGRAM : 0x8B8D,
......@@ -376,8 +374,6 @@ VERTEX_ATTRIB_ARRAY_BUFFER_BINDING : 0x889F,
/* Shader Source */
COMPILE_STATUS : 0x8B81,
INFO_LOG_LENGTH : 0x8B84,
SHADER_SOURCE_LENGTH : 0x8B88,
SHADER_COMPILER : 0x8DFA,
/* Shader Precision-Specified Types */
......
......@@ -2,9 +2,7 @@ Tests that the source that goes into a shader is what comes out.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS sourceLength is 0
PASS source is original
PASS sourceLength is 17
PASS getError was expected value: NO_ERROR : Should be no errors.
PASS successfullyParsed is true
......
......@@ -21,15 +21,11 @@ var canvas = document.getElementById("example");
var gl = wtu.create3DContext(canvas);
var original = document.getElementById("vshader").text;
var shader = gl.createShader(gl.VERTEX_SHADER);
var sourceLength = gl.getShaderParameter(shader, gl.SHADER_SOURCE_LENGTH);
shouldBe("sourceLength", "0");
gl.shaderSource(shader, original);
var source = gl.getShaderSource(shader);
shouldBe("source", "original");
sourceLength = gl.getShaderParameter(shader, gl.SHADER_SOURCE_LENGTH);
shouldBe("sourceLength", "17");
successfullyParsed = true;
glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors.");
successfullyParsed = true;
</script>
</body>
</body>
......
......@@ -24,12 +24,9 @@ PASS gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, g
PASS gl.getProgramParameter(standardProgram, gl.DELETE_STATUS) is false
PASS gl.getProgramParameter(standardProgram, gl.LINK_STATUS) is true
PASS typeof gl.getProgramParameter(standardProgram, gl.VALIDATE_STATUS) is "boolean"
PASS typeof gl.getProgramParameter(standardProgram, gl.INFO_LOG_LENGTH) is "number"
PASS gl.getProgramParameter(standardProgram, gl.ATTACHED_SHADERS) is 2
PASS gl.getProgramParameter(standardProgram, gl.ACTIVE_ATTRIBUTES) is 2
PASS gl.getProgramParameter(standardProgram, gl.ACTIVE_ATTRIBUTE_MAX_LENGTH) is non-zero.
PASS gl.getProgramParameter(standardProgram, gl.ACTIVE_UNIFORMS) is 1
PASS gl.getProgramParameter(standardProgram, gl.ACTIVE_UNIFORM_MAX_LENGTH) is non-zero.
PASS gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_WIDTH) is 2
PASS gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_HEIGHT) is 2
PASS gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_INTERNAL_FORMAT) is non-zero.
......@@ -43,8 +40,6 @@ PASS gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_ALPHA_SIZE) is
PASS gl.getShaderParameter(standardVert, gl.SHADER_TYPE) is gl.VERTEX_SHADER
PASS gl.getShaderParameter(standardVert, gl.DELETE_STATUS) is false
PASS gl.getShaderParameter(standardVert, gl.COMPILE_STATUS) is true
PASS typeof gl.getShaderParameter(standardVert, gl.INFO_LOG_LENGTH) is "number"
PASS gl.getShaderParameter(standardVert, gl.SHADER_SOURCE_LENGTH) is non-zero.
PASS gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER) is gl.NEAREST
PASS gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER) is gl.NEAREST
PASS gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S) is gl.CLAMP_TO_EDGE
......
......@@ -92,12 +92,9 @@ shouldBe('gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH_ATTACHME
shouldBe('gl.getProgramParameter(standardProgram, gl.DELETE_STATUS)', 'false');
shouldBe('gl.getProgramParameter(standardProgram, gl.LINK_STATUS)', 'true');
shouldBe('typeof gl.getProgramParameter(standardProgram, gl.VALIDATE_STATUS)', '"boolean"');
shouldBe('typeof gl.getProgramParameter(standardProgram, gl.INFO_LOG_LENGTH)', '"number"');
shouldBe('gl.getProgramParameter(standardProgram, gl.ATTACHED_SHADERS)', '2');
shouldBe('gl.getProgramParameter(standardProgram, gl.ACTIVE_ATTRIBUTES)', '2');
shouldBeNonZero('gl.getProgramParameter(standardProgram, gl.ACTIVE_ATTRIBUTE_MAX_LENGTH)');
shouldBe('gl.getProgramParameter(standardProgram, gl.ACTIVE_UNIFORMS)', '1');
shouldBeNonZero('gl.getProgramParameter(standardProgram, gl.ACTIVE_UNIFORM_MAX_LENGTH)');
// Test getRenderbufferParameter
shouldBe('gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_WIDTH)', '2');
......@@ -120,8 +117,6 @@ shouldBeNonZero('gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_AL
shouldBe('gl.getShaderParameter(standardVert, gl.SHADER_TYPE)', 'gl.VERTEX_SHADER');
shouldBe('gl.getShaderParameter(standardVert, gl.DELETE_STATUS)', 'false');
shouldBe('gl.getShaderParameter(standardVert, gl.COMPILE_STATUS)', 'true');
shouldBe('typeof gl.getShaderParameter(standardVert, gl.INFO_LOG_LENGTH)', '"number"');
shouldBeNonZero('gl.getShaderParameter(standardVert, gl.SHADER_SOURCE_LENGTH)');
// Test getTexParameter
gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);
......
2011-01-27 Zhenyao Mo <zmo@google.com>
Reviewed by Kenneth Russell.
Remove _LENGTH enumerants
https://bugs.webkit.org/show_bug.cgi?id=53259
* html/canvas/WebGLRenderingContext.cpp: Remove queries for *LENGTH.
(WebCore::WebGLRenderingContext::getProgramParameter):
(WebCore::WebGLRenderingContext::getShaderParameter):
* html/canvas/WebGLRenderingContext.idl: Remove *LENGTH.
2011-01-28 Alexander Pavlov <apavlov@chromium.org>
Reviewed by Yury Semikhatsky.
......@@ -2055,12 +2055,9 @@ WebGLGetInfo WebGLRenderingContext::getProgramParameter(WebGLProgram* program, G
return WebGLGetInfo(static_cast<bool>(value));
case GraphicsContext3D::LINK_STATUS:
return WebGLGetInfo(program->getLinkStatus());
case GraphicsContext3D::INFO_LOG_LENGTH:
case GraphicsContext3D::ATTACHED_SHADERS:
case GraphicsContext3D::ACTIVE_ATTRIBUTES:
case GraphicsContext3D::ACTIVE_ATTRIBUTE_MAX_LENGTH:
case GraphicsContext3D::ACTIVE_UNIFORMS:
case GraphicsContext3D::ACTIVE_UNIFORM_MAX_LENGTH:
m_context->getProgramiv(objectOrZero(program), pname, &value);
return WebGLGetInfo(value);
default:
......@@ -2163,14 +2160,6 @@ WebGLGetInfo WebGLRenderingContext::getShaderParameter(WebGLShader* shader, GC3D
case GraphicsContext3D::SHADER_TYPE:
m_context->getShaderiv(objectOrZero(shader), pname, &value);
return WebGLGetInfo(static_cast<unsigned int>(value));
case GraphicsContext3D::INFO_LOG_LENGTH:
m_context->getShaderiv(objectOrZero(shader), pname, &value);
return WebGLGetInfo(value);
case GraphicsContext3D::SHADER_SOURCE_LENGTH:
value = static_cast<GC3Dint>(shader->getSource().length());
if (value > 0)
value++; // Includes the null termination character.
return WebGLGetInfo(value);
default:
m_context->synthesizeGLError(GraphicsContext3D::INVALID_ENUM);
return WebGLGetInfo();
......
......@@ -258,9 +258,7 @@ module html {
const unsigned int VALIDATE_STATUS = 0x8B83;
const unsigned int ATTACHED_SHADERS = 0x8B85;
const unsigned int ACTIVE_UNIFORMS = 0x8B86;
const unsigned int ACTIVE_UNIFORM_MAX_LENGTH = 0x8B87;
const unsigned int ACTIVE_ATTRIBUTES = 0x8B89;
const unsigned int ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A;
const unsigned int SHADING_LANGUAGE_VERSION = 0x8B8C;
const unsigned int CURRENT_PROGRAM = 0x8B8D;
......@@ -389,8 +387,6 @@ module html {
/* Shader Source */
const unsigned int COMPILE_STATUS = 0x8B81;
const unsigned int INFO_LOG_LENGTH = 0x8B84;
const unsigned int SHADER_SOURCE_LENGTH = 0x8B88;
const unsigned int SHADER_COMPILER = 0x8DFA;
/* Shader Precision-Specified Types */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment