summaryrefslogtreecommitdiff
path: root/exa/exa_priv.h
diff options
context:
space:
mode:
authorMichel Dänzer <daenzer@vmware.com>2009-07-21 14:34:13 +0200
committerMichel Dänzer <daenzer@vmware.com>2009-07-21 14:34:13 +0200
commit268e227ba06c027f5c56b1aaee5dcc6a2034403f (patch)
treefb6c70bbadd2e5f978b1220e6e1a0d9b3d883e55 /exa/exa_priv.h
parentde7a14ca92f99ff03c8ad204aab5be8203c86a72 (diff)
EXA: Make Prepare/FinishAccess tracking resilient to repeated / nested calls.
Use reference counting and do nothing unless the reference count transitions to/from 0. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=22822 . As a bonus, this avoids calling the driver Prepare/FinishAccess hooks more than once per pixmap and operation. Also update the Doxygen documentation for the PrepareAccess driver hook to better match current reality.
Diffstat (limited to 'exa/exa_priv.h')
-rw-r--r--exa/exa_priv.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/exa/exa_priv.h b/exa/exa_priv.h
index b3df1a586..f67a9cbd8 100644
--- a/exa/exa_priv.h
+++ b/exa/exa_priv.h
@@ -176,8 +176,11 @@ typedef struct {
CARD32 lastDefragment;
CARD32 nextDefragment;
- /* Store all accessed pixmaps, so we can check for duplicates. */
- PixmapPtr prepare_access[6];
+ /* Reference counting for accessed pixmaps */
+ struct {
+ PixmapPtr pixmap;
+ int count;
+ } access[EXA_NUM_PREPARE_INDICES];
/* Holds information on fallbacks that cannot be relayed otherwise. */
unsigned int fallback_flags;