diff options
-rw-r--r-- | fb/fbcompose.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fb/fbcompose.c b/fb/fbcompose.c index 41fff7b8a..6f7e3e6ec 100644 --- a/fb/fbcompose.c +++ b/fb/fbcompose.c @@ -3280,8 +3280,8 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32 xFixed *params = pict->filter_params; INT32 cwidth = xFixedToInt(params[0]); INT32 cheight = xFixedToInt(params[1]); - int xoff = params[0] >> 1; - int yoff = params[1] >> 1; + int xoff = (params[0] - xFixed1) >> 1; + int yoff = (params[1] - xFixed1) >> 1; params += 2; for (i = 0; i < width; ++i) { if (!v.vector[2]) { @@ -3325,6 +3325,11 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32 } } + satot >>= 16; + srtot >>= 16; + sgtot >>= 16; + sbtot >>= 16; + if (satot < 0) satot = 0; else if (satot > 0xff) satot = 0xff; if (srtot < 0) srtot = 0; else if (srtot > 0xff) srtot = 0xff; if (sgtot < 0) sgtot = 0; else if (sgtot > 0xff) sgtot = 0xff; |