summaryrefslogtreecommitdiff
path: root/exa/exa.h
diff options
context:
space:
mode:
authorMichel Dänzer <daenzer@vmware.com>2009-02-24 09:22:09 +0100
committerMichel Dänzer <daenzer@vmware.com>2009-02-24 09:22:09 +0100
commit170cf1270dff38d3cce7f5ba5b940d1c0d70eff5 (patch)
tree3c8257191fd843070f2a9701e999d6868a775d2a /exa/exa.h
parentd3b355875ac46104a174966e1974e6af99e40fd6 (diff)
EXA: Handle separate alpha maps properly in Composite fallback.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=18710 . As this can't work without new EXA_PREPARE_AUX* indices, this requires a major version bump, so we can also drop the UploadToScratch driver hook and ExaOffscreenSwap*(). So this also fixes http://bugs.freedesktop.org/show_bug.cgi?id=20213 . Moreover, introduce EXA_DRIVER_KNOWN_MAJOR to break compilation of drivers which may not be able to handle EXA_PREPARE_AUX*, giving instructions how to make them build again in the #error message. Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Diffstat (limited to 'exa/exa.h')
-rw-r--r--exa/exa.h46
1 files changed, 18 insertions, 28 deletions
diff --git a/exa/exa.h b/exa/exa.h
index 21a0f1abf..b80d0d4a2 100644
--- a/exa/exa.h
+++ b/exa/exa.h
@@ -38,8 +38,17 @@
#include "picturestr.h"
#include "fb.h"
-#define EXA_VERSION_MAJOR 2
-#define EXA_VERSION_MINOR 4
+/* If the driver can't seem to handle this major version, abort compilation with
+ * instructions how to fix it.
+ */
+#if !defined(EXA_DRIVER_KNOWN_MAJOR) || EXA_DRIVER_KNOWN_MAJOR < 3
+#error Make sure this EXA driver either does not have Prepare/FinishAccess \
+ hooks or that they can handle EXA_PREPARE_AUX*, and \
+ #define EXA_DRIVER_KNOWN_MAJOR 3 before including exa.h
+#endif
+
+#define EXA_VERSION_MAJOR 3
+#define EXA_VERSION_MINOR 0
#define EXA_VERSION_RELEASE 0
typedef struct _ExaOffscreenArea ExaOffscreenArea;
@@ -499,32 +508,6 @@ typedef struct _ExaDriver {
int src_pitch);
/**
- * UploadToScratch() is used to upload a pixmap to a scratch area for
- * acceleration.
- *
- * @param pSrc source pixmap in host memory
- * @param pDst fake, scratch pixmap to be set up in offscreen memory.
- *
- * The UploadToScratch() call was added to support Xati before Xati had
- * support for hostdata uploads and before exaGlyphs() was written. It
- * behaves incorrectly (uses an invalid pixmap as pDst),
- * and UploadToScreen() should be implemented instead.
- *
- * Drivers implementing UploadToScratch() had to set up space (likely in a
- * statically allocated area) in offscreen memory, copy pSrc to that
- * scratch area, and adust pDst->devKind for the pitch and
- * pDst->devPrivate.ptr for the pointer to that scratch area. The driver
- * was responsible for syncing (as it was implemented using memcpy() in
- * Xati), and only the data from the last UploadToScratch() was guaranteed
- * to be valid at any given time.
- *
- * UploadToScratch() should not be implemented by drivers, and will likely
- * be removed in a future version of EXA.
- */
- Bool (*UploadToScratch) (PixmapPtr pSrc,
- PixmapPtr pDst);
-
- /**
* DownloadFromScreen() loads a rectangle of data from pSrc into dst
*
* @param pSrc source pixmap
@@ -672,6 +655,13 @@ typedef struct _ExaDriver {
* from.
*/
#define EXA_PREPARE_MASK 2
+ /**
+ * EXA_PREPARE_AUX* are additional indices for other purposes, e.g.
+ * separate alpha maps with Composite operations.
+ */
+ #define EXA_PREPARE_AUX0 3
+ #define EXA_PREPARE_AUX1 4
+ #define EXA_PREPARE_AUX2 5
/** @} */
/**