randr: Implement RRSetCrtcConfigs

This provides a driver-independent implementation of the
RRSetCrtcConfigs API by simply using the existing interfaces.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
This commit is contained in:
Keith Packard 2010-12-04 19:22:11 -08:00
commit d94a035ea9
6 changed files with 750 additions and 44 deletions

View file

@ -190,6 +190,24 @@ RRScreenSizeSet (ScreenPtr pScreen,
return FALSE;
}
/*
* Compute an RRScreenConfig from the current screen information
*/
void
RRScreenCurrentConfig(ScreenPtr screen,
RRScreenConfigPtr screen_config)
{
PixmapPtr screen_pixmap = screen->GetScreenPixmap(screen);
WindowPtr root = screen->root;
screen_config->screen_pixmap_width = screen_pixmap->drawable.width;
screen_config->screen_pixmap_height = screen_pixmap->drawable.height;
screen_config->screen_width = root->drawable.width;
screen_config->screen_height = root->drawable.height;
screen_config->mm_width = screen->mmWidth;
screen_config->mm_height = screen->mmHeight;
}
/*
* Retrieve valid screen size range
*/