2010-07-13 Zhenyao Mo <zmo@google.com>
authorzmo@google.com <zmo@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Jul 2010 01:00:28 +0000 (01:00 +0000)
committerzmo@google.com <zmo@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Jul 2010 01:00:28 +0000 (01:00 +0000)
commita8d5746ffd34f9b1c55260dff9196d5cb728f1bd
tree1427ad190fe9bd5b54ffef1f465fcddc3185b188
parent8bfd7026d71cf6b7e683cb2112232e4b192b8afc
2010-07-13  Zhenyao Mo  <zmo@google.com>

        Reviewed by Nate Chapin.

        WebGL rendering results must be made available to Canvas.toDataURL and 2D drawImage
        https://bugs.webkit.org/show_bug.cgi?id=34719

        * src/GraphicsContext3D.cpp:
        (WebCore::GraphicsContext3DInternal::paintRenderingResultsToCanvas): Implement paintRenderingResultsToCanvas().
        (WebCore::GraphicsContext3DInternal::beginPaint): Just use paintRenderingResultsToCanvas().
2010-07-13  Zhenyao Mo  <zmo@google.com>

        Reviewed by Nate Chapin.

        WebGL rendering results must be made available to Canvas.toDataURL and 2D drawImage
        https://bugs.webkit.org/show_bug.cgi?id=34719

        Tests: fast/canvas/webgl/canvas-test.html
               fast/canvas/webgl/gl-pixelstorei.html

        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::makeRenderingResultsAvailable): Paint the WebGL rendering results to canvas if it's 3d.
        (WebCore::HTMLCanvasElement::toDataURL): Paint the WebGL rendering results to canvas if it's 3d.
        * html/canvas/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::drawImage): Paint the WebGL rendering results to canvas if it's 3d before drawing.
        * html/canvas/WebGLRenderingContext.cpp:
        (WebCore::WebGLRenderingContext::markContextChanged): Mark it always for canvas2d.drawImage purpose.
        (WebCore::WebGLRenderingContext::paintRenderingResultsToCanvas): Paint the WebGL rendering results to canvas if it's dirty.
        * html/canvas/WebGLRenderingContext.h: Declare paintRenderingResultsToCanvas().
        * platform/graphics/GraphicsContext3D.h: Declare paintRenderingResultsToCanvas() & paintToCanvas().
        * platform/graphics/cg/GraphicsContext3DCG.cpp:
        (WebCore::GraphicsContext3D::paintToCanvas): Paint the rendered image pixels to the canvas.
        * platform/graphics/mac/GraphicsContext3DMac.mm:
        (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): Implement paintRenderingResultsToCanvas().
        * platform/graphics/qt/GraphicsContext3DQt.cpp:
        (WebCore::GraphicsContext3D::beginPaint): Just call paintRenderingResultsToCanvas().
        (WebCore::GraphicsContext3D::endPaint):
        (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): Implement paintRenderingResultsToCanvas().
2010-07-13  Zhenyao Mo  <zmo@google.com>

        Reviewed by Nate Chapin.

        WebGL rendering results must be made available to Canvas.toDataURL and 2D drawImage
        https://bugs.webkit.org/show_bug.cgi?id=34719

        * fast/canvas/webgl/canvas-test-expected.txt: Added.
        * fast/canvas/webgl/canvas-test.html: Added.
        * fast/canvas/webgl/gl-pixelstorei-expected.txt: Added.
        * fast/canvas/webgl/gl-pixelstorei.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@63502 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/canvas/webgl/canvas-test-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/webgl/canvas-test.html [new file with mode: 0644]
LayoutTests/fast/canvas/webgl/gl-pixelstorei-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/webgl/gl-pixelstorei.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/html/HTMLCanvasElement.cpp
WebCore/html/HTMLCanvasElement.h
WebCore/html/canvas/CanvasRenderingContext2D.cpp
WebCore/html/canvas/WebGLRenderingContext.cpp
WebCore/html/canvas/WebGLRenderingContext.h
WebCore/platform/graphics/GraphicsContext3D.h
WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp
WebCore/platform/graphics/mac/GraphicsContext3DMac.mm
WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp
WebKit/chromium/ChangeLog
WebKit/chromium/src/GraphicsContext3D.cpp