[Rev 01] RFR: 8088198: Exception thrown from snapshot if dimensions are larger than max texture size
github.com+7450507+fthevenet at openjdk.java.net
Thu Jan 16 13:57:00 UTC 2020
On Thu, 16 Jan 2020 11:56:10 GMT, Michael Paus <mpaus at openjdk.org> wrote:
>> Assuming `Nb` in `verticalTileNb` stands for number, I would recommend to change the names as `numVerticalTiles` and `numHorizontalTiles`
> I think the proposed code changes are wrong in case that `height / maxTextureSize` is an exact integer. (Same for width). I normally add the 1 only if `height % maxTextureSize != 0`
Indeed, substituting the floating math for integer math requires an extra test on the remainder to be correct.
Since this code isn't located in a tight loop, I'm not sure this optimization is worth making the code less straight forward. What do you all think?
More information about the openjfx-dev