Fix the issue that some streaming video's screen is not updated.
authorYongGeol Jung <yg48.jung@samsung.com>
Fri, 19 Apr 2013 11:10:24 +0000 (20:10 +0900)
committerYongGeol Jung <yg48.jung@samsung.com>
Fri, 19 Apr 2013 11:16:17 +0000 (20:16 +0900)
[Title] Fix the issue that some streaming video's screen is not updated.
[Issue#] N/A
[Problem] Some streaming video's screen is not updated.
[Cause] After platform changing, glEvasGLImageTargetTexture2DOES is not working properly.
[Solution] Call glEvasGLImageTargetTexture2DOES function per frame. (Workaround)

Change-Id: I3f10e1b6735a4e7e868f1a24f8676fecbeaab38f

Source/WebCore/platform/graphics/gstreamer/tizen/SharedVideoPlatformSurfaceTizen.cpp
Source/WebCore/platform/graphics/surfaces/GraphicsSurface.h
Source/WebCore/platform/graphics/surfaces/tizen/GraphicsSurfaceTizen.cpp

index 0617193..d5e13e7 100644 (file)
@@ -312,7 +312,7 @@ SharedVideoPlatformSurfaceTizen::SharedVideoPlatformSurfaceTizen(IntSize size)
         return;
 
     registerDamageHandler();
-    m_flags = GraphicsSurface::Is2D | GraphicsSurface::UseLinearFilter;
+    m_flags = GraphicsSurface::Is2D | GraphicsSurface::UseLinearFilter | GraphicsSurface::UpdateTexture;
     if (m_platformSurface->hasAlpha())
         m_flags |= GraphicsSurface::Alpha;
 
index 78729e4..5737c16 100755 (executable)
@@ -63,6 +63,7 @@ public:
         PremultipliedAlpha = 0x04
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
         , UseLinearFilter = 0x08
+        , UpdateTexture = 0x10
 #endif
     };
 #endif
index 1eef303..710b310 100644 (file)
@@ -50,7 +50,7 @@ struct GraphicsSurfacePrivate {
         m_size = size;
     }
 
-    int getPlatformSurfaceTextureID(bool useLinearFilter) {
+    int getPlatformSurfaceTextureID(bool useLinearFilter, bool updateTexture) {
         if (!m_frontBuffer)
             return 0;
 
@@ -61,6 +61,10 @@ struct GraphicsSurfacePrivate {
             m_platformSurfaceTextures.set(m_frontBuffer, platformSurfaceTexture);
         } else
             platformSurfaceTexture = it->second;
+
+        if (updateTexture)
+            platformSurfaceTexture->updateTexture();
+
         return platformSurfaceTexture->id();
     }
 
@@ -89,7 +93,7 @@ uint64_t GraphicsSurface::platformExport()
 
 uint32_t GraphicsSurface::platformGetTextureID()
 {
-    return m_private->getPlatformSurfaceTextureID(m_canvasFlags & GraphicsSurface::UseLinearFilter);
+    return m_private->getPlatformSurfaceTextureID(m_canvasFlags & GraphicsSurface::UseLinearFilter, m_canvasFlags & GraphicsSurface::UpdateTexture);
 }
 
 void GraphicsSurface::platformPaintToTextureMapper(TextureMapper* textureMapper, const FloatRect& targetRect, const TransformationMatrix& transform, float opacity)