From e84d257c79ff9e28ae3a560e954fccb114451973 Mon Sep 17 00:00:00 2001 From: "jinhyung.jo" Date: Thu, 26 Sep 2013 15:46:59 +0900 Subject: [PATCH] Direct rendering and pixmap sharing enabled for emulator Change-Id: If919a938e0a974354fe7b0293f4e8968ecb70955 Signed-off-by: Stanislav Vorobiov Signed-off-by: Jinhyung Jo --- Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp | 12 ++++++++++++ Source/cmake/OptionsTizen.cmake | 9 +++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp b/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp index 8562fb5..42e404f 100755 --- a/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp +++ b/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp @@ -528,7 +528,13 @@ void TextureMapperGL::drawTextureRectangleARB(uint32_t texture, Flags flags, con GL_CMD(glBindTexture(GL_TEXTURE_RECTANGLE_ARB, texture)); GL_CMD(glUniform1i(program->sourceTextureLocation(), 0)); +#if ENABLE(TIZEN_EMULATOR) + // It would be really great if we could call eglGetConfigAttrib(...egl_config, EGL_Y_INVERTED_NOK...) + // here and act according to the result, but EGL config is not available here + GL_CMD(glUniform1f(program->flipLocation(), !(flags & ShouldFlipTexture))); +#else GL_CMD(glUniform1f(program->flipLocation(), !!(flags & ShouldFlipTexture))); +#endif GL_CMD(glUniform2f(program->textureSizeLocation(), textureSize.width(), textureSize.height())); if (TextureMapperShaderProgram::isValidUniformLocation(program->opacityLocation())) @@ -791,7 +797,13 @@ void TextureMapperGL::drawTexturedQuadWithProgram(TextureMapperShaderProgram* pr GL_CMD(glBindTexture(GL_TEXTURE_2D, texture)); GL_CMD(glUniform1i(program->sourceTextureLocation(), 0)); +#if ENABLE(TIZEN_EMULATOR) + // It would be really great if we could call eglGetConfigAttrib(...egl_config, EGL_Y_INVERTED_NOK...) + // here and act according to the result, but EGL config is not available here + GL_CMD(glUniform1f(program->flipLocation(), !(flags & ShouldFlipTexture))); +#else GL_CMD(glUniform1f(program->flipLocation(), !!(flags & ShouldFlipTexture))); +#endif if (TextureMapperShaderProgram::isValidUniformLocation(program->opacityLocation())) GL_CMD(glUniform1f(program->opacityLocation(), opacity)); diff --git a/Source/cmake/OptionsTizen.cmake b/Source/cmake/OptionsTizen.cmake index 059edbe..9d071ee 100644 --- a/Source/cmake/OptionsTizen.cmake +++ b/Source/cmake/OptionsTizen.cmake @@ -327,10 +327,11 @@ IF ("${EFL_TARGET}" STREQUAL "i386") SET(ENABLE_TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE 1) ELSEIF ("${EFL_TARGET}" STREQUAL "emulator") MESSAGE("i386 emulator Build Mode <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<") - ADD_DEFINITIONS(-DENABLE_TIZEN_WEBKIT2_DIRECT_RENDERING=0) - SET(ENABLE_TIZEN_WEBKIT2_DIRECT_RENDERING 0) - ADD_DEFINITIONS(-DENABLE_TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE=0) - SET(ENABLE_TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE 0) + 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) + SET(ENABLE_TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE 1) + ADD_DEFINITIONS(-DENABLE_TIZEN_EMULATOR=1) ELSE () ADD_DEFINITIONS(-DENABLE_TIZEN_WEBKIT2_DIRECT_RENDERING=1) SET(ENABLE_TIZEN_WEBKIT2_DIRECT_RENDERING 1) -- 2.7.4