diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-03-24 17:37:39 +0000 |
---|---|---|
committer | Owain G. Ainsworth <oga@openbsd.org> | 2010-04-11 17:09:10 +0100 |
commit | fb93d7ecbd47a0d6570928bcb63b3a390f16fe26 (patch) | |
tree | 66cdd021f3295e9d12c3c0c9991f7e50a21f17a1 /src/i830_uxa.c | |
parent | de942b682ed8b6b271e1f8c07da35e5b73894492 (diff) |
i830: Clip solid fills to surface.
There is a reasonable surfeit of evidence to support this error,
for instance: http://bugs.freedesktop.org/attachment.cgi?id=34417
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
(cherry picked from commit 0c47195ca805881e3fbd5b9224be5c930feeeb8c)
Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
Diffstat (limited to 'src/i830_uxa.c')
-rw-r--r-- | src/i830_uxa.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/i830_uxa.c b/src/i830_uxa.c index 1b27e83f..9da1a2f4 100644 --- a/src/i830_uxa.c +++ b/src/i830_uxa.c @@ -248,6 +248,15 @@ static void i830_uxa_solid(PixmapPtr pixmap, int x1, int y1, int x2, int y2) unsigned long pitch; uint32_t cmd; + if (x1 < 0) + x1 = 0; + if (y1 < 0) + y1 = 0; + if (x2 > pixmap->drawable.width) + x2 = pixmap->drawable.width; + if (y2 > pixmap->drawable.height) + y2 = pixmap->drawable.height; + pitch = i830_pixmap_pitch(pixmap); { |