[Mesa-dev] [RFC PATCH] Add ability to use libXrandr for OML_sync_control

Keith Packard keithp at keithp.com
Fri Jan 6 16:27:04 PST 2012


On Tue, 20 Sep 2011 15:37:20 -0400, Matt Turner <mattst88 at gmail.com> wrote:

> 	- checking for the appropriate Xrandr version.
> 	  XRRGetScreenResourcesCurrent is a 1.3 function. It's not totally
> 	  clear to me what the difference between it and XRRGetScreenResources
> 	  is. (These aren't documented in the man page)

XRRGetScreenResourcesCurrent returns the current modes without also
polling the hardware for changes. It's far cheaper, and should always be
used unless you plan on responding to changes. And, yes, you have to
check the randr version yourself. XRRQueryVersion will do that for you.

> 	- How do I know the current mode? resource->modes[0] can't be right.

Query the associated CRTC; the current mode is identified in there.

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120106/4d4887b8/attachment.pgp>


More information about the mesa-dev mailing list