Fix problem of clipping when the textureSize is odd
authoruser <tanvir.rizvi@tanvir.rizvi-ubuntu>
Fri, 11 Oct 2013 09:27:21 +0000 (14:57 +0530)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Tue, 15 Oct 2013 05:40:38 +0000 (05:40 +0000)
[Title] When the Texture Size is Odd then a line is appearing in m.rolex.com in emulator
[Issue] N_SE-50996
[Problem] Presently the textureSize is reduced by one if the content Size is Odd to make it even.
[Solution] Increase the TextureSize by one instead of decreasing. By this the values in clipping will fall under the limits when the paint is done usingTheOverLapRegions. Previously when the clipping was done since the textureSize was falling one less a white line was visiblle.

Change-Id: I4df161cea4233b6a8ee01c041a63b90f46cd397a

Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp

index 31d05c4..8a9fc33 100755 (executable)
@@ -849,9 +849,9 @@ void BitmapTextureGL::didReset()
 #if !ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
     // some graphics driver did not support odd texture size.
     if (m_textureSize.width() % 2)
-        m_textureSize.setWidth(m_textureSize.width() - 1);
+        m_textureSize.setWidth(m_textureSize.width() + 1);
     if (m_textureSize.height() % 2)
-        m_textureSize.setHeight(m_textureSize.height() - 1);
+        m_textureSize.setHeight(m_textureSize.height() + 1);
 #endif
 }