xserver: Branch 'master'
Thomas Hellstrom
thomash at kemper.freedesktop.org
Wed Apr 4 15:06:32 EEST 2007
exa/exa.c | 3 +++
exa/exa.h | 19 ++++++++++++++++++-
2 files changed, 21 insertions(+), 1 deletion(-)
New commits:
diff-tree f8482967ae8080f49dd1bbb0b79cc65020df679f (from c10df5b967d4da4e11786520317e2917de5541fa)
Author: Thomas Hellstrom <thomas-at-tungstengraphics-dot-com>
Date: Wed Apr 4 12:28:48 2007 +0200
Add an EXA driver callback to determine whether a pixmap is
"offscreen" in exa terms, which means accessible to the GPU.
Bump exa minor. The change is backwards-compatible.
diff --git a/exa/exa.c b/exa/exa.c
index dd27d5e..23fe555 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -322,6 +322,9 @@ exaPixmapIsOffscreen(PixmapPtr p)
if (p->devPrivate.ptr == NULL)
return TRUE;
+ if (pExaScr->info->PixmapIsOffscreen)
+ return pExaScr->info->PixmapIsOffscreen(p);
+
return ((unsigned long) ((CARD8 *) p->devPrivate.ptr -
(CARD8 *) pExaScr->info->memoryBase) <
pExaScr->info->memorySize);
diff --git a/exa/exa.h b/exa/exa.h
index bf723f7..6c39a8f 100644
--- a/exa/exa.h
+++ b/exa/exa.h
@@ -39,7 +39,7 @@
#include "fb.h"
#define EXA_VERSION_MAJOR 2
-#define EXA_VERSION_MINOR 1
+#define EXA_VERSION_MINOR 2
#define EXA_VERSION_RELEASE 0
typedef struct _ExaOffscreenArea ExaOffscreenArea;
@@ -636,6 +636,23 @@ typedef struct _ExaDriver {
*/
void (*FinishAccess)(PixmapPtr pPix, int index);
+ /**
+ * PixmapIsOffscreen() is an optional driver replacement to
+ * exaPixmapIsOffscreen(). Set to NULL if you want the standard behaviour
+ * of exaPixmapIsOffscreen().
+ *
+ * @param pPix the pixmap
+ * @return TRUE if the given drawable is in framebuffer memory.
+ *
+ * exaPixmapIsOffscreen() is used to determine if a pixmap is in offscreen
+ * memory, meaning that acceleration could probably be done to it, and that it
+ * will need to be wrapped by PrepareAccess()/FinishAccess() when accessing it
+ * with the CPU.
+ *
+ *
+ */
+ Bool (*PixmapIsOffscreen)(PixmapPtr pPix);
+
/** @name PrepareAccess() and FinishAccess() indices
* @{
*/
More information about the xorg-commit
mailing list