Bug 81009 - 3D transformed surfaces with z>0 gets cropped
Summary: 3D transformed surfaces with z>0 gets cropped
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Lars Knudsen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-13 10:10 PDT by Lars Knudsen
Modified: 2012-03-14 04:57 PDT (History)
3 users (show)

See Also:


Attachments
Test page exposing what happens when clipping is done with no respect for 3D transforms. (2.49 KB, text/html)
2012-03-13 10:10 PDT, Lars Knudsen
no flags Details
Patch (1.67 KB, patch)
2012-03-13 10:40 PDT, Lars Knudsen
no flags Details | Formatted Diff | Diff
Patch (1.78 KB, patch)
2012-03-13 10:52 PDT, Lars Knudsen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Knudsen 2012-03-13 10:10:05 PDT
Created attachment 131652 [details]
Test page exposing what happens when clipping is done with no respect for 3D transforms.

When rendering surfaces with a transform z>0 and in perspective, making the surface larger on screen than the corresponding surface with only 2D transforms, the surface gets cropped to a maximum size/shape of the same surface with no perspective applied.

Test page exposing problem attached.
Comment 1 Lars Knudsen 2012-03-13 10:40:36 PDT
Created attachment 131662 [details]
Patch
Comment 2 Noam Rosenthal 2012-03-13 10:41:58 PDT
Comment on attachment 131662 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=131662&action=review

LGTM - see nitpicks

> Source/WebCore/ChangeLog:11
> +        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.

Weird line wrapping :)

> Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp:607
> +    if (!modelViewMatrix.isAffine())

Add a comment
Comment 3 Lars Knudsen 2012-03-13 10:52:53 PDT
Created attachment 131665 [details]
Patch
Comment 4 WebKit Review Bot 2012-03-14 04:57:01 PDT
Comment on attachment 131665 [details]
Patch

Clearing flags on attachment: 131665

Committed r110691: <http://trac.webkit.org/changeset/110691>
Comment 5 WebKit Review Bot 2012-03-14 04:57:06 PDT
All reviewed patches have been landed.  Closing bug.