Painting images using PixelWriter
Jasper Potts
jasper.potts at oracle.com
Mon Jun 4 13:17:52 PDT 2012
Hi,
There will always be at minimum one copy operation because JavaFX runs on two threads. So at the point when you set pixels a copy will be made so it can be safe to access that new copy from our internal render thread. So you can have your own ByteBuffer access from native and every time you call setPixels a copy will be taken for the JavaFX platform to use. So you will need to make sure the content is static during that setPixels (copy) operation.
Jasper
On Jun 4, 2012, at 2:06 AM, Tobias Bley wrote:
> Hi,
>
> since JFX 2.2 there is the new class PixelWriter. Would it be possible to draw Images like from a webcam using a shared ByteBuffer (or IntBuffer)? Wo what I would like to do is to fill a shared ByteBuffer from C (with JNI) and use the same bytebuffer for the JavaFX Image object....
>
> Best regards,
> Tobi
>
>
>
> --
> Tobias Bley
> Chief Executive Officer
>
> --------------------------------------------------------
>
> UltraMixer Digital Audio Solutions
> Schillerstraße 29
> D-01326 Dresden
> Germany
>
> --------------------------------------------------------
> bley at ultramixer.com http://www.ultramixer.com
>
>
>
More information about the openjfx-dev
mailing list