diff options
author | Dave Airlie <airlied@redhat.com> | 2012-06-20 12:37:12 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-07-07 10:37:10 +0100 |
commit | f2da2c12042d3447b1c954e7301632d174a08b4f (patch) | |
tree | 9db604533955ea3b1332a55d5cd73be4d50c8c82 /randr/randrstr.h | |
parent | 0b0e7148925e1f835d4f4f06e402a97023531828 (diff) |
randr: add initial scanout pixmap support (v3)
When randr notices a crtc configuration request for a slave device,
it checks if the slave allocated pixmap exists and is suitable,
if not it allocates a new shared pixmap from the master, shares
it to the slave, and starts the master tracking damage to it,
to keep it updated from the current front pixmap.
If the resize means the crtc is no longer used it will destroy
the slave pixmap.
This adds the concept of a scanout_pixmap to the randr_crtc object,
and also adds a master pixmap pointer to the pixmap object, along
with defining some pixmap helper functions for getting pixmap box/regions.
v2: split out pixmap sharing to a separate function.
v3: update for void *
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'randr/randrstr.h')
-rw-r--r-- | randr/randrstr.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/randr/randrstr.h b/randr/randrstr.h index 3dac63326..ac93414cc 100644 --- a/randr/randrstr.h +++ b/randr/randrstr.h @@ -127,6 +127,8 @@ struct _rrCrtc { PictTransform transform; struct pict_f_transform f_transform; struct pict_f_transform f_inverse; + + PixmapPtr scanout_pixmap; }; struct _rrOutput { @@ -242,6 +244,8 @@ typedef Bool (*RRSetConfigProcPtr) (ScreenPtr pScreen, #endif +typedef Bool (*RRCrtcSetScanoutPixmapProcPtr)(RRCrtcPtr crtc, PixmapPtr pixmap); + typedef struct _rrScrPriv { /* * 'public' part of the structure; DDXen fill this in @@ -265,6 +269,8 @@ typedef struct _rrScrPriv { RRGetPanningProcPtr rrGetPanning; RRSetPanningProcPtr rrSetPanning; #endif + /* TODO #if RANDR_15_INTERFACE */ + RRCrtcSetScanoutPixmapProcPtr rrCrtcSetScanoutPixmap; RRProviderGetPropertyProcPtr rrProviderGetProperty; RRProviderSetPropertyProcPtr rrProviderSetProperty; @@ -649,6 +655,12 @@ extern _X_EXPORT void RRCrtcInitErrorValue(void); /* + * Detach and free a scanout pixmap + */ +extern _X_EXPORT void + RRCrtcDetachScanoutPixmap(RRCrtcPtr crtc); + +/* * Crtc dispatch */ |