RFR: 8342530: Specifying "@Nx" scaling level in ImageStorage should only load that specific level [v2]

Lukasz Kostyra lkostyra at openjdk.org
Fri May 16 07:03:38 UTC 2025


> This follow-up change finishes the earlier changes to `ImageStorage.loadAll()` and adds support for loading specific scale requested in the input.
> 
> `loadAll()` will now first check if the input path ends with a scaling level specified, and if that is the case it will attempt creating a Stream. If requested resource does not exist it will throw an Exception, skipping the rest of the load process. If the resource does _not_ have a scaled name in its path, it will continue loading as normal - looking for all scale levels, trying to load the main resource and falling back to trying to load "@1x" variant.
> 
> Added tests to check the new `ImageTools.hasScaledName()` method + new behavior.

Lukasz Kostyra has updated the pull request incrementally with one additional commit since the last revision:

  Replace hasScaledName logic with regex

-------------

Changes:
  - all: https://git.openjdk.org/jfx/pull/1809/files
  - new: https://git.openjdk.org/jfx/pull/1809/files/44c41763..64e8c2e0

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jfx&pr=1809&range=01
 - incr: https://webrevs.openjdk.org/?repo=jfx&pr=1809&range=00-01

  Stats: 22 lines in 1 file changed: 7 ins; 14 del; 1 mod
  Patch: https://git.openjdk.org/jfx/pull/1809.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/1809/head:pull/1809

PR: https://git.openjdk.org/jfx/pull/1809


More information about the openjfx-dev mailing list