Bug 33616 - Transformed image is incorrectly offset when source is a window
Summary: Transformed image is incorrectly offset when source is a window
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-27 12:14 UTC by Keith Kriewall
Modified: 2011-01-28 11:31 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Keith Kriewall 2011-01-27 12:14:23 UTC
An Xrender composite operation involving a scaling or rotating transform and a source picture that is a window results in a mis-aligned transformed image.  If the source picture is a pixmap, the transform works correctly.

An X client that does the following will exhibit the problem:

CreateWindow (57x77) as source
CreateWindow (775x550) as destination
RenderCreatePicture for each of the above drawables
RenderSetPictureFilter (source,"nearest")
RenderSetPictureTransform (source, matrix = 
  [ 1.4615326, 0,        -1069.8418 ]
  [ 0,         1.222229, -587.89215 ]
  [ 0,         0,        1          ] )
RenderComposite(Src operator, srcX/Y=(732,481), dstX/Y=(732,481), for 39x63)

If you substitute a pixmap instead of a window for the source, the transformed (scaled down) source image will be correctly positioned on the destination window.

Found in: X11R7.4 (server versions 1.5.2 and 1.6.4)
Works in: X11R7.1 and earlier

It almost appears that the composite operation is using the center point of the transformed image as the origin, rather than (0,0).

Reporting this against pixman because the only relevant difference between Xrender 7.1 and 7.4 source is the conversion to pixman.
Comment 1 Søren Sandmann Pedersen 2011-01-28 11:31:43 UTC
There are still issues with windows used as sources in current X servers, but I believe transformations are handled mostly correctly since server version 1.7.4.

Moving to the X server component, and closing as FIXED, but feel free to reopen if you can reproduce with a current server.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.