Enable startup-time rotation; change rotation pixmap creation API.

Add monitor "Rotate" option taking one of "normal", "left", "inverted" or
"right". However, because initial mode selection is made before the screen
is completely initialized, we cannot create the shadow pixmap object at this
point. Pend the shadow pixmap creation until the block handler.

Note that this code is not completely functional yet.
This commit is contained in:
Keith Packard 2007-02-16 00:41:29 -08:00
commit e4507825bf
7 changed files with 172 additions and 77 deletions

View file

@ -111,17 +111,23 @@ typedef struct _xf86CrtcFuncs {
(*gamma_set)(xf86CrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue,
int size);
/**
* Allocate the shadow area, delay the pixmap creation until needed
*/
void *
(*shadow_allocate) (xf86CrtcPtr crtc, int width, int height);
/**
* Create shadow pixmap for rotation support
*/
PixmapPtr
(*shadow_create) (xf86CrtcPtr crtc, int width, int height);
(*shadow_create) (xf86CrtcPtr crtc, void *data, int width, int height);
/**
* Destroy shadow pixmap
*/
void
(*shadow_destroy) (xf86CrtcPtr crtc, PixmapPtr pPixmap);
(*shadow_destroy) (xf86CrtcPtr crtc, PixmapPtr pPixmap, void *data);
/**
* Clean up driver-specific bits of the crtc
@ -159,6 +165,8 @@ struct _xf86Crtc {
DisplayModeRec mode;
Rotation rotation;
PixmapPtr rotatedPixmap;
void *rotatedData;
/**
* Position on screen
*
@ -356,6 +364,11 @@ struct _xf86Output {
*/
int initial_x, initial_y;
/**
* Desired initial rotation
*/
Rotation initial_rotation;
/**
* Current connection status
*