Mesa (mesa_7_7_branch): st/xorg: Use pipe clear hook for solid fills of whole pixmaps.
Michel Dänzer
daenzer at kemper.freedesktop.org
Thu Nov 26 15:46:18 UTC 2009
Module: Mesa
Branch: mesa_7_7_branch
Commit: 42db8c8cdb28bd5f83dd57f5d9a70fb5b94dd14e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=42db8c8cdb28bd5f83dd57f5d9a70fb5b94dd14e
Author: Michel Dänzer <daenzer at vmware.com>
Date: Thu Nov 26 16:46:13 2009 +0100
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 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/gallium/state_trackers/xorg/xorg_exa.c b/src/gallium/state_trackers/xorg/xorg_exa.c
index 66315e2..9a7384d 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) ;
}
More information about the mesa-commit
mailing list