Skip to content
Commit f7c34177 authored by John Neffenger's avatar John Neffenger
Browse files

Compare buffers without rewinding them

The QuantumRenderer calls the getPixels() method while trying to find a
buffer that's not in use, yet in doing so it can inadvertently rewind a
buffer in use by the JavaFX Application Thread. The stack of the call to
rewind() is:

"QuantumRenderer-0"
    at com.sun.glass.ui.Pixels.getPixels
        (Pixels.java:164)
    at com.sun.prism.impl.QueuedPixelSource.usesSameBuffer
        (QueuedPixelSource.java:103)
    at com.sun.prism.impl.QueuedPixelSource.getUnusedPixels
        (QueuedPixelSource.java:129)
    ...

Create a new method, getBuffer(), that returns the same ByteBuffer or
IntBuffer as getPixels() but does not rewind it, and change the method
usesSameBuffer(Pixels, Pixels) to call it instead of getPixels().

Fixes #1
parent a9236ad2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment