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.
This commit is contained in:
parent
c10df5b967
commit
f8482967ae
|
@ -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);
|
||||
|
|
19
exa/exa.h
19
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
|
||||
* @{
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue
Block a user