summaryrefslogtreecommitdiff
path: root/randr/randrstr.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-12-03 13:00:46 -0800
committerKeith Packard <keithp@keithp.com>2010-12-06 20:08:48 -0800
commit82612045e11f2b882ae132e184a9629f43f1c424 (patch)
treedb71c14343191f4dbd6c5916a3b40f5974a4327c /randr/randrstr.h
parent86c489c319c705f710bee3897fe27600ce15008e (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/randrstr.h')
-rw-r--r--randr/randrstr.h48
1 files changed, 45 insertions, 3 deletions
diff --git a/randr/randrstr.h b/randr/randrstr.h
index 2fe960234..c23197219 100644
--- a/randr/randrstr.h
+++ b/randr/randrstr.h
@@ -123,6 +123,7 @@ struct _rrCrtc {
CARD16 *gammaGreen;
void *devPrivate;
Bool transforms;
+ PixmapPtr scanoutPixmap;
RRTransformRec client_pending_transform;
RRTransformRec client_current_transform;
PictTransform client_sprite_position_transform;
@@ -198,7 +199,8 @@ typedef Bool (*RRCrtcSetProcPtr) (ScreenPtr pScreen,
int y,
Rotation rotation,
int numOutputs,
- RROutputPtr *outputs);
+ RROutputPtr *outputs,
+ PixmapPtr scanout_pixmap);
typedef Bool (*RRCrtcSetGammaProcPtr) (ScreenPtr pScreen,
RRCrtcPtr crtc);
@@ -264,6 +266,20 @@ typedef Bool (*RRSetConfigProcPtr) (ScreenPtr pScreen,
#endif
+typedef struct {
+ PictFormatPtr format;
+ int maxWidth, maxHeight;
+ int depth;
+ Rotation rotations;
+} RRScanoutPixmapInfo;
+
+typedef RRScanoutPixmapInfo *(*RRQueryScanoutPixmapsPtr) (ScreenPtr pScreen,
+ int *num_info);
+
+typedef PixmapPtr (*RRCreateScanoutPixmapPtr) (ScreenPtr pScreen,
+ int width, int height, int depth,
+ Rotation rotations,
+ PictFormatPtr format);
typedef void (*RRSetCrtcSpriteTransformPtr) (ScreenPtr pScreen,
RRCrtcPtr randr_crtc,
@@ -303,6 +319,8 @@ typedef struct _rrScrPriv {
RRGetPanningProcPtr rrGetPanning;
RRSetPanningProcPtr rrSetPanning;
#endif
+ RRQueryScanoutPixmapsPtr rrQueryScanoutPixmaps;
+ RRCreateScanoutPixmapPtr rrCreateScanoutPixmap;
RRSetCrtcSpriteTransformPtr rrSetCrtcSpriteTransform;
RRGetCrtcSpriteTransformPtr rrGetCrtcSpriteTransform;
RRSetCrtcConfigsPtr rrSetCrtcConfigs;
@@ -333,6 +351,8 @@ typedef struct _rrScrPriv {
/* Last known pointer position */
RRCrtcPtr pointerCrtc;
+ RRScanoutPixmapInfo *scanout_info;
+ int n_scanout_info;
#ifdef RANDR_10_INTERFACE
/*
* Configuration information
@@ -347,6 +367,7 @@ typedef struct _rrScrPriv {
int rate;
int size;
#endif
+
} rrScrPrivRec, *rrScrPrivPtr;
extern _X_EXPORT DevPrivateKeyRec rrPrivKeyRec;
@@ -521,6 +542,9 @@ RRGetRotation (ScreenPtr pScreen);
extern _X_EXPORT CARD16
RRVerticalRefresh (xRRModeInfo *mode);
+extern _X_EXPORT RRScanoutPixmapInfo *
+RRQueryScanoutPixmapInfo(ScreenPtr screen, int *n_info);
+
#ifdef RANDR_10_INTERFACE
/*
* This is the old interface, deprecated but left
@@ -599,7 +623,8 @@ RRCrtcNotify (RRCrtcPtr crtc,
Rotation rotation,
RRTransformPtr transform,
int numOutputs,
- RROutputPtr *outputs);
+ RROutputPtr *outputs,
+ PixmapPtr scanoutPixmap);
extern _X_EXPORT void
RRDeliverCrtcEvent (ClientPtr client, WindowPtr pWin, RRCrtcPtr crtc);
@@ -614,7 +639,8 @@ RRCrtcSet (RRCrtcPtr crtc,
int y,
Rotation rotation,
int numOutput,
- RROutputPtr *outputs);
+ RROutputPtr *outputs,
+ PixmapPtr scanout_pixmap);
/*
* Request that the Crtc gamma be changed
@@ -643,6 +669,10 @@ RRCrtcGammaGet(RRCrtcPtr crtc);
extern _X_EXPORT Bool
RRCrtcGammaNotify (RRCrtcPtr crtc);
+void
+RRModeGetScanoutSize (RRModePtr mode, struct pixman_f_transform *transform,
+ int *width, int *height);
+
/*
* Set the size of the gamma table at server startup time
*/
@@ -778,11 +808,23 @@ RRCrtcSpriteTransformSet(RRCrtcPtr crtc,
struct pict_f_transform *f_image_transform);
int
+ProcRRQueryScanoutPixmaps (ClientPtr client);
+
+int
+ProcRRCreateScanoutPixmap (ClientPtr client);
+
+int
+ProcRRSetCrtcPixmapConfig (ClientPtr client);
+
+int
ProcRRSetCrtcSpriteTransform (ClientPtr client);
int
ProcRRGetCrtcSpriteTransform (ClientPtr client);
+int
+ProcRRSetCrtcConfigs (ClientPtr client);
+
/* rrdispatch.c */
extern _X_EXPORT Bool
RRClientKnowsRates (ClientPtr pClient);