Hi All
I wrote some code using libXrandr to check the current screen rotation state
int CheckRotationState(Display * x11_dpy) {
Rotation current_rotation;
XRRScreenConfiguration *scrn_cfg;
scrn_cfg = XRRGetScreenInfo(x11_dpy, DefaultRootWindow(x11_dpy));
XRRConfigCurrentConfiguration (scrn_cfg, ¤t_rotation);
XRRFreeScreenConfigInfo(scrn_cfg);
return current_rotation;
}
CheckRotationState is put ahead of XvPutImage, that is to say every time I
want to display an image, I will firstly check the screen rotation state. If
the return value of CheckRotationState is RR_Rotate_0(There isn't any
rotation), I will use hardware overlay to display video, or I will use textured
blit way. But I found the performance degraded a lot after add
CheckRotationState. Seems that XRRGetScreenInfo consumes much time. I tried
another interface XRRRotations, but can only get the cached information, not
the current rotation state.
Does anyone have some good idea about how to get the screen rotation state from
the Server efficiently?
Best Regards
_______________________________________________
xorg-devel mailing list
[email protected]
http://lists.x.org/mailman/listinfo/xorg-devel