Proposal for per-CRTC pixmaps in RandR

Keith Packard keithp at keithp.com
Fri May 7 11:46:47 PDT 2010


On Fri, 07 May 2010 10:30:16 -0400, Adam Jackson <ajax at nwnk.net> wrote:

> 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?

Some clarification appears necessary. The size is the area drawable by
applications, as the rotation occurs during scanout, not rendering. So,
if you want to create a 1200x1920 scanout pixmap to be rotated onto a
1920x1200 monitor, then the size requested would be 1200x1920. If you
want to support both rotations, you'd create a 1920x1920 pixmap.

I'll work on fixing the wording for this.

> I can _almost_ see the justification for this, but it sure feels like it
> belongs in Composite not RANDR.

Yeah, it could go in Composite too. The whole reason I added this
request is so that we could use the existing GL semantics for double
buffering on windows, but Ian suggests that we might just as easily
define semantics for double buffering on pixmaps and avoid this whole
issue. Perhaps that would be a better plan?

> And wow does this ever raise a lot of
> semantic questions.  What happens when the window is resized?

"Rendering is clipped to the intersection of the window size and pixmap
 size."

The pixmap is never resized, you just get clipping.

> What happens when it's unmapped?

An unmapped window doesn't draw anything anywhere. 

> Which of the two drawables does the
> application render to, and what happens if it renders to the other
> one?

Just like the existing Composite 'NameWindowPixmap', you've got two
names for the same drawable now; rendering can occur on either one.

> Does setting the window pixmap change its redirection state?  If so, to
> what?

Right. The window would be manually redirected; the whole point of this
exercise is to provide a window handle to a non-screen pixmap.

> 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?

You'd get another name for the pixmap set by the other client.

> 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.

How about we just not do this piece until we sort out how we actually
want to provide GL support for per-crtc pixmaps. That seems far safer to me...

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100507/f39b030e/attachment.pgp>


More information about the xorg-devel mailing list