[EFL][WK2][AC] Use smart pointers for Evas_GL types
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 Oct 2012 16:48:33 +0000 (16:48 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 Oct 2012 16:48:33 +0000 (16:48 +0000)
commitb1625316e71a4b18bb0907febc27258e897a5711
tree4ac21d77ab5c3e4656f6173bed6950ab5d9ada2f
parentb74553398d107bb20e37b7d991e1fc2393222026
[EFL][WK2][AC] Use smart pointers for Evas_GL types
https://bugs.webkit.org/show_bug.cgi?id=100745

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-10-31
Reviewed by Kenneth Rohde Christiansen.

Source/WebKit2:

Replace raw pointers to Evas_GL, Evas_GL_Context and
Evas_GL_Surface by smart pointers in EwkViewImpl.

C++ wrappers were added for Evas_GL_Context and
Evas_GL_Surface in order to use OwnPtr. This is needed
because their destroy functions need the Evas_GL.

* PlatformEfl.cmake:
* UIProcess/API/efl/EvasGLContext.cpp: Added.
(WebKit):
(WebKit::EvasGLContext::EvasGLContext):
(WebKit::EvasGLContext::~EvasGLContext):
* UIProcess/API/efl/EvasGLContext.h: Added.
(WebKit):
(EvasGLContext):
(WebKit::EvasGLContext::create):
(WebKit::EvasGLContext::context):
* UIProcess/API/efl/EvasGLSurface.cpp: Added.
(WebKit):
(WebKit::EvasGLSurface::EvasGLSurface):
(WebKit::EvasGLSurface::~EvasGLSurface):
* UIProcess/API/efl/EvasGLSurface.h: Added.
(WebKit):
(EvasGLSurface):
(WebKit::EvasGLSurface::create):
(WebKit::EvasGLSurface::surface):
* UIProcess/API/efl/EwkViewImpl.cpp:
(EwkViewImpl::EwkViewImpl):
(EwkViewImpl::displayTimerFired):
(EwkViewImpl::createGLSurface):
(EwkViewImpl::enterAcceleratedCompositingMode):
(EwkViewImpl::exitAcceleratedCompositingMode):
* UIProcess/API/efl/EwkViewImpl.h:
(EwkViewImpl::evasGL):
(EwkViewImpl::evasGLContext):
(EwkViewImpl::evasGLSurface):
(EwkViewImpl::resetEvasGLSurface):
(EwkViewImpl):
* UIProcess/API/efl/ewk_view.cpp:
(_ewk_view_smart_calculate):

Source/WTF:

Make OwnPtr usable with Evas_GL type to avoid handling
raw pointers in EFL port.

* wtf/OwnPtrCommon.h:
(WTF):
* wtf/efl/OwnPtrEfl.cpp:
(WTF):
(WTF::deleteOwnedPtr):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@133041 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Source/WTF/ChangeLog
Source/WTF/wtf/OwnPtrCommon.h
Source/WTF/wtf/efl/OwnPtrEfl.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/PlatformEfl.cmake
Source/WebKit2/UIProcess/API/efl/EvasGLContext.cpp [new file with mode: 0644]
Source/WebKit2/UIProcess/API/efl/EvasGLContext.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/efl/EvasGLSurface.cpp [new file with mode: 0644]
Source/WebKit2/UIProcess/API/efl/EvasGLSurface.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp
Source/WebKit2/UIProcess/API/efl/EwkViewImpl.h
Source/WebKit2/UIProcess/API/efl/ewk_view.cpp