Remove not used code of SharedVideoPlatformSurfaceTizen.
authorYongGeol Jung <yg48.jung@samsung.com>
Mon, 6 May 2013 05:26:14 +0000 (14:26 +0900)
committerYongGeol Jung <yg48.jung@samsung.com>
Mon, 6 May 2013 05:26:14 +0000 (14:26 +0900)
[Title] Remove not used code of SharedVideoPlatformSurfaceTizen.
[Issue#] N/A
[Problem]
[Cause]
[Solution]

Change-Id: I1dac69df0ebf5b3cf8a268c118bad2006199fb11

Source/WebCore/platform/graphics/gstreamer/tizen/SharedVideoPlatformSurfaceTizen.cpp

index 0617193..044b166 100644 (file)
@@ -32,8 +32,6 @@
 #include "IntRect.h"
 #include <cairo.h>
 #include <cairo-xlib.h>
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
 
@@ -59,18 +57,12 @@ private:
     bool initialize(IntSize size);
     bool createPlatformSurface(IntSize size);
     bool destroyPlatformSurface();
-    bool createPlatformSurfaceSurface();
-    bool destroyPlatformSurfaceSurface();
-    void clearPlatformSurfaceSurface();
+    void clearPlatformSurface();
 
     int m_platformSurface;
     int m_nativeWindow;
     Display* m_nativeDisplay;
 
-    EGLDisplay m_eglDisplay;
-    EGLContext m_eglContext;
-    EGLSurface m_eglSurface;
-
     IntSize m_size;
     bool m_hasAlpha;
 };
@@ -87,9 +79,6 @@ VideoPlatformSurface::VideoPlatformSurface()
     : m_platformSurface(0)
     , m_nativeWindow(0)
     , m_nativeDisplay(0)
-    , m_eglDisplay(EGL_NO_DISPLAY)
-    , m_eglContext(EGL_NO_CONTEXT)
-    , m_eglSurface(EGL_NO_SURFACE)
     , m_size(IntSize())
     , m_hasAlpha(true)
 {
@@ -97,7 +86,6 @@ VideoPlatformSurface::VideoPlatformSurface()
 
 VideoPlatformSurface::~VideoPlatformSurface()
 {
-    destroyPlatformSurfaceSurface();
     destroyPlatformSurface();
 }
 
@@ -158,12 +146,9 @@ bool VideoPlatformSurface::initialize(IntSize size)
     if (!createPlatformSurface(size))
         return false;
 
-    if (!createPlatformSurfaceSurface())
-        return false;
-
     m_size = size;
 
-    clearPlatformSurfaceSurface();
+    clearPlatformSurface();
 
     return true;
 }
@@ -212,78 +197,7 @@ bool VideoPlatformSurface::destroyPlatformSurface()
     return true;
 }
 
-bool VideoPlatformSurface::createPlatformSurfaceSurface()
-{
-    m_eglDisplay = eglGetDisplay(m_nativeDisplay);
-    if (m_eglDisplay == EGL_NO_DISPLAY)
-        return false;
-
-    EGLint major, minor;
-    if (eglInitialize(m_eglDisplay, &major, &minor) != EGL_TRUE)
-        return false;
-
-    int i = 0;
-    EGLint configAttribs[32];
-    configAttribs[i++] = EGL_LEVEL;
-    configAttribs[i++] = 0;
-    // FIXME : Create PlatformSurface surface with RGB_565 when alpha is off. Graphics driver needs to be fixed first.
-    configAttribs[i++] = EGL_RED_SIZE;
-    configAttribs[i++] = 8;
-    configAttribs[i++] = EGL_GREEN_SIZE;
-    configAttribs[i++] = 8;
-    configAttribs[i++] = EGL_BLUE_SIZE;
-    configAttribs[i++] = 8;
-    configAttribs[i++] = EGL_ALPHA_SIZE;
-    configAttribs[i++] = m_hasAlpha ? 8 : 0;
-    configAttribs[i++] = EGL_MATCH_FORMAT_KHR;
-    configAttribs[i++] = EGL_FORMAT_RGBA_8888_EXACT_KHR;
-    configAttribs[i++] = EGL_SURFACE_TYPE;
-    configAttribs[i++] = EGL_PIXMAP_BIT | EGL_LOCK_SURFACE_BIT_KHR;
-    configAttribs[i++] = EGL_DEPTH_SIZE;
-    configAttribs[i++] = 0;
-    configAttribs[i++] = EGL_STENCIL_SIZE;
-    configAttribs[i++] = 0;
-    configAttribs[i++] = EGL_RENDERABLE_TYPE;
-    configAttribs[i++] = EGL_OPENGL_ES2_BIT;
-    configAttribs[i++] = EGL_NONE;
-
-    EGLConfig config;
-    EGLint configCount = 0;
-    if (eglChooseConfig(m_eglDisplay, configAttribs, &config, 1, &configCount) != EGL_TRUE)
-        return false;
-
-    EGLint contextAttribs[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE };
-    m_eglContext = eglCreateContext(m_eglDisplay, config, EGL_NO_CONTEXT, contextAttribs);
-    if( m_eglContext == EGL_NO_CONTEXT)
-        return false;
-
-    m_eglSurface = eglCreatePixmapSurface(m_eglDisplay, config, m_platformSurface, NULL);
-    if (m_eglSurface == EGL_NO_SURFACE)
-        return false;
-
-    return true;
-}
-
-bool VideoPlatformSurface::destroyPlatformSurfaceSurface()
-{
-    if (m_eglSurface) {
-        eglMakeCurrent(m_eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
-        eglDestroySurface(m_eglDisplay, m_eglSurface);
-        m_eglSurface = EGL_NO_SURFACE;
-    }
-
-    if (m_eglContext) {
-        eglMakeCurrent(m_eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
-        eglDestroyContext(m_eglDisplay, m_eglContext);
-        m_eglContext = EGL_NO_CONTEXT;
-    }
-
-    m_eglDisplay = EGL_NO_DISPLAY;
-
-    return true;
-}
-
-void VideoPlatformSurface::clearPlatformSurfaceSurface()
+void VideoPlatformSurface::clearPlatformSurface()
 {
     RefPtr<cairo_surface_t> surface = adoptRef(cairo_xlib_surface_create(m_nativeDisplay, m_platformSurface, DefaultVisual(m_nativeDisplay, DefaultScreen(m_nativeDisplay)), m_size.width(), m_size.height()));
     if (cairo_surface_status(surface.get()) != CAIRO_STATUS_SUCCESS)