Fix wayland wrt apps y-flip problem on emulator 31/17831/4
authorStanislav Vorobiov <s.vorobiov@samsung.com>
Wed, 29 Jan 2014 13:45:04 +0000 (17:45 +0400)
committerJoone Hur <joone.hur@intel.com>
Thu, 20 Mar 2014 05:56:14 +0000 (22:56 -0700)
Currently we flip all textures that come to texture mapper,
but if a texture is not made from sharedPlatformSurface then
it shouldn't be flipped, thus, we add ShouldFlipTexture
flag in this case to flip such texture back.

Bug-Tizen: TIVI-2606 ([SDK][Web-sample] SettingsApp has up side down image flashing a moment when change screen)

Change-Id: I84843a7cc9b3145b84e29b43a237918f421dc1ca
Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp

index 21512a5..c3a9a80 100755 (executable)
@@ -488,10 +488,15 @@ void TextureMapperGL::drawTexture(const BitmapTexture& texture, const FloatRect&
         return;
 
     const BitmapTextureGL& textureGL = static_cast<const BitmapTextureGL&>(texture);
+#if PLATFORM(WAYLAND) && ENABLE(TIZEN_EMULATOR)
+    int flip = (dynamic_cast<const PlatformSurfaceTexture*>(&texture) == NULL) ? ShouldFlipTexture : 0;
+#else
+    int flip = 0;
+#endif
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
-    drawTexture(textureGL.id(), textureGL.isOpaque() ? 0 : SupportsBlending, textureGL.size(), targetRect, matrix, opacity, textureGL.size(), true, exposedEdges);
+    drawTexture(textureGL.id(), (textureGL.isOpaque() ? 0 : SupportsBlending) | flip, textureGL.size(), targetRect, matrix, opacity, textureGL.size(), true, exposedEdges);
 #else
-    drawTexture(textureGL.id(), textureGL.isOpaque() ? 0 : SupportsBlending, textureGL.size(), targetRect, matrix, opacity, exposedEdges);
+    drawTexture(textureGL.id(), (textureGL.isOpaque() ? 0 : SupportsBlending) | flip, textureGL.size(), targetRect, matrix, opacity, exposedEdges);
 #endif
 }