12012-06-20 Jeff Timanus <twiz@chromium.org>
2
3 [Chromium] Change implementing a fast-path for copying GPU-accelerated Canvas2D instances to WebGL textures.
4 https://bugs.webkit.org/show_bug.cgi?id=86275
5
6 This change adds the necessary plumbing to the various rendering contexts to copy the backing store texture of a Canvas2D
7 instance to be copied to a WebGL texture. The GL_CHROMIUM_copy_texture extension is necessary because the backing-store
8 for a GPU-accelerated skia Canvas2D is normally in BGRA format, which is not supported by glCopyTexImage.
9
10 Reviewed by NOBODY (OOPS!).
11
12 Test: fast/canvas/webgl/*
13
14 * html/canvas/WebGLRenderingContext.cpp:
15 (WebCore):
16 (WebCore::WebGLRenderingContext::texImage2D):
17 * platform/chromium/support/Extensions3DChromium.cpp:
18 (WebCore::Extensions3DChromium::copyTextureCHROMIUM):
19 (WebCore):
20 * platform/graphics/Extensions3D.h:
21 (Extensions3D):
22 * platform/graphics/ImageBuffer.cpp:
23 (WebCore):
24 (WebCore::ImageBuffer::copyToPlatformTexture):
25 * platform/graphics/ImageBuffer.h:
26 (WebCore):
27 (ImageBuffer):
28 * platform/graphics/chromium/Canvas2DLayerBridge.cpp:
29 (WebCore::Canvas2DLayerBridge::backBufferTexture):
30 (WebCore):
31 * platform/graphics/chromium/Canvas2DLayerBridge.h:
32 (Canvas2DLayerBridge):
33 * platform/graphics/chromium/Extensions3DChromium.h:
34 (Extensions3DChromium):
35 * platform/graphics/opengl/Extensions3DOpenGL.cpp:
36 (WebCore::Extensions3DOpenGL::copyTextureCHROMIUM):
37 (WebCore):
38 * platform/graphics/opengl/Extensions3DOpenGL.h:
39 (Extensions3DOpenGL):
40 * platform/graphics/qt/Extensions3DQt.cpp:
41 (WebCore::Extensions3DQt::copyTextureCHROMIUM):
42 (WebCore):
43 * platform/graphics/qt/Extensions3DQt.h:
44 (Extensions3DQt):
45 * platform/graphics/skia/ImageBufferSkia.cpp:
46 (WebCore::ImageBuffer::platformLayer):
47 (WebCore):
48 (WebCore::ImageBuffer::copyToPlatformTexture):
49