From 42db8c8cdb28bd5f83dd57f5d9a70fb5b94dd14e Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Thu, 26 Nov 2009 16:46:13 +0100 Subject: st/xorg: Use pipe clear hook for solid fills of whole pixmaps. Can give a little boost e.g. for anti-aliased text rendering. --- src/gallium/state_trackers/xorg/xorg_exa.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/gallium/state_trackers') diff --git a/src/gallium/state_trackers/xorg/xorg_exa.c b/src/gallium/state_trackers/xorg/xorg_exa.c index 66315e257b..9a7384da88 100644 --- a/src/gallium/state_trackers/xorg/xorg_exa.c +++ b/src/gallium/state_trackers/xorg/xorg_exa.c @@ -368,6 +368,12 @@ ExaSolid(PixmapPtr pPixmap, int x0, int y0, int x1, int y1) debug_printf("\tExaSolid(%d, %d, %d, %d)\n", x0, y0, x1, y1); #endif + if (x0 == 0 && y0 == 0 && + x1 == pPixmap->drawable.width && y1 == pPixmap->drawable.height) { + exa->pipe->clear(exa->pipe, PIPE_CLEAR_COLOR, exa->solid_color, 0.0, 0); + return; + } + xorg_solid(exa, priv, x0, y0, x1, y1) ; } -- cgit v1.2.3