3D transformed surfaces with z>0 gets cropped
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Mar 2012 11:56:47 +0000 (11:56 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Mar 2012 11:56:47 +0000 (11:56 +0000)
https://bugs.webkit.org/show_bug.cgi?id=81009

Patch by Lars Knudsen <lars.knudsen@nokia.com> on 2012-03-14
Reviewed by Noam Rosenthal.

The scissor clipping in TextureMapperGL didn't take 3D transforms
into account when calculating the clipping region.
Now, it will bail out early if the transform is not affine.

No new tests. Tested by current compositing layout tests.

* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGL::beginScissorClip):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@110691 268f45cc-cd09-0410-ab3c-d52691b4dbfc

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

index 5626289..b191dfd 100644 (file)
@@ -1,3 +1,19 @@
+2012-03-14  Lars Knudsen  <lars.knudsen@nokia.com>
+
+        3D transformed surfaces with z>0 gets cropped
+        https://bugs.webkit.org/show_bug.cgi?id=81009
+
+        Reviewed by Noam Rosenthal.
+
+        The scissor clipping in TextureMapperGL didn't take 3D transforms 
+        into account when calculating the clipping region.
+        Now, it will bail out early if the transform is not affine.
+
+        No new tests. Tested by current compositing layout tests.
+
+        * platform/graphics/texmap/TextureMapperGL.cpp:
+        (WebCore::TextureMapperGL::beginScissorClip):
+
 2012-03-14  Hajime Morrita  <morrita@chromium.org>
 
         Unreviewed build fix.
index c8b8cd9..1619e1d 100644 (file)
@@ -604,6 +604,11 @@ void TextureMapperGL::bindSurface(BitmapTexture *surfacePointer)
 
 bool TextureMapperGL::beginScissorClip(const TransformationMatrix& modelViewMatrix, const FloatRect& targetRect)
 {
+    // 3D transforms are currently not supported in scissor clipping
+    // resulting in cropped surfaces when z>0.
+    if (!modelViewMatrix.isAffine())
+        return false;
+
     FloatQuad quad = modelViewMatrix.projectQuad(targetRect);
     IntRect rect = quad.enclosingBoundingBox();