Title: [133049] trunk/Source/WebCore
Revision
133049
Author
[email protected]
Date
2012-10-31 11:24:57 -0700 (Wed, 31 Oct 2012)

Log Message

[Qt][EFL][AC][WK2]TextureMapperLayer backing store contents are drawn upside down on screen.
https://bugs.webkit.org/show_bug.cgi?id=100845.

Patch by Kondapally Kalyan <[email protected]> on 2012-10-31
Reviewed by Noam Rosenthal.

WebGL displays the Canvas with (0,0) being the bottom left corner.
In GraphicsSurface::platformPaintToTextureMapper we don't set ShouldFlipTexture
flag before painting to TextureMapper.
It results in backing store contents being drawn upside down on screen.
This patch enables ShouldFlipTexture flag when TextureMapperLayer renders
it's backing store contents into a TextureMapper.

* platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
(WebCore::GraphicsSurface::platformPaintToTextureMapper):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (133048 => 133049)


--- trunk/Source/WebCore/ChangeLog	2012-10-31 18:18:51 UTC (rev 133048)
+++ trunk/Source/WebCore/ChangeLog	2012-10-31 18:24:57 UTC (rev 133049)
@@ -1,3 +1,20 @@
+2012-10-31  Kondapally Kalyan  <[email protected]>
+
+        [Qt][EFL][AC][WK2]TextureMapperLayer backing store contents are drawn upside down on screen.
+        https://bugs.webkit.org/show_bug.cgi?id=100845.
+
+        Reviewed by Noam Rosenthal.
+
+        WebGL displays the Canvas with (0,0) being the bottom left corner.
+        In GraphicsSurface::platformPaintToTextureMapper we don't set ShouldFlipTexture
+        flag before painting to TextureMapper.
+        It results in backing store contents being drawn upside down on screen.
+        This patch enables ShouldFlipTexture flag when TextureMapperLayer renders 
+        it's backing store contents into a TextureMapper.
+
+        * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
+        (WebCore::GraphicsSurface::platformPaintToTextureMapper):
+
 2012-10-31  Noam Rosenthal  <[email protected]>
 
         [Texmap] Enable filter animations in GraphicsLayerAnimation

Modified: trunk/Source/WebCore/platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp (133048 => 133049)


--- trunk/Source/WebCore/platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp	2012-10-31 18:18:51 UTC (rev 133048)
+++ trunk/Source/WebCore/platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp	2012-10-31 18:24:57 UTC (rev 133049)
@@ -376,9 +376,10 @@
 
 void GraphicsSurface::platformPaintToTextureMapper(TextureMapper* textureMapper, const FloatRect& targetRect, const TransformationMatrix& transform, float opacity, BitmapTexture* mask)
 {
+    TextureMapperGL* texMapGL = static_cast<TextureMapperGL*>(textureMapper);
     TransformationMatrix adjustedTransform = transform;
     adjustedTransform.multiply(TransformationMatrix::rectToRect(FloatRect(FloatPoint::zero(), m_size), targetRect));
-    static_cast<TextureMapperGL*>(textureMapper)->drawTexture(platformGetTextureID(), 0, m_size, targetRect, adjustedTransform, opacity, mask);
+    texMapGL->drawTexture(platformGetTextureID(), TextureMapperGL::ShouldFlipTexture, m_size, targetRect, adjustedTransform, opacity, mask);
 }
 
 uint32_t GraphicsSurface::platformFrontBuffer() const
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to