2010-12-23 Zhenyao Mo <zmo@google.com>
authorzmo@google.com <zmo@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Dec 2010 21:35:20 +0000 (21:35 +0000)
committerzmo@google.com <zmo@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Dec 2010 21:35:20 +0000 (21:35 +0000)
commit5ae3f6839626b0e9c2e93ec69c1fd9ead8909b1e
tree70f3ed5f2b6d78e728762908e44fbd5196a9ea96
parentfbdedd400054908e94138160d3a7f502e0c3d0b6
2010-12-23  Zhenyao Mo  <zmo@google.com>

        Reviewed by Kenneth Russell.

        Initialize to 0 for undefined values in CopyTexImage2D
        https://bugs.webkit.org/show_bug.cgi?id=51421

        * src/GraphicsContext3DChromium.cpp: Implement getInternalFramebufferSize().
        (WebCore::GraphicsContext3DInternal::getInternalFramebufferSize):
        * src/GraphicsContext3DInternal.h:
2010-12-23  Zhenyao Mo  <zmo@google.com>

        Reviewed by Kenneth Russell.

        Initialize to 0 for undefined values in CopyTexImage2D
        https://bugs.webkit.org/show_bug.cgi?id=51421

        * html/canvas/WebGLFramebuffer.cpp: Track width/height/internalFormat of color buffer.
        (WebCore::WebGLFramebuffer::WebGLFramebuffer):
        (WebCore::WebGLFramebuffer::setAttachment):
        (WebCore::WebGLFramebuffer::getWidth):
        (WebCore::WebGLFramebuffer::getHeight):
        (WebCore::WebGLFramebuffer::getColorBufferFormat):
        * html/canvas/WebGLFramebuffer.h:
        * html/canvas/WebGLRenderingContext.cpp:
        (WebCore::WebGLRenderingContext::copyTexImage2D): Initialize undefined pixels to 0.
        (WebCore::WebGLRenderingContext::copyTexSubImage2D):
        (WebCore::WebGLRenderingContext::framebufferTexture2D):
        (WebCore::WebGLRenderingContext::renderbufferStorage):
        (WebCore::WebGLRenderingContext::getBoundFramebufferWidth):
        (WebCore::WebGLRenderingContext::getBoundFramebufferHeight):
        * html/canvas/WebGLRenderingContext.h:
        * html/canvas/WebGLTexture.cpp: Track width/height/internalFormat of a texture by target/level.
        (WebCore::WebGLTexture::getInternalFormat):
        (WebCore::WebGLTexture::getWidth):
        (WebCore::WebGLTexture::getHeight):
        (WebCore::WebGLTexture::mapTargetToIndex):
        (WebCore::WebGLTexture::getLevelInfo):
        * html/canvas/WebGLTexture.h:
        (WebCore::WebGLTexture::isTexture):
        * platform/graphics/GraphicsContext3D.h: Add getInternalFramebufferSize() function.
        * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
        (WebCore::GraphicsContext3D::getInternalFramebufferSize):
        * platform/graphics/qt/GraphicsContext3DQt.cpp:
        (WebCore::GraphicsContext3D::getInternalFramebufferSize):
2010-12-23  Zhenyao Mo  <zmo@google.com>

        Reviewed by Kenneth Russell.

        Initialize to 0 for undefined values in CopyTexImage2D
        https://bugs.webkit.org/show_bug.cgi?id=51421

        * fast/canvas/webgl/uninitialized-test-expected.txt: Add test cases for copyTexImage2D.
        * fast/canvas/webgl/uninitialized-test.html: Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74720 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/canvas/webgl/uninitialized-test-expected.txt
LayoutTests/fast/canvas/webgl/uninitialized-test.html
WebCore/ChangeLog
WebCore/html/canvas/WebGLFramebuffer.cpp
WebCore/html/canvas/WebGLFramebuffer.h
WebCore/html/canvas/WebGLRenderingContext.cpp
WebCore/html/canvas/WebGLRenderingContext.h
WebCore/html/canvas/WebGLTexture.cpp
WebCore/html/canvas/WebGLTexture.h
WebCore/platform/graphics/GraphicsContext3D.h
WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp
WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp
WebKit/chromium/ChangeLog
WebKit/chromium/src/GraphicsContext3DChromium.cpp
WebKit/chromium/src/GraphicsContext3DInternal.h