Changeset 58103 in webkit


Ignore:
Timestamp:
Apr 22, 2010 10:04:06 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-04-22 Zhenyao Mo <zmo@google.com>

Reviewed by Dimitri Glazkov.

Regression: framebufferRenderbuffer crashes with null renderBuffer
https://bugs.webkit.org/show_bug.cgi?id=37963

  • fast/canvas/webgl/framebuffer-object-attachment-expected.txt: Adding test cases for null renderbuffer input.
  • fast/canvas/webgl/framebuffer-object-attachment.html: Ditto.

2010-04-22 Zhenyao Mo <zmo@google.com>

Reviewed by Dimitri Glazkov.

Regression: framebufferRenderbuffer crashes with null renderBuffer
https://bugs.webkit.org/show_bug.cgi?id=37963

  • html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::framebufferRenderbuffer): Dealing with null renderbuffer input.
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r58102 r58103  
     12010-04-22  Zhenyao Mo  <zmo@google.com>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        Regression: framebufferRenderbuffer crashes with null renderBuffer
     6        https://bugs.webkit.org/show_bug.cgi?id=37963
     7
     8        * fast/canvas/webgl/framebuffer-object-attachment-expected.txt: Adding test cases for null renderbuffer input.
     9        * fast/canvas/webgl/framebuffer-object-attachment.html: Ditto.
     10
    1112010-04-22  Zhenyao Mo  <zmo@google.com>
    212
  • trunk/LayoutTests/fast/canvas/webgl/framebuffer-object-attachment-expected.txt

    r57018 r58103  
    4242PASS gl.getError() is gl.NO_ERROR
    4343PASS gl.getError() is gl.INVALID_OPERATION
     44PASS gl.getError() is gl.NO_ERROR
     45PASS gl.getError() is gl.NO_ERROR
    4446Attach stencil, then depth, causing conflict
    4547PASS fbo = gl.createFramebuffer() is non-null.
    4648PASS gl.getError() is gl.NO_ERROR
    4749PASS gl.getError() is gl.INVALID_OPERATION
     50PASS gl.getError() is gl.NO_ERROR
     51PASS gl.getError() is gl.NO_ERROR
    4852Attach depth, then depthStencil, causing conflict
    4953PASS fbo = gl.createFramebuffer() is non-null.
    5054PASS gl.getError() is gl.NO_ERROR
    5155PASS gl.getError() is gl.INVALID_OPERATION
     56PASS gl.getError() is gl.NO_ERROR
     57PASS gl.getError() is gl.NO_ERROR
    5258Attach depthStencil, then depth, causing conflict
    5359PASS fbo = gl.createFramebuffer() is non-null.
    5460PASS gl.getError() is gl.NO_ERROR
    5561PASS gl.getError() is gl.INVALID_OPERATION
     62PASS gl.getError() is gl.NO_ERROR
     63PASS gl.getError() is gl.NO_ERROR
    5664Attach stencil, then depthStencil, causing conflict
    5765PASS fbo = gl.createFramebuffer() is non-null.
    5866PASS gl.getError() is gl.NO_ERROR
    5967PASS gl.getError() is gl.INVALID_OPERATION
     68PASS gl.getError() is gl.NO_ERROR
     69PASS gl.getError() is gl.NO_ERROR
    6070Attach depthStencil, then stencil, causing conflict
    6171PASS fbo = gl.createFramebuffer() is non-null.
    6272PASS gl.getError() is gl.NO_ERROR
    6373PASS gl.getError() is gl.INVALID_OPERATION
     74PASS gl.getError() is gl.NO_ERROR
     75PASS gl.getError() is gl.NO_ERROR
    6476PASS successfullyParsed is true
    6577
  • trunk/LayoutTests/fast/canvas/webgl/framebuffer-object-attachment.html

    r57018 r58103  
    3535    gl.framebufferRenderbuffer(gl.FRAMEBUFFER, attachment1, gl.RENDERBUFFER, buffer1);
    3636    shouldBe("gl.getError()", isConflicted ? "gl.INVALID_OPERATION" : "gl.NO_ERROR");
     37    if (isConflicted) {
     38        // Detach buffer0 first using a null object, then attaching buffer1 should succeed.
     39        gl.framebufferRenderbuffer(gl.FRAMEBUFFER, attachment0, gl.RENDERBUFFER, null);
     40        shouldBe("gl.getError()", "gl.NO_ERROR");
     41        gl.framebufferRenderbuffer(gl.FRAMEBUFFER, attachment1, gl.RENDERBUFFER, buffer1);
     42        shouldBe("gl.getError()", "gl.NO_ERROR");
     43    }
    3744}
    3845
  • trunk/WebCore/ChangeLog

    r58102 r58103  
     12010-04-22  Zhenyao Mo  <zmo@google.com>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        Regression: framebufferRenderbuffer crashes with null renderBuffer
     6        https://bugs.webkit.org/show_bug.cgi?id=37963
     7
     8        * html/canvas/WebGLRenderingContext.cpp:
     9        (WebCore::WebGLRenderingContext::framebufferRenderbuffer): Dealing with null renderbuffer input.
     10
    1112010-04-22  Zhenyao Mo  <zmo@google.com>
    212
  • trunk/WebCore/html/canvas/WebGLRenderingContext.cpp

    r58102 r58103  
    814814        return;
    815815    }
    816     if (buffer->object()) {
     816    if (buffer && buffer->object()) {
    817817        bool isConflicted = false;
    818818        bool isDepthOrStencil = true;
Note: See TracChangeset for help on using the changeset viewer.