[Rev 04] RFR: 8088198: Exception thrown from snapshot if dimensions are larger than max texture size

Frederic Thevenet github.com+7450507+fthevenet at openjdk.java.net
Fri Jan 31 11:16:34 UTC 2020

On Thu, 30 Jan 2020 08:15:39 GMT, Ambarish Rapte <arapte at openjdk.org> wrote:

>> The pull request has been updated with 1 additional commit.
> With my basic testing, the change looks good, scaled up and scaled down snapshots seem correct visually.
> After this change the tiled snapshot will be limited by dimensions of the `WritableImage`.
> We can not create a `WritableImage` of dimension `(8192 * 3, 8192 * 3)` or greater.
> `new WritableImage(8192 * 3, 8192 * 3)`  causes an exception.
> java.lang.IllegalArgumentException: capacity < 0: (-1879048192 < 0)
> 	at java.base/java.nio.Buffer.createCapacityException(Buffer.java:257)
> This is an existing behavior of `WritableImage`.
> May be we should consider to wrap and re-throw the exception and update the API JavaDoc.
> Anyway not a stopper for this PR.
> Approving.

Since @kevinrushforth and @arapte have completed their review, is this ready to integrate?
I'm a little confused by the fact this has both `rfr` and `ready` labels attached; is this an expected behaviour?


PR: https://git.openjdk.java.net/jfx/pull/68

More information about the openjfx-dev mailing list