Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,9 @@ private InternalImageHandle getOrCreateImageHandleAtClosestSize(int widthHint, i
int imageZoomForWidth = 100 * widthHint / bounds.width;
int imageZoomForHeight = 100 * heightHint / bounds.height;
int imageZoom = DPIUtil.getZoomForAutoscaleProperty(Math.max(imageZoomForWidth, imageZoomForHeight));
if (imageZoom == 100) {
return getHandleInternal(100, 100);
}
InternalImageHandle bestFittingHandle = imageHandleManager.get(imageZoom);
if (bestFittingHandle == null) {
ImageData bestFittingImageData = imageProvider.loadImageData(imageZoom).element();
Expand Down Expand Up @@ -957,6 +960,10 @@ public static long win32_getHandle (Image image, int zoom) {
}

ImageHandle getHandle (int targetZoom, int nativeZoom) {
return getHandleInternal(targetZoom, nativeZoom);
}

private InternalImageHandle getHandleInternal(int targetZoom, int nativeZoom) {
if (isDisposed()) {
return null;
}
Expand Down
Loading