[Chromium] Change implementing a fast-path for copying GPU-accelerated Canvas2D insta...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Jun 2012 20:45:52 +0000 (20:45 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Jun 2012 20:45:52 +0000 (20:45 +0000)
commit31e788deaffa68f0dac10d82b053b439146b6d68
tree820281f5ad64f8e3393bba1dca0a521915cb6bdc
parent846978353aa8ae44220fa59eec083da82452804a
[Chromium] Change implementing a fast-path for copying GPU-accelerated Canvas2D instances to WebGL textures.
https://bugs.webkit.org/show_bug.cgi?id=86275

This change adds the necessary plumbing to the various rendering contexts to copy the backing store texture of
a Canvas2D instance to be copied to a WebGL texture.  The GL_CHROMIUM_copy_texture extension is necessary
because the backing-store for a GPU-accelerated skia Canvas2D is normally in BGRA format, which is not supported
by glCopyTexImage.

Patch by Jeff Timanus <twiz@chromium.org> on 2012-06-22
Reviewed by Kenneth Russell.

Source/Platform:

* chromium/public/WebGraphicsContext3D.h:
(WebGraphicsContext3D):
(WebKit::WebGraphicsContext3D::copyTextureCHROMIUM):

Source/WebCore:

Test: fast/canvas/webgl/*

* html/canvas/WebGLRenderingContext.cpp:
(WebCore):
(WebCore::WebGLRenderingContext::texImage2D):
* platform/chromium/support/Extensions3DChromium.cpp:
(WebCore::Extensions3DChromium::copyTextureCHROMIUM):
(WebCore):
* platform/graphics/Extensions3D.h:
(Extensions3D):
* platform/graphics/ImageBuffer.cpp:
(WebCore):
(WebCore::ImageBuffer::copyToPlatformTexture):
* platform/graphics/ImageBuffer.h:
(WebCore):
(ImageBuffer):
* platform/graphics/chromium/Canvas2DLayerBridge.cpp:
(WebCore::Canvas2DLayerBridge::backBufferTexture):
(WebCore):
* platform/graphics/chromium/Canvas2DLayerBridge.h:
(Canvas2DLayerBridge):
* platform/graphics/chromium/Extensions3DChromium.h:
(Extensions3DChromium):
* platform/graphics/opengl/Extensions3DOpenGL.cpp:
(WebCore::Extensions3DOpenGL::copyTextureCHROMIUM):
(WebCore):
* platform/graphics/opengl/Extensions3DOpenGL.h:
(Extensions3DOpenGL):
* platform/graphics/qt/Extensions3DQt.cpp:
(WebCore::Extensions3DQt::copyTextureCHROMIUM):
(WebCore):
* platform/graphics/qt/Extensions3DQt.h:
(Extensions3DQt):
* platform/graphics/skia/ImageBufferSkia.cpp:
(WebCore::ImageBuffer::copyToPlatformTexture):
(WebCore):

Source/WebKit/chromium:

* DEPS: Rolled chromium to 143630 to fix chromium-linux ews failures.

LayoutTests:

* platform/chromium/TestExpectations: Temporarily suppressed layout test, fast/canvas/webgl/gl-teximage.html until a rebaseline can be submitted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@121055 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/chromium/TestExpectations
Source/Platform/ChangeLog
Source/Platform/chromium/public/WebGraphicsContext3D.h
Source/WebCore/ChangeLog
Source/WebCore/html/canvas/WebGLRenderingContext.cpp
Source/WebCore/platform/chromium/support/Extensions3DChromium.cpp
Source/WebCore/platform/graphics/Extensions3D.h
Source/WebCore/platform/graphics/ImageBuffer.cpp
Source/WebCore/platform/graphics/ImageBuffer.h
Source/WebCore/platform/graphics/chromium/Canvas2DLayerBridge.cpp
Source/WebCore/platform/graphics/chromium/Canvas2DLayerBridge.h
Source/WebCore/platform/graphics/chromium/Extensions3DChromium.h
Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp
Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.h
Source/WebCore/platform/graphics/qt/Extensions3DQt.cpp
Source/WebCore/platform/graphics/qt/Extensions3DQt.h
Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/DEPS