Support hw accelerated rendering on emulator
authorStanislav Vorobiov <s.vorobiov@samsung.com>
Fri, 29 Nov 2013 14:27:29 +0000 (18:27 +0400)
committerJoone Hur <joone.hur@intel.com>
Tue, 10 Dec 2013 21:54:54 +0000 (13:54 -0800)
Related to TIVI-2226

Change-Id: I40af0529a5ebf358a3817afb9342b5f68099a501
Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
15 files changed:
Source/WTF/wtf/Platform.h
Source/WebCore/PlatformTizen.cmake
Source/WebCore/platform/graphics/surfaces/egl/EGLSurface.h
Source/WebCore/platform/graphics/surfaces/wayland/WaylandBufferManager.cpp
Source/WebCore/platform/graphics/surfaces/wayland/WaylandBufferManager.h
Source/WebCore/platform/graphics/surfaces/wayland/WaylandDisplay.cpp
Source/WebCore/platform/graphics/surfaces/wayland/WaylandMesaBufferManager.cpp
Source/WebCore/platform/graphics/surfaces/wayland/WaylandMesaBufferManager.h
Source/WebCore/platform/graphics/surfaces/wayland/WaylandPlatformExt.h [new file with mode: 0644]
Source/WebCore/platform/graphics/surfaces/wayland/WaylandVIGSBufferManager.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/surfaces/wayland/WaylandVIGSBufferManager.h [new file with mode: 0644]
Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp
Source/cmake/FindWayland.cmake
Source/cmake/OptionsTizen.cmake
packaging/webkit2-efl.spec

index 9db615f..3f4395f 100644 (file)
@@ -736,7 +736,7 @@ com) : Patch to do not adjust cover rect as fixed pixel size*/
 #define ENABLE_TIZEN_2D_CANVAS_JS_SUSPEND 0 /* Hyunki Baik(hyunki.baik@samsung.com):  Suspend JavasScript during UIProcess access the shared platformSurface for 2D Canvas */
 #endif
 
-#if !USE(MESA)
+#if !USE(MESA) && !(ENABLE(TIZEN_EMULATOR) && PLATFORM(WAYLAND))
 #define ENABLE_TIZEN_DDK_WORKAROUND 1 /* kalyan.kondapally@intel.com  WorkAround in AcceleratedPlatformLayer for ddk issues*/
 #endif
 
index 30511ab..e3e1ccb 100755 (executable)
@@ -245,6 +245,10 @@ IF (WTF_USE_ACCELERATED_COMPOSITING AND ENABLE_WEBKIT2)
             LIST(APPEND WebCore_SOURCES
             platform/graphics/surfaces/wayland/WaylandMesaBufferManager.cpp
         )
+        ELSEIF (ENABLE_TIZEN_EMULATOR)
+            LIST(APPEND WebCore_SOURCES
+            platform/graphics/surfaces/wayland/WaylandVIGSBufferManager.cpp
+        )
         ENDIF()
     ENDIF()
 ENDIF()
index 36d5dd4..9372d82 100644 (file)
 #define EGL_EGLEXT_PROTOTYPES 1
 #include <EGL/egl.h>
 #include <EGL/eglext.h>
-
-#if PLATFORM(WAYLAND) && USE(MESA)
-#include <EGL/eglmesaext.h>
-#endif
+#include "WaylandPlatformExt.h"
 
 #define GL_GLEXT_PROTOTYPES 1
 #if USE(OPENGL_ES_2)
index f85ec21..6cf2b62 100644 (file)
 #include "config.h"
 #include "WaylandBufferManager.h"
 
-#ifdef USE(MESA)
+#if USE(MESA)
 #include "WaylandMesaBufferManager.h"
+#elif ENABLE(TIZEN_EMULATOR)
+#include "WaylandVIGSBufferManager.h"
 #endif
 
 namespace WebCore {
 
 WaylandBufferManager* WaylandBufferManager::create(int fd)
 {
-#ifdef USE(MESA)
+#if USE(MESA)
     return new WaylandMesaBufferManager(fd);
+#elif ENABLE(TIZEN_EMULATOR)
+    return new WaylandVIGSBufferManager(fd);
 #else
-    return nullptr;
+    return NULL;
 #endif
 }
 
index 30e30d6..0d6980a 100644 (file)
@@ -35,7 +35,7 @@ public:
     static WaylandBufferManager* create(int);
     WaylandBufferManager() { }
     virtual ~WaylandBufferManager() { }
-    virtual int allocateBO(unsigned, unsigned, uint32_t*) = 0;
+    virtual int allocateBO(unsigned, unsigned, unsigned, unsigned, unsigned, uint32_t*) = 0;
     virtual bool lockSurface(unsigned) = 0;
     virtual bool unlockSurface(unsigned) = 0;
     virtual bool querySurface(unsigned, int**) = 0;
index 64756c8..e96eb72 100644 (file)
@@ -42,9 +42,7 @@
 #include <wtf/text/StringBuilder.h>
 #include <wtf/text/WTFString.h>
 #include <libdrm/drm.h>
-#ifdef USE(MESA)
 #include <xf86drm.h>
-#endif
 
 // os-compatibility
 static struct wl_drm* m_drm = 0;
@@ -693,7 +691,7 @@ void* WaylandDisplay::createDrmBuffer(int width, int height, int* drmHandle)
     total = stride * height;
     offset = align(total, 4096);
     total = offset + (width * height) / 2;
-    *drmHandle = m_bufmgr->allocateBO(total, 0, &name);
+    *drmHandle = m_bufmgr->allocateBO(width, height, stride, total, 0, &name);
     buffer =  wl_drm_create_buffer(m_drm, name, width, height, stride, WL_DRM_FORMAT_ARGB8888);
 
     return buffer;
index 6c79707..653eed4 100644 (file)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "WaylandMesaBufferManager.h"
 
-#ifdef USE(MESA)
+#if USE(MESA)
 #include <wtf/text/CString.h>
 #include <wtf/text/StringBuilder.h>
 #include <wtf/text/WTFString.h>
@@ -45,7 +45,7 @@ WaylandMesaBufferManager::~WaylandMesaBufferManager()
         drm_intel_bufmgr_destroy(m_bufferManager);
 }
 
-int WaylandMesaBufferManager::allocateBO(unsigned size, unsigned alignment, uint32_t* fd)
+int WaylandMesaBufferManager::allocateBO(unsigned width, unsigned height, unsigned stride, unsigned size, unsigned alignment, uint32_t* fd)
 {
     static int allocationId = 0;
     allocationId++;
index d982314..4786ffb 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef WaylandMesaBufferManager_h
 #define WaylandMesaBufferManager_h
 
-#ifdef USE(MESA)
+#if USE(MESA)
 #include "WaylandBufferManager.h"
 #include <wtf/HashMap.h>
 
@@ -40,7 +40,7 @@ class WaylandMesaBufferManager : public WaylandBufferManager {
 public:
     explicit WaylandMesaBufferManager(int);
     virtual ~WaylandMesaBufferManager();
-    virtual int allocateBO(unsigned, unsigned, uint32_t*) OVERRIDE;
+    virtual int allocateBO(unsigned, unsigned, unsigned, unsigned, unsigned, uint32_t*) OVERRIDE;
     virtual bool lockSurface(unsigned) OVERRIDE;
     virtual bool unlockSurface(unsigned) OVERRIDE;
     virtual bool querySurface(unsigned, int**) OVERRIDE;
diff --git a/Source/WebCore/platform/graphics/surfaces/wayland/WaylandPlatformExt.h b/Source/WebCore/platform/graphics/surfaces/wayland/WaylandPlatformExt.h
new file mode 100644 (file)
index 0000000..08d035c
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WaylandPlatformExt_h
+#define WaylandPlatformExt_h
+
+#if PLATFORM(WAYLAND)
+
+#if USE(MESA)
+#include <EGL/eglmesaext.h>
+#else
+#include <EGL/eglplatform.h>
+
+#ifndef EGL_WL_bind_wayland_display
+
+#if !defined(EGL_WAYLAND_BUFFER_WL)
+#define EGL_WAYLAND_BUFFER_WL 0x31D5
+#endif
+
+#if !defined(EGL_WAYLAND_PLANE_WL)
+#define EGL_WAYLAND_PLANE_WL 0x31D6
+#endif
+
+#if !defined(EGL_TEXTURE_Y_U_V_WL)
+#define EGL_TEXTURE_Y_U_V_WL 0x31D7
+#endif
+
+#if !defined(EGL_TEXTURE_Y_UV_WL)
+#define EGL_TEXTURE_Y_UV_WL 0x31D8
+#endif
+
+#if !defined(EGL_TEXTURE_Y_XUXV_WL)
+#define EGL_TEXTURE_Y_XUXV_WL 0x31D9
+#endif
+
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYWAYLANDBUFFERWL) (EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value);
+#endif
+#endif
+
+#endif
+
+#endif
diff --git a/Source/WebCore/platform/graphics/surfaces/wayland/WaylandVIGSBufferManager.cpp b/Source/WebCore/platform/graphics/surfaces/wayland/WaylandVIGSBufferManager.cpp
new file mode 100644 (file)
index 0000000..90a04a1
--- /dev/null
@@ -0,0 +1,133 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WaylandVIGSBufferManager.h"
+
+namespace WebCore {
+
+WaylandVIGSBufferManager::WaylandVIGSBufferManager(int fd)
+    : WaylandBufferManager()
+{
+    int ret = vigs_drm_device_create(fd, &m_device);
+
+    if (ret != 0) {
+        LOG_ERROR("Failed to Create Drm Device - %d.", ret);
+        m_device = NULL;
+    }
+}
+
+WaylandVIGSBufferManager::~WaylandVIGSBufferManager()
+{
+    vigs_drm_device_destroy(m_device);
+}
+
+int WaylandVIGSBufferManager::allocateBO(unsigned width, unsigned height, unsigned stride, unsigned size, unsigned alignment, uint32_t* fd)
+{
+    static int allocationId = 0;
+    allocationId++;
+    vigs_drm_surface* sfc;
+    int ret = vigs_drm_surface_create(m_device,
+                                      width,
+                                      height,
+                                      stride,
+                                      vigs_drm_surface_bgra8888,
+                                      &sfc);
+
+    if (ret != 0) {
+        LOG_ERROR("Failed to Allocate Drm Buffer - %d.", ret);
+        return 0;
+    }
+
+    ret = vigs_drm_gem_map(&sfc->gem, 1);
+
+    if (ret != 0) {
+        LOG_ERROR("Failed to Map Drm Buffer - %d.", ret);
+        vigs_drm_gem_unref(&sfc->gem);
+        return 0;
+    }
+
+    ret = vigs_drm_gem_get_name(&sfc->gem);
+
+    if (ret != 0) {
+        LOG_ERROR("Failed to Get Drm Buffer Name - %d.", ret);
+        vigs_drm_gem_unref(&sfc->gem);
+        return 0;
+    }
+
+    if (fd)
+        *fd = sfc->gem.name;
+
+    m_surfaces.add(allocationId, sfc);
+
+    return allocationId;
+}
+
+void WaylandVIGSBufferManager::freeBO(unsigned handleId)
+{
+    SurfaceMap::iterator it = m_surfaces.find(handleId);
+    if (it != m_surfaces.end()) {
+        vigs_drm_gem_unref(&it->second->gem);
+
+        m_surfaces.remove(it);
+    }
+}
+
+bool WaylandVIGSBufferManager::lockSurface(unsigned handleId)
+{
+    SurfaceMap::iterator it = m_surfaces.find(handleId);
+    if (it != m_surfaces.end()) {
+        vigs_drm_surface_start_access(it->second,
+                                      VIGS_DRM_SAF_WRITE);
+        return true;
+    }
+
+    return false;
+}
+
+bool WaylandVIGSBufferManager::unlockSurface(unsigned handleId)
+{
+    SurfaceMap::iterator it = m_surfaces.find(handleId);
+    if (it != m_surfaces.end()) {
+        vigs_drm_surface_end_access(it->second, 1);
+        return true;
+    }
+
+    return false;
+}
+
+bool WaylandVIGSBufferManager::querySurface(unsigned handleId, int** value)
+{
+    SurfaceMap::iterator it = m_surfaces.find(handleId);
+    if (it == m_surfaces.end()) {
+        return false;
+    }
+
+    *value = (int*)it->second->gem.vaddr;
+
+    return true;
+}
+
+}
diff --git a/Source/WebCore/platform/graphics/surfaces/wayland/WaylandVIGSBufferManager.h b/Source/WebCore/platform/graphics/surfaces/wayland/WaylandVIGSBufferManager.h
new file mode 100644 (file)
index 0000000..74ff16e
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WaylandVIGSBufferManager_h
+#define WaylandVIGSBufferManager_h
+
+#include "WaylandBufferManager.h"
+#include <wtf/HashMap.h>
+#include <vigs.h>
+
+namespace WebCore {
+
+class WaylandVIGSBufferManager : public WaylandBufferManager {
+public:
+    explicit WaylandVIGSBufferManager(int fd);
+    virtual ~WaylandVIGSBufferManager();
+    virtual int allocateBO(unsigned width, unsigned height, unsigned stride, unsigned size, unsigned alignment, uint32_t* fd) OVERRIDE;
+    virtual bool lockSurface(unsigned handleId) OVERRIDE;
+    virtual bool unlockSurface(unsigned handleId) OVERRIDE;
+    virtual bool querySurface(unsigned handleId, int** value) OVERRIDE;
+    virtual void freeBO(unsigned handleId) OVERRIDE;
+private:
+    typedef HashMap<int, vigs_drm_surface*> SurfaceMap;
+
+    vigs_drm_device* m_device;
+    SurfaceMap m_surfaces;
+};
+
+}
+
+#endif
index 42e404f..21512a5 100755 (executable)
@@ -60,9 +60,7 @@
 #if PLATFORM(WAYLAND)
 #include <EGL/egl.h>
 #include <EGL/eglext.h>
-#if USE(MESA)
-#include <EGL/eglmesaext.h>
-#endif
+#include "WaylandPlatformExt.h"
 #endif
 
 #define GL_CMD(...) do { __VA_ARGS__; ASSERT_ARG(__VA_ARGS__, !glGetError()); } while (0)
index cbae174..ae13625 100644 (file)
@@ -44,8 +44,13 @@ FIND_LIBRARY(WAYLAND_EGL_LIBRARY NAMES wayland-egl HINTS ${WAYLAND_PKG_LIBRARY_D
 FIND_LIBRARY(WAYLAND_GBM_LIBRARY NAMES gbm PATHS /usr/lib)
 
 FIND_LIBRARY(WAYLAND_DRM_INTEL_LIBRARY NAMES DRM_INTEL drm_intel PATHS /usr/lib)
+IF (ENABLE_TIZEN_EMULATOR)
+    FIND_LIBRARY(WAYLAND_DRM_VIGS_LIBRARY NAMES DRM_VIGS drm_vigs PATHS /usr/lib)
+ELSE ()
+    SET(WAYLAND_DRM_VIGS_LIBRARY "")
+ENDIF ()
 
-SET(WAYLAND_LIBRARIES ${WAYLAND_CLIENT_LIBRARY} ${WAYLAND_EGL_LIBRARY} ${WAYLAND_GBM_LIBRARY} ${WAYLAND_DRM_INTEL_LIBRARY})
+SET(WAYLAND_LIBRARIES ${WAYLAND_CLIENT_LIBRARY} ${WAYLAND_EGL_LIBRARY} ${WAYLAND_GBM_LIBRARY} ${WAYLAND_DRM_INTEL_LIBRARY} ${WAYLAND_DRM_VIGS_LIBRARY})
 SET(WAYLAND_INCLUDE_DIRS ${WAYLAND_CLIENT_INCLUDE_DIR} ${WAYLAND_EGL_INCLUDE_DIR} ${WAYLAND_DRM_INCLUDE_DIR})
 list(REMOVE_DUPLICATES WAYLAND_INCLUDE_DIRS)
 
index a4d3393..3566ae8 100644 (file)
@@ -315,11 +315,6 @@ IF (WTF_USE_TILED_BACKING_STORE)
     ADD_DEFINITIONS(-DWTF_USE_TEXTURE_MAPPER=1)
 ENDIF ()
 
-IF (ENABLE_TIZEN_GSTREAMER_VIDEO_SET_SINK AND NOT ("${EFL_TARGET}" STREQUAL "i386"))
-    SET(WTF_USE_TIZEN_GSTREAMER_VIDEO_SET_SINK 1)
-    ADD_DEFINITIONS(-DWTF_USE_TIZEN_GSTREAMER_VIDEO_SET_SINK=1)
-ENDIF ()
-
 IF ("${EFL_TARGET}" STREQUAL "i386")
     MESSAGE("i386 target Build Mode <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<")
     ADD_DEFINITIONS(-DENABLE_TIZEN_WEBKIT2_DIRECT_RENDERING=1)
@@ -334,6 +329,7 @@ ELSEIF ("${EFL_TARGET}" STREQUAL "emulator")
     ADD_DEFINITIONS(-DENABLE_TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE=1)
     SET(ENABLE_TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE 1)
     ADD_DEFINITIONS(-DENABLE_TIZEN_EMULATOR=1)
+    SET(ENABLE_TIZEN_EMULATOR 1)
 ELSE ()
     ADD_DEFINITIONS(-DENABLE_TIZEN_WEBKIT2_DIRECT_RENDERING=1)
     SET(ENABLE_TIZEN_WEBKIT2_DIRECT_RENDERING 1)
@@ -423,6 +419,16 @@ ELSE ()
     FIND_PACKAGE(Wayland REQUIRED)
     ADD_DEFINITIONS(-DWTF_PLATFORM_WAYLAND=1)
     SET(WTF_PLATFORM_WAYLAND 1)
+    IF (ENABLE_TIZEN_EMULATOR)
+        ADD_DEFINITIONS(-DWTF_USE_ACCELERATED_VIDEO_VAAPI=1)
+    ENDIF ()
+ENDIF ()
+
+IF (ENABLE_TIZEN_GSTREAMER_VIDEO_SET_SINK AND NOT ("${EFL_TARGET}" STREQUAL "i386"))
+    IF (ENABLE_ECORE_X OR NOT ENABLE_TIZEN_EMULATOR)
+        SET(WTF_USE_TIZEN_GSTREAMER_VIDEO_SET_SINK 1)
+        ADD_DEFINITIONS(-DWTF_USE_TIZEN_GSTREAMER_VIDEO_SET_SINK=1)
+    ENDIF ()
 ENDIF ()
 
 IF (USE_MESA)
index 8b3ae41..9d398ce 100644 (file)
@@ -72,12 +72,20 @@ BuildRequires: pkgconfig(xext)
 BuildRequires: pkgconfig(libavcodec)
 BuildRequires: pkgconfig(tts)
 BuildRequires: pkgconfig(capi-system-power)
+%if 0%{?simulator}
+%if %{with wayland}
+BuildRequires: pkgconfig(glesv2)
+%else
+BuildRequires: pkgconfig(gles20)
+%endif
+%else
 %if %{with mesa}
 BuildRequires: pkgconfig(gl)
 BuildRequires: pkgconfig(glesv2)
 %else
 BuildRequires: pkgconfig(gles20)
 %endif
+%endif
 BuildRequires: pkgconfig(egl)
 
 %if %{with wayland}
@@ -182,8 +190,10 @@ then
        $ECORE_X \
        $ENABLE_LLINT \
 %if %{with mesa}
+%if !0%{?simulator}
         -DUSE_MESA=On \
 %endif
+%endif
 %if %{with desktop}
        -DENABLE_TIZEN_DESKTOP_BROWSING=On \
 %endif