From 130d86ae03a66cc99c5e0149c8463d6fe08e5572 Mon Sep 17 00:00:00 2001 From: Stanislav Vorobiov Date: Wed, 29 Jan 2014 17:45:04 +0400 Subject: [PATCH] Fix wayland wrt apps y-flip problem on emulator 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 --- Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp b/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp index 21512a5..c3a9a80 100755 --- a/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp +++ b/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp @@ -488,10 +488,15 @@ void TextureMapperGL::drawTexture(const BitmapTexture& texture, const FloatRect& return; const BitmapTextureGL& textureGL = static_cast(texture); +#if PLATFORM(WAYLAND) && ENABLE(TIZEN_EMULATOR) + int flip = (dynamic_cast(&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 } -- 2.7.4