Changeset 61471 in webkit


Ignore:
Timestamp:
Jun 19, 2010 1:31:22 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-06-19 Zhenyao Mo <zmo@google.com>

Reviewed by Dimitri Glazkov.

fast/canvas/webgl/get-active-test.html failed in Chrome Mac
https://bugs.webkit.org/show_bug.cgi?id=40496

  • fast/canvas/webgl/get-active-test-expected.txt: Test of two contexts and two programs, also test the uniform array name ends with "[0]".
  • fast/canvas/webgl/script-tests/get-active-test.js: Ditto.

2010-06-19 Zhenyao Mo <zmo@google.com>

Reviewed by Dimitri Glazkov.

fast/canvas/webgl/get-active-test.html failed in Chrome Mac
https://bugs.webkit.org/show_bug.cgi?id=40496

  • src/WebGraphicsContext3DDefaultImpl.cpp: Call makeContextCurrent(). (WebKit::WebGraphicsContext3DDefaultImpl::getActiveAttrib): (WebKit::WebGraphicsContext3DDefaultImpl::getActiveUniform): (WebKit::WebGraphicsContext3DDefaultImpl::readPixels):
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r61465 r61471  
     12010-06-19  Zhenyao Mo  <zmo@google.com>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        fast/canvas/webgl/get-active-test.html failed in Chrome Mac
     6        https://bugs.webkit.org/show_bug.cgi?id=40496
     7
     8        * fast/canvas/webgl/get-active-test-expected.txt: Test of two contexts and two programs, also test the uniform array name ends with "[0]".
     9        * fast/canvas/webgl/script-tests/get-active-test.js: Ditto.
     10
    1112010-06-18  Rob Buis  <rwlbuis@gmail.com>
    212
  • trunk/LayoutTests/fast/canvas/webgl/get-active-test-expected.txt

    r61038 r61471  
    88PASS program2 is non-null.
    99PASS context.getError() is context.NO_ERROR
     10PASS context2.getError() is context2.NO_ERROR
    1011PASS context.getActiveUniform(program, 0).name is 'u_modelViewProjMatrix'
    1112PASS context.getActiveUniform(program, 0).type is context.FLOAT_MAT4
     
    2526PASS info[ii].type is expected[ii].type
    2627PASS info[ii].size is expected[ii].size
     28PASS info2[ii] is non-null.
     29PASS info2[ii] is non-null.
     30PASS info2[ii].name is expected2[ii].name
     31PASS info2[ii].type is expected2[ii].type
     32PASS info2[ii].size is expected2[ii].size
     33PASS info2[ii].name is expected2[ii].name
     34PASS info2[ii].type is expected2[ii].type
     35PASS info2[ii].size is expected2[ii].size
    2736PASS context.getActiveAttrib(program, 2) is null
    2837PASS context.getError() is context.INVALID_VALUE
  • trunk/LayoutTests/fast/canvas/webgl/script-tests/get-active-test.js

    r61038 r61471  
    1212shouldBeNonNull("program2");
    1313shouldBe("context.getError()", "context.NO_ERROR");
     14shouldBe("context2.getError()", "context2.NO_ERROR");
    1415
    1516shouldBe("context.getActiveUniform(program, 0).name", "'u_modelViewProjMatrix'");
     
    4849}
    4950
     51// we don't know the order the uniforms will appear.
     52var info2 = [
     53    context2.getActiveUniform(program2, 0),
     54    context2.getActiveUniform(program2, 1)
     55];
     56for (var ii = 0; ii < info2.length; ++ii)
     57    shouldBeNonNull("info2[ii]");
     58
     59var expected2 = [
     60    { name: 'ival', type: context2.INT, size: 1 },
     61    { name: 'ival2[0]', type: context2.INT, size: 2 }
     62];
     63
     64if (info2[0].name != expected2[0].name) {
     65    t = info2[0];
     66    info2[0] = info2[1];
     67    info2[1] = t;
     68}
     69
     70for (var ii = 0; ii < info2.length; ++ii) {
     71    shouldBe("info2[ii].name", "expected2[ii].name");
     72    shouldBe("info2[ii].type", "expected2[ii].type");
     73    shouldBe("info2[ii].size", "expected2[ii].size");
     74}
     75
    5076shouldBeNull("context.getActiveAttrib(program, 2)");
    5177shouldBe("context.getError()", "context.INVALID_VALUE");
  • trunk/WebKit/chromium/ChangeLog

    r61468 r61471  
     12010-06-19  Zhenyao Mo  <zmo@google.com>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        fast/canvas/webgl/get-active-test.html failed in Chrome Mac
     6        https://bugs.webkit.org/show_bug.cgi?id=40496
     7
     8        * src/WebGraphicsContext3DDefaultImpl.cpp: Call makeContextCurrent().
     9        (WebKit::WebGraphicsContext3DDefaultImpl::getActiveAttrib):
     10        (WebKit::WebGraphicsContext3DDefaultImpl::getActiveUniform):
     11        (WebKit::WebGraphicsContext3DDefaultImpl::readPixels):
     12
    1132010-06-18  Aaron Boodman  <aa@chromium.org>
    214
  • trunk/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp

    r60290 r61471  
    10021002bool WebGraphicsContext3DDefaultImpl::getActiveAttrib(WebGLId program, unsigned long index, ActiveInfo& info)
    10031003{
     1004    makeContextCurrent();
    10041005    if (!program) {
    10051006        synthesizeGLError(GL_INVALID_VALUE);
     
    10331034bool WebGraphicsContext3DDefaultImpl::getActiveUniform(WebGLId program, unsigned long index, ActiveInfo& info)
    10341035{
     1036    makeContextCurrent();
    10351037    GLint maxNameLength = -1;
    10361038    glGetProgramiv(program, GL_ACTIVE_UNIFORM_MAX_LENGTH, &maxNameLength);
     
    12241226void WebGraphicsContext3DDefaultImpl::readPixels(long x, long y, unsigned long width, unsigned long height, unsigned long format, unsigned long type, void* pixels)
    12251227{
     1228    makeContextCurrent();
    12261229    // FIXME: remove the two glFlush calls when the driver bug is fixed, i.e.,
    12271230    // all previous rendering calls should be done before reading pixels.
Note: See TracChangeset for help on using the changeset viewer.