diff options
author | Keith Packard <keithp@keithp.com> | 2010-12-03 13:00:46 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2010-12-06 20:08:48 -0800 |
commit | 82612045e11f2b882ae132e184a9629f43f1c424 (patch) | |
tree | db71c14343191f4dbd6c5916a3b40f5974a4327c /randr/randr.c | |
parent | 86c489c319c705f710bee3897fe27600ce15008e (diff) |
randr: Add per-crtc pixmaps
This adds new driver hooks to allocate scanout pixmaps and
changes the mode setting APIs to pass the new scanout pixmaps
along from DIX. DIX is responsible for reference counting the pixmaps
by tracking them through RRCrtcNotify.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Diffstat (limited to 'randr/randr.c')
-rw-r--r-- | randr/randr.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/randr/randr.c b/randr/randr.c index 607770520..c22657ee2 100644 --- a/randr/randr.c +++ b/randr/randr.c @@ -98,6 +98,7 @@ RRCloseScreen (int i, ScreenPtr pScreen) free(pScrPriv->crtcs); free(pScrPriv->outputs); + free(pScrPriv->scanout_info); free(pScrPriv); RRNScreens -= 1; /* ok, one fewer screen with RandR running */ return (*pScreen->CloseScreen) (i, pScreen); @@ -248,6 +249,8 @@ Bool RRScreenInit(ScreenPtr pScreen) pScrPriv->rrCrtcSet = NULL; pScrPriv->rrCrtcSetGamma = NULL; #endif + pScrPriv->scanout_info = NULL; + pScrPriv->n_scanout_info = 0; #if RANDR_10_INTERFACE pScrPriv->rrSetConfig = 0; pScrPriv->rotations = RR_Rotate_0; @@ -482,6 +485,18 @@ RRVerticalRefresh (xRRModeInfo *mode) return (CARD16) refresh; } +RRScanoutPixmapInfo * +RRQueryScanoutPixmapInfo(ScreenPtr screen, int *n_info) +{ + rrScrPriv(screen); + + if (!pScrPriv->scanout_info && pScrPriv->rrQueryScanoutPixmaps) + pScrPriv->scanout_info = pScrPriv->rrQueryScanoutPixmaps(screen, + &pScrPriv->n_scanout_info); + *n_info = pScrPriv->n_scanout_info; + return pScrPriv->scanout_info; +} + static int ProcRRDispatch (ClientPtr client) { |