VIGS: Fixed y-invert problem with texture_from_pixmap
authorStanislav Vorobiov <s.vorobiov@samsung.com>
Fri, 19 Apr 2013 07:34:14 +0000 (11:34 +0400)
committerStanislav Vorobiov <s.vorobiov@samsung.com>
Fri, 19 Apr 2013 07:34:14 +0000 (11:34 +0400)
commit46a0125a112a1e01398f32e7b29d8005ed859d68
treeb5b6e9c80355edd55d759688cb079475e12340f3
parent8ab1f6be7189411c2d7316e85efcdfc942fa8ec2
VIGS: Fixed y-invert problem with texture_from_pixmap

X.Org and OpenGL have different position of (0,0) point. X.Org's (0,0) is
at left-top corner and OpenGL's (0,0) is at left-bottom corner. texture_from_pixmap
does not specify where (0,0) is exactly, so Tizen currently treats it as X.Org.
Because of all this we used to map X.Org's (0,0) to OpenGL's (0,0) to avoid y-flipping, but it
turned out that it was wrong. Consider the case when both X.Org and OpenGL render to the pixmap
and then you try to XGetImage, what should VIGS do ? Should it just give away the contents or
should it y-flip it before ? To avoid this confusion we're forced to map X.Org's (0,0) to left-top
corener as it should be and this itself causes problems with Tizen. The only way to resolve this is
to let Tizen know that it should treat texture_from_pixmap's (0,0) as left-bottom corner.
There's an extension called EGL_NOK_texture_from_pixmap which defines EGL_Y_INVERTED_NOK config attribute,
we should implement it, patch Tizen's Evas GL to support it and then everything will work.
hw/vigs_gl_backend.c