summaryrefslogtreecommitdiff
path: root/src/i965_render.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2008-03-21 03:08:24 -0700
committerKeith Packard <keithp@keithp.com>2008-03-21 03:12:36 -0700
commit645980596450ed21c3b8927410a6bfe38a0c55d1 (patch)
treedd5ab9dbbc1786fd5c631d2a181aaaa9b3f1c39a /src/i965_render.c
parentbf725b92cf93d74a6f414f81f319dddbc2c78525 (diff)
Transformed coord computed using floats. Don't move bilinear composite dst.
The homogeneous coordinate computation in the core server cannot be used for many legal matrices as it overflows. Just use floats in the driver; faster and avoids troubles. When compositing with bilinear filter, don't push the dst coordinates around as that makes the output blurry when pixels are aligned.
Diffstat (limited to 'src/i965_render.c')
-rw-r--r--src/i965_render.c42
1 files changed, 24 insertions, 18 deletions
diff --git a/src/i965_render.c b/src/i965_render.c
index ada3919a..93583b0a 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -1093,29 +1093,35 @@ i965_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
float src_x[3], src_y[3], mask_x[3], mask_y[3];
int i;
- i830_get_transformed_coordinates(srcX, srcY,
- pI830->transform[0],
- &src_x[0], &src_y[0]);
- i830_get_transformed_coordinates(srcX, srcY + h,
- pI830->transform[0],
- &src_x[1], &src_y[1]);
- i830_get_transformed_coordinates(srcX + w, srcY + h,
- pI830->transform[0],
- &src_x[2], &src_y[2]);
+ if (!i830_get_transformed_coordinates(srcX, srcY,
+ pI830->transform[0],
+ &src_x[0], &src_y[0]))
+ return;
+ if (!i830_get_transformed_coordinates(srcX, srcY + h,
+ pI830->transform[0],
+ &src_x[1], &src_y[1]))
+ return;
+ if (!i830_get_transformed_coordinates(srcX + w, srcY + h,
+ pI830->transform[0],
+ &src_x[2], &src_y[2]))
+ return;
if (pI830->scale_units[1][0] == -1 || pI830->scale_units[1][1] == -1) {
has_mask = FALSE;
} else {
has_mask = TRUE;
- i830_get_transformed_coordinates(maskX, maskY,
- pI830->transform[1],
- &mask_x[0], &mask_y[0]);
- i830_get_transformed_coordinates(maskX, maskY + h,
- pI830->transform[1],
- &mask_x[1], &mask_y[1]);
- i830_get_transformed_coordinates(maskX + w, maskY + h,
- pI830->transform[1],
- &mask_x[2], &mask_y[2]);
+ if (!i830_get_transformed_coordinates(maskX, maskY,
+ pI830->transform[1],
+ &mask_x[0], &mask_y[0]))
+ return;
+ if (!i830_get_transformed_coordinates(maskX, maskY + h,
+ pI830->transform[1],
+ &mask_x[1], &mask_y[1]))
+ return;
+ if (!i830_get_transformed_coordinates(maskX + w, maskY + h,
+ pI830->transform[1],
+ &mask_x[2], &mask_y[2]))
+ return;
}
/* Wait for any existing composite rectangles to land before we overwrite