dri2: Event driven buffer validation.
When a buffer invalidation event is received from the X server, the "invalidate" hook of the DRI2 flush extension is executed: A generic implementation (dri2InvalidateDrawable) is provided that just bumps the "pStamp" sequence number in __DRIdrawableRec. For old servers not supporting buffer invalidation events, the invalidate hook will be called before flushing the fake front/back buffer (that's typically once per frame -- not a lot worse than the situation we were in before). No effort has been made on preserving backwards compatibility with version 2 of the flush extension, but I think it's acceptable because AFAIK no released stack is making use of it. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
This commit is contained in:

committed by
Kristian Høgsberg

parent
925b901ba3
commit
61d26bc82e
@@ -269,22 +269,20 @@ struct __DRItexBufferExtensionRec {
|
||||
* Used by drivers that implement DRI2
|
||||
*/
|
||||
#define __DRI2_FLUSH "DRI2_Flush"
|
||||
#define __DRI2_FLUSH_VERSION 2
|
||||
#define __DRI2_FLUSH_VERSION 3
|
||||
struct __DRI2flushExtensionRec {
|
||||
__DRIextension base;
|
||||
void (*flush)(__DRIdrawable *drawable);
|
||||
|
||||
/**
|
||||
* Flush all rendering queue in the driver to the drm and
|
||||
* invalidate all buffers. The driver will call out to
|
||||
* getBuffers/getBuffersWithFormat before it starts rendering
|
||||
* again.
|
||||
* Ask the driver to call getBuffers/getBuffersWithFormat before
|
||||
* it starts rendering again.
|
||||
*
|
||||
* \param drawable the drawable to flush and invalidate
|
||||
* \param drawable the drawable to invalidate
|
||||
*
|
||||
* \since 2
|
||||
* \since 3
|
||||
*/
|
||||
void (*flushInvalidate)(__DRIdrawable *drawable);
|
||||
void (*invalidate)(__DRIdrawable *drawable);
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user