2010-07-02 Zhenyao Mo <zmo@google.com>
authorzmo@google.com <zmo@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Jul 2010 19:06:12 +0000 (19:06 +0000)
committerzmo@google.com <zmo@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Jul 2010 19:06:12 +0000 (19:06 +0000)
commit2aa2c71f4c2f0411e851637c042cd507645d89d2
treed96cb17d8904dba3ce80d326de373c9a5192bae6
parentff980117e5dca5d9c43511767d4e0e8cd1b2cbcc
2010-07-02  Zhenyao Mo  <zmo@google.com>

        Reviewed by Dimitri Glazkov.

        linkProgram should fail when vertex/fragment shaders are not both present
        https://bugs.webkit.org/show_bug.cgi?id=41380

        * fast/canvas/webgl/program-test-expected.txt: Added.
        * fast/canvas/webgl/program-test.html: Added.
2010-07-02  Zhenyao Mo  <zmo@google.com>

        Reviewed by Dimitri Glazkov.

        linkProgram should fail when vertex/fragment shaders are not both present
        https://bugs.webkit.org/show_bug.cgi?id=41380

        Test: fast/canvas/webgl/program-test.html

        * html/canvas/WebGLProgram.cpp: Add flag for link failure due to missing shaders.
        (WebCore::WebGLProgram::WebGLProgram):
        * html/canvas/WebGLProgram.h: Add interface for linkFailure flag.
        (WebCore::WebGLProgram::isLinkFailureFlagSet):
        (WebCore::WebGLProgram::setLinkFailureFlag):
        * html/canvas/WebGLRenderingContext.cpp:
        (WebCore::WebGLRenderingContext::getProgramParameter): Intercept when linkFailureFlag is set.
        (WebCore::WebGLRenderingContext::linkProgram): Check if there are missing shaders and don't link if yes.
        * html/canvas/WebGLShader.cpp: Cache shader type.
        (WebCore::WebGLShader::WebGLShader):
        * html/canvas/WebGLShader.h: Ditto.
        (WebCore::WebGLShader::getType):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62396 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/canvas/webgl/program-test-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/webgl/program-test.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/html/canvas/WebGLProgram.cpp
WebCore/html/canvas/WebGLProgram.h
WebCore/html/canvas/WebGLRenderingContext.cpp
WebCore/html/canvas/WebGLShader.cpp
WebCore/html/canvas/WebGLShader.h