[EFL][WebGL] Refactor GLPlatformSurface.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 Feb 2013 16:55:20 +0000 (16:55 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 Feb 2013 16:55:20 +0000 (16:55 +0000)
commite025a632ecadfbe2c450b7a4bf4c9bdab8b2bc8d
tree132429336f250a31008e916644d7379afe4a95fc
parent490ef1aa72c1086588dcfe02d0eea2a2a4710736
[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: https://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