summaryrefslogtreecommitdiff
path: root/exa/exa_priv.h
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2006-03-29 22:25:17 +0000
committerEric Anholt <anholt@freebsd.org>2006-03-29 22:25:17 +0000
commite799dd68e2bd0fa8ac3c344111fb12e1f32d4c10 (patch)
treecb5ecf1f28b376fabe832e44cd4e763c6d65d443 /exa/exa_priv.h
parent4bb5ab0b4453208573b91b334940f190a8f7210a (diff)
Bug #2986: Add acceleration of GetImage using DownloadFromScreen for the
ZPixmap, planeMask ~= FB_ALLONES, bitsPerPixel >= 8 case. I'm pretty convinced that this is the only case that we care about at all. Tested with xwd -root and xwd on a gnome-terminal, in a composited environment or not.
Diffstat (limited to 'exa/exa_priv.h')
-rw-r--r--exa/exa_priv.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/exa/exa_priv.h b/exa/exa_priv.h
index c52ee8c44..8a1b27710 100644
--- a/exa/exa_priv.h
+++ b/exa/exa_priv.h
@@ -129,6 +129,14 @@ extern int exaPixmapPrivateIndex;
/** Align an offset to a power-of-two alignment */
#define EXA_ALIGN2(offset, align) (((offset) + (align) - 1) & ~((align) - 1))
+/**
+ * Returns TRUE if the given planemask covers all the significant bits in the
+ * pixel values for pDrawable.
+ */
+#define EXA_PM_IS_SOLID(_pDrawable, _pm) \
+ (((_pm) & ((1 << (_pDrawable)->bitsPerPixel) - 1)) == \
+ ((1 << (_pDrawable)->bitsPerPixel) - 1))
+
#define EXA_PIXMAP_SCORE_MOVE_IN 10
#define EXA_PIXMAP_SCORE_MAX 20
#define EXA_PIXMAP_SCORE_MOVE_OUT -10