Proposal for per-CRTC pixmaps in RandR

Adam Jackson ajax at nwnk.net
Fri May 7 07:30:16 PDT 2010


On Thu, 2010-05-06 at 15:12 -0700, Keith Packard wrote:

> +┌───
> +    RRCreateScanoutPixmap
> +	pixmap: PIXMAP
> +	window: WINDOW
> +	width, height: CARD16
> +	format: PICTFORMAT
> +	rotations: SETofROTATION
> +└───
> +	Errors: Window, Match, Value
> +
> +	Creates a pixmap which can subsequently be used as a scanout
> +	buffer for the screen associated with 'window'. 'rotations' is
> +	the set of rotation values which may be used with the
> +	resulting scanout buffer. 'rotations' must be a subset of the
> +	supported rotations or a Match error results. width and height
> +	must be within the supported range or a Value error
> +	results. 'format' must be one of the supported formats or
> +	Match error results.

Which way around do rotations apply?  If I want my 1920x1200 screen
rotated right, rotations presumably includes Right, but is my pixmap
1920 wide or 1200 wide?

> +┌───
> +    RRSetWindowPixmap
> +	window: WINDOW
> +	pixmap: PIXMAP
> +└───
> +	Errors: Window, Pixmap, Match
> +
> +	Mirroring the Composite extension NameWindowPixmap request,
> +	this sets the pixmap used for off-screen storage of window
> +	contents. Pixmap and Window must be the same depth and screen
> +	or a Match error results. Rendering is clipped to the
> +	intersection of the window size and pixmap size. The window 
> +	origin is set at the pixmap origin.

I can _almost_ see the justification for this, but it sure feels like it
belongs in Composite not RANDR.  And wow does this ever raise a lot of
semantic questions.  What happens when the window is resized?  What
happens when it's unmapped?  Which of the two drawables does the
application render to, and what happens if it renders to the other one?
Does setting the window pixmap change its redirection state?  If so, to
what?  If not, what does it mean to set the window pixmap for a
non-redirected window?  Does setting the window pixmap generate damage?
If not, do we need some other way for applications to know when a window
has been pixmapped?  When you NameWindowPixmap a window that's been
SWP'd, what happens?

I realize this is supposed to be a feint to make it possible to
glXSwapBuffers directly into a scanout pixmap, but it seems like a
really shiny loaded gun.  I really want to nail down exactly what we'd
be promising.

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100507/95dbe5ec/attachment.pgp>


More information about the xorg-devel mailing list