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

Kevin Rushforth kcr at openjdk.java.net
Fri Jan 31 13:02:07 UTC 2020

On Fri, 31 Jan 2020 11:16:22 GMT, Frederic Thevenet <github.com+7450507+fthevenet at openjdk.org> wrote:

>> 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?

Yes, this is ready for you to integrate. The `rfr` label is intentionally left there, since there might be review comments or questions that are still being addressed. In this case, there are no outstanding questions, so go ahead and integrate it. Either @arapte or I will sponsor it.


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

More information about the openjfx-dev mailing list