[Spice-devel] [PATCH 0/1] Partial fix for office2007 redraw issue (#28084)

alexl at redhat.com alexl at redhat.com
Fri Aug 27 07:53:25 PDT 2010


From: Alexander Larsson <alexl at redhat.com>

I tracked down the power point 2007 scrollbar rendering issue today.
Its caused by the scaling in pixman. When drawing the scrollbar ppt
renders a 16x1 region of a larger image to the destination rect of the
whole scrollbar. I.e. it will be scaling the 16x1 region to something
like 16x481 (or whatever the height of the scrollbar is).

The problem is that we got the coordinates wrong when calculating the
scaling in pixman, so we picked the row above the scrollbar theme
region instead hitting something completely different (solid green).

The core of the problem is that with pixman, when doing scaling we
specify the source coordinates not in the source image coordinate
system, but in the transformed space, meaning that the coordinate
conversion is not trivial (which you might otherwise assume, since
we're copying an integer rect area to another integer rect area).

The actual scaling factor handed to pixman is a 16.16 fixed point
value. This may be off by a bit from the real scaling factor, and we
used to use the real (double) scaling factor to calculate the
transformed source coordinates, which didn't match what pixman then
did. The patch fixes this by doing the calculations in fixed point.

However, there seems to be second issue causing tall enough scrollbars
to become black at the bottom. This seems to be a related issue where
the scaling factor makes pixman step past the 16x1 region into the
row below that. However, I can't for the life of me figure out why
this is happening. I think need some help from soeren here...

Alexander Larsson (1):
  canvas: Better coordinate rounding in scaling

 common/sw_canvas.c |   64 +++++++++++++++++++++++++++++----------------------
 1 files changed, 36 insertions(+), 28 deletions(-)

-- 
1.7.2.1



More information about the Spice-devel mailing list