HildonRemoteTexture tearing/flicker

2010-01-12 Thread Javier S. Pedro
Hi all,

I am doing some experiments on using HildonRemoteTexture from a bare
X11/SDL app -- basically to get sgx accelerated scaling in apps that
wouldn't otherwise use the sgx for anything else. It works, but there
seems to be some race condition where the compositor is reading the
shared memory area _before_ I send the damage client event to the
remote texture X window. This of course cause visible tearing or even
flicker if the texture is drawn while (for example) the SNES emulator
is just in the middle of rendering any of the background layers, which
tends to happen often depending on CPU load / framerate.

Note I'm using HildonRemoteTexture instead of AnimationActor because I
need no rotation nor any of the actor features and using H-R-T is
slightly simpler -- no need to use any of the MIT-SHM functions. But I
have to wonder, seeing how the H-R-T API is falling behind if it is
going to be deprecated in the future.

Feel free to comment on whether this is a good approach or not, too.

Eero wrote:
 hildon-desktop automatically switches to composited mode when needed.

Hopefully this includes having a child animation actor / remote texture :)

Javier.
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: HildonRemoteTexture tearing/flicker

2010-01-12 Thread Kimmo Hämäläinen
On Tue, 2010-01-12 at 14:47 +0100, ext Javier S. Pedro wrote:
 Hi all,
 
 I am doing some experiments on using HildonRemoteTexture from a bare
 X11/SDL app -- basically to get sgx accelerated scaling in apps that
 wouldn't otherwise use the sgx for anything else. It works, but there
 seems to be some race condition where the compositor is reading the
 shared memory area _before_ I send the damage client event to the
 remote texture X window. This of course cause visible tearing or even
 flicker if the texture is drawn while (for example) the SNES emulator
 is just in the middle of rendering any of the background layers, which
 tends to happen often depending on CPU load / framerate.

Hmm, I see that the remote texture should update on its own damage
ClientMessage, but I don't see where the normal damage handling (for
XDamage) ignores remote textures. Maybe we are handling the normal X
damage events for your window also -- that would explain if it gets
updated before you have sent the magic ClientMessage.

 Note I'm using HildonRemoteTexture instead of AnimationActor because I
 need no rotation nor any of the actor features and using H-R-T is
 slightly simpler -- no need to use any of the MIT-SHM functions. But I
 have to wonder, seeing how the H-R-T API is falling behind if it is
 going to be deprecated in the future.

It's going to be valid in Fremantle but most probably not in Harmattan,
because applications are more OpenGL-oriented there.

 Feel free to comment on whether this is a good approach or not, too.
 
 Eero wrote:
  hildon-desktop automatically switches to composited mode when needed.
 
 Hopefully this includes having a child animation actor / remote texture :)

Please use the git HEAD of hildon-desktop, libmatchbox2 and clutter0.8
to make sure... :)

-Kimmo

 
 Javier.
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: HildonRemoteTexture tearing/flicker

2010-01-12 Thread Kimmo Hämäläinen
On Tue, 2010-01-12 at 15:30 +0100, Hamalainen Kimmo (Nokia-D/Helsinki)
wrote:
 On Tue, 2010-01-12 at 14:47 +0100, ext Javier S. Pedro wrote:
  Hi all,
...
 Please use the git HEAD of hildon-desktop, libmatchbox2 and clutter0.8
 to make sure... :)

I checked that Image Viewer is not using remote texture at all, so the
implementation could easily break by accident. Therefore you should
indeed check the git version or use animation actor instead.

-Kimmo

 
 -Kimmo
 
  
  Javier.
  ___
  maemo-developers mailing list
  maemo-developers@maemo.org
  https://lists.maemo.org/mailman/listinfo/maemo-developers
 
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers