Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8201567: QuantumRenderer modifies buffer in use by JavaFX Application Thread #255

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -191,8 +191,13 @@ public final Buffer getPixels() {
* @return the original pixels buffer, unmodified
*/
public final Buffer getBuffer() {
assert this.bytes != null || this.ints != null;
return this.bytes != null ? this.bytes : this.ints;
if (this.bytes != null) {
return this.bytes;
} else if (this.ints != null) {
return this.ints;
} else {
throw new RuntimeException("Unexpected Pixels state.");
}
}

/*
@@ -231,14 +231,7 @@ public synchronized void shutdown() {

@Override
public synchronized void uploadPixels(Buffer b, int x, int y, int width, int height, float alpha) {
assert b.mark() == b;
pixels.composePixels(b, x, y, width, height, alpha);
/*
* When enabled, throws an InvalidMarkException if the buffer is
* modified by a clear, flip, or rewind operation on another thread
* while in use by this method on the JavaFX Application Thread.
*/
assert b.reset() == b;
}

@Override
@@ -115,14 +115,7 @@ public void shutdown() {
public void uploadPixels(Buffer b,
int x, int y, int width, int height,
float alpha) {
assert b.mark() == b;
fb.composePixels(b, x, y, width, height, alpha);
/*
* When enabled, throws an InvalidMarkException if the buffer is
* modified by a clear, flip, or rewind operation on another thread
* while in use by this method on the JavaFX Application Thread.
*/
assert b.reset() == b;
}

@Override
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.