[PULL] Surface transformation fixes 1

Kristian Høgsberg krh at bitplanet.net
Tue Jan 31 06:43:31 PST 2012


On Tue, Jan 31, 2012 at 9:01 AM, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> On Fri, 27 Jan 2012 17:07:16 +0200
> Pekka Paalanen <ppaalanen at gmail.com> wrote:
>
>> Hi Kristian, and everyone,
> ...
>> To stress test the surface transformations, Weston now has a debug
>> feature: if you press Super+Alt and left-drag a surface with a mouse,
>> it rotates. This is just a debug feature, and has some rough edges.
>>
>> For testing input coordinate transformations, there is a new demo
>> application called clickdot. It simply shows a cross where you clicked,
>> and it should match the mouse cursor hotspot.
>>
>> The major contribution of this series is cleaning up the coordinate
>> systems and making coordinate transformations explicit.
>>
>> Things known broken:
>>
>> - Transforming surfaces with opaque regions usually results in some
>>   misrendering. In practice this concerns rotated RGB surfaces (as
>>   opposed to RGBA).
>>
>> - move and resize orientation for rotated surfaces is wrong
>>
>> - related surfaces, e.g. menus, are not transformed
>>
>> - cursors are not transformed
>>
>> I intend to continue fixing the remaining issues, at least opaques and
>> move & resize.
>
> This fixes most of the move and resize issues.
>
> However, we are now cumulating rounding errors on continuous resizes.
> To see it yourself, take a window, rotate it a little, and start
> resizing from the top-left corner. As you spin the mouse, the surface
> wanders off.
>
> I have an idea how to fix that, but it is a bit invasive. Basically,
> store the surface-local translation in integers separately from the
> global translation. That way there are no cumulating rounding errors.

Yeah, as we discussed in IRC, that should work.  I pulled these fixes
for now, it all work much better.

Kristian

> The following changes since commit becfcbfbd29de1a59ae4c7c272bdad4fc1023a15:
>
>  test: Fix out-of-tree builds (2012-01-30 19:17:52 -0500)
>
> are available in the git repository at:
>  git://git.collabora.co.uk/git/user/pq/wayland-demos.git transform-fixes1
>
> Pekka Paalanen (3):
>      shell: fix move of transformed surfaces
>      shell: fix resize for transformed surfaces
>      compositor: handle attach request in surface-local coordinates
>
>  src/compositor.c |   16 +++++++++++-----
>  src/shell.c      |   52 ++++++++++++++++++++++++++--------------------------
>  2 files changed, 37 insertions(+), 31 deletions(-)
>
>
> Thanks,
> pq


More information about the wayland-devel mailing list