From 0e0c95e0a91069284816ad48fae7de91a166e69a Mon Sep 17 00:00:00 2001 From: Vincent Wei Date: Thu, 19 Mar 2020 22:28:55 +0800 Subject: [PATCH] tune map_buffer: add scanout argument --- include/exstubs.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/exstubs.h b/include/exstubs.h index afda5076..2e5dfb45 100644 --- a/include/exstubs.h +++ b/include/exstubs.h @@ -127,6 +127,8 @@ typedef struct _DrmSurfaceBuffer { uint32_t cpp:8; /** Is it a dumb buffer. Since 5.0.0. */ uint32_t dumb:1; + /** Is it a scanout buffer. Since 5.0.0. */ + uint32_t scanout:1; /** The width of the buffer. */ uint32_t width; @@ -257,11 +259,15 @@ typedef struct _DrmDriverOps { * This operation maps the buffer into the current process's virtual memory * space, and returns the virtual address. If failed, it returns NULL. * + * When \a for_scanout is not zero, the buffer will be used for scan out + * frame buffer. + * * \note The driver must implement this operation. The driver must * set a valid value for buff field of the DrmSurfaceBuffer object * on success. */ - uint8_t* (* map_buffer) (DrmDriver *driver, DrmSurfaceBuffer* buffer); + uint8_t* (* map_buffer) (DrmDriver *driver, DrmSurfaceBuffer* buffer, + int for_scanout); /** * This operation un-maps a buffer.