[EFL][WebGL] Refactor GLPlatformSurface.
authorcommit-queue <commit-queue@webkit.org>
Sat, 23 Feb 2013 16:55:20 +0000 (16:55 +0000)
committercommit-queue <commit-queue@webkit.org>
Sat, 23 Feb 2013 16:55:20 +0000 (16:55 +0000)
commit31594efd71cf8e70548b992859d737fa571129ff
tree132429336f250a31008e916644d7379afe4a95fc
parentef9afe7784748d80c88df33e1ea06a8ab2d61e91
[EFL][WebGL] Refactor GLPlatformSurface.
https://bugs.webkit.org/show_bug.cgi?id=110616

Patch by Kondapally Kalyan <kalyan.kondapally@intel.com> on 2013-02-23
Reviewed by Kenneth Rohde Christiansen.

Covered by existing WebGL tests.

With recent changes, there is a clear separation between
transport surface and off-screen surface. PlatformSurface
has the logic to render content to transport surface.
We currently rely on EXT_framebuffer_blit for this. This
extension is not exposed on GLES2.0. PlatformSurface was
supposed to be an abstraction layer without any knowledge
of the type of surface. This patch addresses the issues
in PlatformSurface class. We use shaders to draw texture
content to the surface. Any transport surface related
code in PlatformSurface is moved to GLTransportSurface class.

* PlatformEfl.cmake:
* platform/graphics/efl/GraphicsContext3DPrivate.cpp:
(WebCore::GraphicsContext3DPrivate::didResizeCanvas):
* platform/graphics/surfaces/GLTransportSurface.cpp: Added.
(WebCore):
(WebCore::GLTransportSurface::GLTransportSurface):
(WebCore::GLTransportSurface::~GLTransportSurface):
(WebCore::GLTransportSurface::updateContents):
(WebCore::GLTransportSurface::setGeometry):
(WebCore::GLTransportSurface::destroy):
(WebCore::GLTransportSurface::draw):
(WebCore::GLTransportSurface::bindArrayBuffer):
(WebCore::GLTransportSurface::updateTransformationMatrix):
(WebCore::GLTransportSurface::initializeShaderProgram):
* platform/graphics/surfaces/GLTransportSurface.h:
(WebCore):
(GLTransportSurface):
* platform/graphics/surfaces/egl/EGLSurface.cpp:
(WebCore::EGLWindowTransportSurface::EGLWindowTransportSurface):
(WebCore::EGLWindowTransportSurface::destroy):
(WebCore::EGLWindowTransportSurface::setGeometry):
* platform/graphics/surfaces/egl/EGLSurface.h:
* platform/graphics/surfaces/glx/GLXSurface.cpp:
(WebCore::GLXTransportSurface::GLXTransportSurface):
(WebCore::GLXTransportSurface::setGeometry):
(WebCore::GLXTransportSurface::destroy):
(WebCore::GLXOffScreenSurface::freeResources):
* platform/graphics/surfaces/glx/GLXSurface.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143842 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/PlatformEfl.cmake
Source/WebCore/platform/graphics/efl/GraphicsContext3DPrivate.cpp
Source/WebCore/platform/graphics/opengl/GLPlatformSurface.cpp
Source/WebCore/platform/graphics/opengl/GLPlatformSurface.h
Source/WebCore/platform/graphics/surfaces/GLTransportSurface.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/surfaces/GLTransportSurface.h [new file with mode: 0644]
Source/WebCore/platform/graphics/surfaces/egl/EGLSurface.cpp
Source/WebCore/platform/graphics/surfaces/egl/EGLSurface.h
Source/WebCore/platform/graphics/surfaces/glx/GLXSurface.cpp
Source/WebCore/platform/graphics/surfaces/glx/GLXSurface.h