Synchronizing graphics with Cacio

Mario Torre neugens.limasoftware at gmail.com
Wed Apr 22 15:58:08 UTC 2015


2015-04-22 17:47 GMT+02:00 Roman Kennke <roman at kennke.org>:
> Hi Ralf,
>
> Nice to hear from you :-)
>
> Flushing queues is a tricky thing. I don't think that PaintEvents are
> handled in Cacio, because it comes from Java, not from the backend.
> handleEvent() only bubbles up events from the backend.
>
> Even worse, not all painting comes from PainEvents. It is possible to
> get a Graphics, and do some rendering directly.
>
> A safe (but slow) approach would be to flush after each primitive.
> What you probably want is to flush after each 'paint job' which is what
> your event would do. I believe this is only possible using some smart
> heuristic, like 'flush after N primitives OR after a certain timeout
> after the last paint primitive'. But this is not trivial.

Thinking about that, syncing with the refresh cycle (or a multiple of
it) may be the best way to flush the OpenGL queue, especially if your
Surface data is a texture.

Cheers,
Mario

-- 
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Java Champion - Blog: http://neugens.wordpress.com - Twitter: @neugens
Proud GNU Classpath developer: http://www.classpath.org/
OpenJDK: http://openjdk.java.net/projects/caciocavallo/

Please, support open standards:
http://endsoftpatents.org/


More information about the caciocavallo-dev mailing list