Commit graph

7 commits

Author SHA1 Message Date
Keith Packard
15cd904558 Handle transform failure when computing shadow damage area.
PictureTransformBounds can fail, when this happens, damage the entire screen
so that the shadow gets repainted correctly.
2008-04-29 08:29:42 -07:00
Keith Packard
adae567297 Avoid overflow in PictureTransformPoint. Fix PictureTransformIsIdentity.
PictureTransformPoint computes homogeneous coordinates internally, but fails
to handle intermediate values larger than 16.16. Use 64 bit intermediate
values while computing the final result at 16.16 and only complain if that
result is too large.

PictureTransformIsIdentity was completely wrong -- it was not checking for
identity transforms at all.
2008-03-21 02:35:28 -07:00
Keith Packard
5360d47549 Handle RandR transform matrices in floating point.
RandR matrix computations lose too much precision in fixed point;
computations using the inverted matrix can be as much as 10 pixels off.
Convert them to double precision values and pass those around. These API
changes are fairly heavyweight; the official Render interface remains fixed
point, so the fixed point matrix comes along for the ride everywhere.
2008-03-19 00:46:35 -07:00
Keith Packard
02b8d204e1 When converting from double to fixed, round carefully.
This reduces the matrix representation error after inverting a
transformation matrix (although it doesn't eliminate it entirely).

Perhaps we should extend Render to include 64-bit floating point transforms...
2008-03-18 15:15:40 -07:00
Keith Packard
47dcd54077 Add matrix inversion function (uses doubles)
The obvious matrix inversion function, coded using doubles to avoid fiddling
with fixed point precision adventures.
2008-03-17 23:03:56 -07:00
Keith Packard
404de98155 Add funcs to convert between protocol and pixman matrices 2008-03-13 21:30:18 -07:00
Keith Packard
e65e9b4b12 Export a bunch of matrix operations from render.
The render extension uses many matrix operations internally, this change
exposes those functions to other parts of the server, drivers and
extensions. The change is motivated by the 'transform' additions to the
RandR extension but will likely be useful elsewhere.
2008-03-13 14:50:13 -07:00