Changeset 55514 in webkit


Ignore:
Timestamp:
Mar 4, 2010 1:41:30 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-03-04 Vangelis Kokkevis <vangelis@chromium.org>

Reviewed by Oliver Hunt.

Update existing test to check that getUniformLocation() returns
null if the uniform requested is not found.
https://bugs.webkit.org/show_bug.cgi?id=34669

  • fast/canvas/webgl/script-tests/uniform-location.js:
  • fast/canvas/webgl/uniform-location-expected.txt:

2010-03-04 Vangelis Kokkevis <vangelis@chromium.org>

Reviewed by Oliver Hunt.

getUniformLocation() now returns null if uniform requested
is not found.
https://bugs.webkit.org/show_bug.cgi?id=34669

Test:LayoutTests/fast/canvas/webgl/uniform-location.html
(added missing test)

  • html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::getUniformLocation):
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r55513 r55514  
     12010-03-04  Vangelis Kokkevis  <vangelis@chromium.org>
     2
     3        Reviewed by Oliver Hunt.
     4
     5        Update existing test to check that getUniformLocation() returns
     6        null if the uniform requested is not found.
     7        https://bugs.webkit.org/show_bug.cgi?id=34669
     8       
     9        * fast/canvas/webgl/script-tests/uniform-location.js:
     10        * fast/canvas/webgl/uniform-location-expected.txt:
     11
    1122010-03-04  John Abd-El-Malek  <jam@chromium.org>
    213
  • trunk/LayoutTests/fast/canvas/webgl/script-tests/uniform-location.js

    r51970 r55514  
    1 description("Tests calling WebGL APIs with objects from other contexts");
     1description("Tests WebGL APIs related to shader uniforms");
    22
    33var contextA = create3DDebugContext();
     
    3434shouldBe("contextA.getUniform(programV, locationVec4)", "vec");
    3535
     36shouldBeNull("contextA.getUniformLocation(programV, \"IDontExist\")");
     37
    3638successfullyParsed = true;
  • trunk/LayoutTests/fast/canvas/webgl/uniform-location-expected.txt

    r51970 r55514  
    1 Tests calling WebGL APIs with objects from other contexts
     1Tests WebGL APIs related to shader uniforms
    22
    33On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
     
    1616PASS contextA.uniform4fv(locationVec4, vec) is undefined.
    1717PASS contextA.getUniform(programV, locationVec4) is vec
     18PASS contextA.getUniformLocation(programV, "IDontExist") is null
    1819PASS successfullyParsed is true
    1920
  • trunk/WebCore/ChangeLog

    r55513 r55514  
     12010-03-04  Vangelis Kokkevis  <vangelis@chromium.org>
     2
     3        Reviewed by Oliver Hunt.
     4
     5        getUniformLocation() now returns null if uniform requested
     6        is not found.
     7        https://bugs.webkit.org/show_bug.cgi?id=34669
     8       
     9        Test:LayoutTests/fast/canvas/webgl/uniform-location.html
     10        (added missing test)
     11
     12        * html/canvas/WebGLRenderingContext.cpp:
     13        (WebCore::WebGLRenderingContext::getUniformLocation):
     14
    1152010-03-04  John Abd-El-Malek  <jam@chromium.org>
    216
  • trunk/WebCore/html/canvas/WebGLRenderingContext.cpp

    r55306 r55514  
    14001400    }
    14011401    WebGLStateRestorer(this, false);
    1402     return WebGLUniformLocation::create(program, m_context->getUniformLocation(program, name));
     1402    long uniformLocation = m_context->getUniformLocation(program, name);
     1403    if (uniformLocation == -1)
     1404        return 0;
     1405    return WebGLUniformLocation::create(program, uniformLocation);
    14031406}
    14041407
Note: See TracChangeset for help on using the changeset viewer.