diff options
author | Kristan Høgsberg <krh@redhat.com> | 2006-06-19 22:13:22 -0400 |
---|---|---|
committer | Kristan Høgsberg <krh@redhat.com> | 2006-06-19 22:21:49 -0400 |
commit | 4365d16c8629e824973ee0c357efdfbfd28b672c (patch) | |
tree | f1f0bcaca0eb6df37f502315c323ce02a14a077e /fb | |
parent | 98d17bba716619e3402bd74c7c3e1c01d055ef6e (diff) |
Pull over convolution filter fixes from xgl-0-0-1 branch.
Cherry-picking patches:
8a5ea68800b9d7dca90ff4e573ad8533852f1ea3 and
4d755fe14274a7293748ce9aa666ab85df6297c5
Diffstat (limited to 'fb')
-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; |