Revert "Hardware Accelerated Video Playback doesn't work on IA"
authorkeonho07.kim <keonho07.kim@samsung.com>
Fri, 29 Mar 2013 02:42:41 +0000 (11:42 +0900)
committerkeonho07.kim <keonho07.kim@samsung.com>
Fri, 29 Mar 2013 02:42:41 +0000 (11:42 +0900)
This reverts commit c8d52f59fefa39533322223815b0c4825eda8324.

Note: this commit is reverted due to an immediate request from Samsung SCM team.
      We will test and verify this patch if everything works okay with this one.

Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h
Source/WebCore/platform/graphics/gstreamer/tizen/SharedVideoPlatformSurfaceTizen.cpp
Source/WebCore/platform/graphics/gstreamer/tizen/SharedVideoPlatformSurfaceTizen.h
Source/WebCore/platform/graphics/gstreamer/tizen/VideoLayerTizen.cpp
Source/WebCore/platform/graphics/gstreamer/tizen/VideoLayerTizen.h
Source/WebCore/platform/graphics/surfaces/tizen/GraphicsSurfaceTizen.cpp
Source/WebCore/platform/graphics/texmap/tizen/PlatformSurfaceTextureGL.cpp
Source/cmake/OptionsTizen.cmake

index ccb2212..2edd7b8 100755 (executable)
@@ -220,7 +220,7 @@ static void mediaPlayerPrivateRepaintCallback(WebKitVideoSink*, GstBuffer *buffe
     playerPrivate->triggerRepaint(buffer);
 }
 
-#if ENABLE(TIZEN_ACCELERATED_COMPOSITING) && USE(TIZEN_TEXTURE_MAPPER) && ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#if ENABLE(TIZEN_ACCELERATED_COMPOSITING) && USE(TIZEN_TEXTURE_MAPPER) && ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
 static GstBusSyncReply mediaPlayerPrivateSyncHandler(GstBus* bus, GstMessage* message, MediaPlayerPrivateGStreamer* playerPrivate)
 {
     // ignore anything but 'prepare-xid' message
@@ -780,7 +780,7 @@ void MediaPlayerPrivateGStreamer::notifyPlayerOfVideo()
 
     m_hasVideo = videoTracks > 0;
 
-#if ENABLE(TIZEN_ACCELERATED_COMPOSITING) && USE(TIZEN_TEXTURE_MAPPER) && ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#if ENABLE(TIZEN_ACCELERATED_COMPOSITING) && USE(TIZEN_TEXTURE_MAPPER) && ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
     int width;
     int height;
     if (gst_video_get_size(m_videoSinkPad.get(), &width, &height)) {
@@ -1835,7 +1835,7 @@ void MediaPlayerPrivateGStreamer::triggerRepaint(GstBuffer* buffer)
     g_return_if_fail(GST_IS_BUFFER(buffer));
     gst_buffer_replace(&m_buffer, buffer);
 #if ENABLE(TIZEN_ACCELERATED_COMPOSITING) && USE(TIZEN_TEXTURE_MAPPER)
-#if !ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#if !ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) || CPU(X86) || CPU(X86_64)
     if (m_videoSize.isEmpty())
         m_videoSize =  naturalSize();
     m_videoLayer->paintVideoLayer(m_videoSize);
@@ -2036,7 +2036,7 @@ void MediaPlayerPrivateGStreamer::setDownloadBuffering()
     GstPlayFlags flags;
 
     g_object_get(m_playBin.get(), "flags", &flags, NULL);
-#if ENABLE(TIZEN_ACCELERATED_COMPOSITING) && USE(TIZEN_TEXTURE_MAPPER) && ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#if ENABLE(TIZEN_ACCELERATED_COMPOSITING) && USE(TIZEN_TEXTURE_MAPPER) && ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
     flags = (GstPlayFlags)(flags | GST_PLAY_FLAG_NATIVE_VIDEO);
 #endif
     if (m_preload == MediaPlayer::Auto) {
@@ -2099,10 +2099,10 @@ void MediaPlayerPrivateGStreamer::createAudioSink()
 #if ENABLE(TIZEN_GSTREAMER_VIDEO)
 GstElement* MediaPlayerPrivateGStreamer::createVideoSink()
 {
-#if ENABLE(TIZEN_ACCELERATED_COMPOSITING) && USE(TIZEN_TEXTURE_MAPPER) && ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#if ENABLE(TIZEN_ACCELERATED_COMPOSITING) && USE(TIZEN_TEXTURE_MAPPER) && ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
     m_webkitVideoSink = m_videoLayer->createVideoSink();
     m_videoSinkPad = adoptGRef(gst_element_get_static_pad(m_webkitVideoSink, "sink"));
-#else // ENABLE(TIZEN_ACCELERATED_COMPOSITING) && USE(TIZEN_TEXTURE_MAPPER) && ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#else // ENABLE(TIZEN_ACCELERATED_COMPOSITING) && USE(TIZEN_TEXTURE_MAPPER) && ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
 #ifndef GST_API_VERSION_1
     m_webkitVideoSink = webkitVideoSinkNew(m_gstGWorld.get());
 #else
@@ -2110,7 +2110,7 @@ GstElement* MediaPlayerPrivateGStreamer::createVideoSink()
 #endif
     m_videoSinkPad = adoptGRef(gst_element_get_static_pad(m_webkitVideoSink, "sink"));
     g_signal_connect(m_webkitVideoSink, "repaint-requested", G_CALLBACK(mediaPlayerPrivateRepaintCallback), this);
-#endif // ENABLE(TIZEN_ACCELERATED_COMPOSITING) && USE(TIZEN_TEXTURE_MAPPER) && ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#endif // ENABLE(TIZEN_ACCELERATED_COMPOSITING) && USE(TIZEN_TEXTURE_MAPPER) && ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
 
 #ifndef GST_API_VERSION_1
     m_videoSinkBin = gst_bin_new("video-sink");
@@ -2214,7 +2214,7 @@ void MediaPlayerPrivateGStreamer::createGSTPlayBin()
     GRefPtr<GstBus> bus = webkitGstPipelineGetBus(GST_PIPELINE(m_playBin.get()));
     gst_bus_add_signal_watch(bus.get());
     g_signal_connect(bus.get(), "message", G_CALLBACK(mediaPlayerPrivateMessageCallback), this);
-#if ENABLE(TIZEN_ACCELERATED_COMPOSITING) && USE(TIZEN_TEXTURE_MAPPER) && ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#if ENABLE(TIZEN_ACCELERATED_COMPOSITING) && USE(TIZEN_TEXTURE_MAPPER) && ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
     gst_bus_set_sync_handler(bus.get(), GstBusSyncHandler(mediaPlayerPrivateSyncHandler), this);
 #endif
     gst_object_unref(bus.get());
@@ -2275,7 +2275,7 @@ PlatformLayer* MediaPlayerPrivateGStreamer::platformLayer() const
     return m_videoLayer->platformLayer();
 }
 
-#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
 void MediaPlayerPrivateGStreamer::paintCurrentFrameInContext(GraphicsContext* context, const IntRect& rect)
 {
     m_videoLayer->paintCurrentFrameInContext(context, rect);
@@ -2296,7 +2296,7 @@ void MediaPlayerPrivateGStreamer::xWindowIdPrepared(GstMessage* message)
     m_videoSize = size;
     m_videoLayer->setOverlay(size);
 }
-#endif // ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#endif // ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
 #endif // ENABLE(TIZEN_ACCELERATED_COMPOSITING) && USE(TIZEN_TEXTURE_MAPPER)
 
 #if ENABLE(TIZEN_WEBKIT2_PROXY)
index 6e9068a..9247187 100644 (file)
@@ -145,9 +145,9 @@ class MediaPlayerPrivateGStreamer : public MediaPlayerPrivateInterface
             virtual PlatformLayer* platformLayer() const;
 
             void xWindowIdPrepared(GstMessage*);
-#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
             virtual void paintCurrentFrameInContext(GraphicsContext*, const IntRect&);
-#endif // ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#endif // ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
 #endif // ENABLE(TIZEN_ACCELERATED_COMPOSITING) && USE(TIZEN_TEXTURE_MAPPER)
 
 #if ENABLE(TIZEN_WEBKIT2_PROXY)
index dc7536f..cdd2c40 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "config.h"
 
-#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
 
 #include "SharedVideoPlatformSurfaceTizen.h"
 #include "GraphicsContextPlatformPrivateCairo.h"
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
 
-#if ENABLE(TIZEN_CANVAS_GRAPHICS_SURFACE)
-#include "GraphicsSurface.h"
-#endif
-
 namespace WebCore {
 
 class VideoPlatformSurface {
@@ -50,7 +46,6 @@ public:
 
     int id() const { return m_platformSurface; }
     void paintCurrentFrameInContext(GraphicsContext*, const IntRect&);
-    bool hasAlpha() { return m_hasAlpha; }
 
 private:
     VideoPlatformSurface();
@@ -71,7 +66,6 @@ private:
     EGLSurface m_eglSurface;
 
     IntSize m_size;
-    bool m_hasAlpha;
 };
 
 PassOwnPtr<VideoPlatformSurface> VideoPlatformSurface::create(IntSize size)
@@ -90,7 +84,6 @@ VideoPlatformSurface::VideoPlatformSurface()
     , m_eglContext(EGL_NO_CONTEXT)
     , m_eglSurface(EGL_NO_SURFACE)
     , m_size(IntSize())
-    , m_hasAlpha(true)
 {
 }
 
@@ -152,15 +145,10 @@ bool VideoPlatformSurface::createPlatformSurface(IntSize size)
 
     XSync(m_nativeDisplay, false);
 
-    int visualDepth = XDefaultDepth(m_nativeDisplay, DefaultScreen(m_nativeDisplay));
-    m_platformSurface = XCreatePixmap(m_nativeDisplay, m_nativeWindow, size.width(), size.height(), visualDepth);
+    m_platformSurface = XCreatePixmap(m_nativeDisplay, m_nativeWindow, size.width(), size.height(), XDefaultDepth(m_nativeDisplay, DefaultScreen(m_nativeDisplay)));
 
     XFlush(m_nativeDisplay);
 
-#if USE(ACCELERATED_VIDEO_VAAPI)
-    m_hasAlpha = visualDepth == 32 ?  true : false;
-#endif
-
     return true;
 }
 
@@ -203,7 +191,7 @@ bool VideoPlatformSurface::createPlatformSurfaceSurface()
     configAttribs[i++] = EGL_BLUE_SIZE;
     configAttribs[i++] = 8;
     configAttribs[i++] = EGL_ALPHA_SIZE;
-    configAttribs[i++] = m_hasAlpha ? 8 : 0;
+    configAttribs[i++] = 8;
     configAttribs[i++] = EGL_MATCH_FORMAT_KHR;
     configAttribs[i++] = EGL_FORMAT_RGBA_8888_EXACT_KHR;
     configAttribs[i++] = EGL_SURFACE_TYPE;
@@ -260,8 +248,7 @@ void VideoPlatformSurface::clearPlatformSurfaceSurface()
 
     RefPtr<cairo_t> cr = adoptRef(cairo_create(surface.get()));
     cairo_set_source_surface(cr.get(), surface.get(), 0, 0);
-    int alphaValue = m_hasAlpha ? 1 : 0;
-    cairo_set_source_rgba(cr.get(), 0, 0, 0, alphaValue);
+    cairo_set_source_rgba(cr.get(), 0, 0, 0, 1);
     cairo_rectangle(cr.get(), 0, 0, m_size.width(), m_size.height());
     cairo_fill(cr.get());
 }
@@ -277,14 +264,7 @@ SharedVideoPlatformSurfaceTizen::SharedVideoPlatformSurfaceTizen(IntSize size)
     , m_listener(0)
     , m_platformSurface(VideoPlatformSurface::create(size))
 {
-    if (!m_platformSurface)
-        return;
-
     registerDamageHandler();
-    m_flags = GraphicsSurface::Is2D | GraphicsSurface::UseLinearFilter;
-    if (m_platformSurface->hasAlpha())
-        m_flags |= GraphicsSurface::Alpha;
-
 }
 
 SharedVideoPlatformSurfaceTizen::~SharedVideoPlatformSurfaceTizen()
@@ -346,11 +326,6 @@ void SharedVideoPlatformSurfaceTizen::unregisterDamageHandler()
     }
 }
 
-int SharedVideoPlatformSurfaceTizen::graphicsSurfaceFlags() const
-{
-    return m_flags;
-}
-
 } // WebCore
 
-#endif // ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#endif // ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
index d763e6c..3d9d00f 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef SharedVideoPlatformSurfaceTizen_h
 #define SharedVideoPlatformSurfaceTizen_h
 
-#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
 
 #include "IntSize.h"
 #include <Ecore.h>
@@ -48,7 +48,6 @@ public:
     void platformSurfaceUpdated();
     void setVideoPlatformSurfaceUpdateListener(VideoPlatformSurfaceUpdateListener* listener);
     void paintCurrentFrameInContext(GraphicsContext*, const IntRect&);
-    int graphicsSurfaceFlags() const;
 
 private:
     SharedVideoPlatformSurfaceTizen(IntSize size);
@@ -60,11 +59,10 @@ private:
     Ecore_Event_Handler* m_damageHandler;
     VideoPlatformSurfaceUpdateListener* m_listener;
     OwnPtr<VideoPlatformSurface> m_platformSurface;
-    int m_flags;
 };
 
 } // WebCore
 
-#endif // ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#endif // ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
 
 #endif // SharedVideoPlatformSurfaceTizen_h
index 401497f..0b21ecb 100644 (file)
@@ -26,7 +26,7 @@
 #include "IntRect.h"
 #include "RenderLayerBacking.h"
 
-#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
 #include <gst/interfaces/xoverlay.h>
 #include <gst/video/gstvideosink.h>
 #include <gst/video/video.h>
 #include <cairo-xlib.h>
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
-#endif // ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#endif // ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
 
-#if !ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#if !ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) || CPU(X86) || CPU(X86_64)
 static Display* g_nativeDisplay = 0;
 static int g_nativeWindow = 0;
 #endif
 
 namespace WebCore {
 
-#if USE(ACCELERATED_VIDEO_VAAPI)
-    void setVaapiEnv()
-    {
-        static bool envSet = false;
-        if (!envSet) {
-            envSet = true;
-            setenv("PSB_VIDEO_CTEXTURE", "1", true);
-        }
-    }
-#endif
-
 VideoLayerTizen::VideoLayerTizen(HTMLMediaElement* media)
     : m_media(media)
-#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
     , m_videoSink(0)
 #else
     , m_platformSurfaceID(0)
-#endif // ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#endif // ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
 {
-#if !ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#if !ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) || CPU(X86) || CPU(X86_64)
     if (!g_nativeDisplay)
            g_nativeDisplay = XOpenDisplay(0);
 
@@ -80,7 +69,7 @@ VideoLayerTizen::~VideoLayerTizen()
 {
     syncLayer(0);
 
-#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
     if (m_platformSurface)
         m_platformSurface.clear();
 
@@ -97,7 +86,7 @@ VideoLayerTizen::~VideoLayerTizen()
         XDestroyWindow(g_nativeDisplay, g_nativeWindow);
         g_nativeWindow = 0;
     }
-#endif // ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#endif // ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
 }
 
 PlatformLayer* VideoLayerTizen::platformLayer() const
@@ -118,7 +107,7 @@ void VideoLayerTizen::syncLayer(VideoLayerTizen* layer)
     }
 }
 
-#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
 static gboolean platformSurfaceUpdateTimeoutCallback(VideoLayerTizen* layer)
 {
     layer->notifySyncRequired();
@@ -143,14 +132,8 @@ void VideoLayerTizen::platformSurfaceUpdated()
 
 GstElement* VideoLayerTizen::createVideoSink()
 {
-#if !USE(ACCELERATED_VIDEO_VAAPI)
     GstElement* videoSink = gst_element_factory_make("xvimagesink", "xvimagesink");
     g_object_set(videoSink, "rotate", 0, NULL);
-#else
-    setVaapiEnv();
-    GstElement* videoSink = gst_element_factory_make("vaapisink", "vaapisink");
-    g_object_set(videoSink, "is-pixmap", 1, NULL);
-#endif
 
     m_videoSink = videoSink;
 
@@ -180,11 +163,7 @@ void VideoLayerTizen::setOverlay(IntSize size)
     m_platformSurface->setVideoPlatformSurfaceUpdateListener(this);
 
     gst_x_overlay_set_window_handle(GST_X_OVERLAY(m_videoSink), m_platformSurface->id());
-#if !USE(ACCELERATED_VIDEO_VAAPI)
     g_object_set(m_videoSink, "rotate", 0, NULL);
-#else
-    g_object_set(m_videoSink, "is-pixmap", 1, NULL);
-#endif
 }
 
 void VideoLayerTizen::paintCurrentFrameInContext(GraphicsContext* context, const IntRect& rect)
@@ -193,7 +172,12 @@ void VideoLayerTizen::paintCurrentFrameInContext(GraphicsContext* context, const
         m_platformSurface->paintCurrentFrameInContext(context, rect);
 }
 #else
-
+#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && (CPU(X86) || CPU(X86_64))
+bool VideoLayerTizen::swapPlatformSurfaces()
+{
+    return true;
+}
+#endif
 void VideoLayerTizen::paintVideoLayer(IntSize videoSize)
 {
     if (videoSize.isEmpty())
@@ -221,12 +205,12 @@ void VideoLayerTizen::paintVideoLayer(IntSize videoSize)
 
     syncLayer(this);
 }
-#endif // ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#endif // ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
 
 #if USE(GRAPHICS_SURFACE) || ENABLE(TIZEN_CANVAS_GRAPHICS_SURFACE)
 uint64_t VideoLayerTizen::graphicsSurfaceToken() const
 {
-#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
     return (m_platformSurface ? m_platformSurface->id() : 0);
 #else
     return m_platformSurfaceID;
@@ -235,7 +219,7 @@ uint64_t VideoLayerTizen::graphicsSurfaceToken() const
 
 uint32_t VideoLayerTizen::copyToGraphicsSurface()
 {
-#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
     return (m_platformSurface ? m_platformSurface->id() : 0);
 #else
     return m_platformSurfaceID;
@@ -244,8 +228,8 @@ uint32_t VideoLayerTizen::copyToGraphicsSurface()
 
 int VideoLayerTizen::graphicsSurfaceFlags() const
 {
-#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
-    return m_platformSurface ? m_platformSurface->graphicsSurfaceFlags() : GraphicsSurface::Is2D;
+#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
+    return GraphicsSurface::Is2D | GraphicsSurface::UseLinearFilter | GraphicsSurface::Alpha;
 #else
     return GraphicsSurface::Is2D;
 #endif
index 88bf140..def602c 100644 (file)
 #include "HTMLMediaElement.h"
 #include "TextureMapperGL.h"
 
-#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
 #include "SharedVideoPlatformSurfaceTizen.h"
 #include <gst/gst.h>
-#endif // ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#endif // ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
 #if ENABLE(TIZEN_CANVAS_GRAPHICS_SURFACE)
 #include "GraphicsSurface.h"
 #endif
@@ -40,9 +40,9 @@ class GraphicsContext;
 class IntRect;
 
 class VideoLayerTizen : public TextureMapperPlatformLayer
-#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
                       , public VideoPlatformSurfaceUpdateListener
-#endif // ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#endif // ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
 {
 public:
     static PassOwnPtr<VideoLayerTizen> create(HTMLMediaElement* media)
@@ -57,7 +57,7 @@ public:
     virtual void paintToTextureMapper(TextureMapper*, const FloatRect& targetRect, const TransformationMatrix&, float opacity) { }
     virtual Image* paintToImage() { return 0; }
 
-#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
     // TextureMapperPlatformLayer interface
     virtual bool swapPlatformSurfaces();
     virtual void freePlatformSurface(int);
@@ -70,8 +70,11 @@ public:
     void setOverlay(IntSize);
     void paintCurrentFrameInContext(GraphicsContext*, const IntRect&);
 #else
+#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && (CPU(X86) || CPU(X86_64))
+    virtual bool swapPlatformSurfaces();
+#endif
     void paintVideoLayer(IntSize);
-#endif // ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#endif // ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
 
 #if USE(GRAPHICS_SURFACE) || ENABLE(TIZEN_CANVAS_GRAPHICS_SURFACE)
     virtual uint32_t copyToGraphicsSurface();
@@ -83,14 +86,14 @@ private:
     VideoLayerTizen(HTMLMediaElement* media);
     void syncLayer(VideoLayerTizen* layer);
 
-#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
     GstElement* m_videoSink;
     OwnPtr<SharedVideoPlatformSurfaceTizen> m_platformSurface;
     OwnPtr<SharedVideoPlatformSurfaceTizen> m_platformSurfaceToBeRemoved;
 #else
     IntSize m_videoSize;
     int m_platformSurfaceID;
-#endif // ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#endif // ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE) && !(CPU(X86) || CPU(X86_64))
 
     HTMLMediaElement* m_media;
 };
index 1eef303..28d289a 100644 (file)
@@ -100,9 +100,9 @@ void GraphicsSurface::platformPaintToTextureMapper(TextureMapper* textureMapper,
 
     // FIXME: Do we really need both SupportsBlending and contentsOpaque??
     if (m_canvasFlags & GraphicsSurface::Is2D)
-        static_cast<TextureMapperGL*>(textureMapper)->drawTexture(platformGetTextureID(), alpha ? TextureMapperGL::SupportsBlending : 0, m_size, targetRect, transform, opacity,expandedIntSize(targetRect.size()), true);
+        static_cast<TextureMapperGL*>(textureMapper)->drawTexture(platformGetTextureID(), TextureMapperGL::SupportsBlending, m_size, targetRect, transform, opacity, expandedIntSize(targetRect.size()), true);
     else
-        static_cast<TextureMapperGL*>(textureMapper)->drawTexture(platformGetTextureID(), alpha ? TextureMapperGL::SupportsBlending : 0, m_size, targetRect, transform, opacity,expandedIntSize(targetRect.size()), premultipliedAlpha);
+        static_cast<TextureMapperGL*>(textureMapper)->drawTexture(platformGetTextureID(), alpha ? TextureMapperGL::SupportsBlending : 0, m_size, targetRect, transform, opacity, expandedIntSize(targetRect.size()), premultipliedAlpha);
 }
 
 PassRefPtr<GraphicsSurface> GraphicsSurface::platformCreate(const IntSize& size, Flags flags)
index a707aa0..0e951db 100644 (file)
@@ -84,11 +84,9 @@ void PlatformSurfaceTextureGL::updateTexture()
 
 void PlatformSurfaceTextureGL::HandleGLError(const char* name)
 {
-#if !USE(ACCELERATED_VIDEO_VAAPI)
     GLuint errorCode = glGetError();
     if (errorCode != GL_NO_ERROR)
         TIZEN_LOGE("'%s' returned gl error (0x%x)", name, errorCode);
-#endif
 }
 
 };
index aa3fe5f..bf5a894 100644 (file)
@@ -293,7 +293,6 @@ IF ("${EFL_TARGET}" STREQUAL "i386")
     ADD_DEFINITIONS(-DENABLE_TIZEN_WEBKIT2_DIRECT_RENDERING=1)
     SET(ENABLE_TIZEN_WEBKIT2_DIRECT_RENDERING 1)
     ADD_DEFINITIONS(-DENABLE_TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE=1)
-    ADD_DEFINITIONS(-DWTF_USE_ACCELERATED_VIDEO_VAAPI=1)
     SET(ENABLE_TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE 1)
 ELSEIF ("${EFL_TARGET}" STREQUAL "emulator")
     MESSAGE("i386 emulator Build Mode <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<")