Skip to content
Closed
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 @@ -2330,8 +2330,14 @@ private ImageHandle initializeHandleFromSource(int zoom) {

@Override
protected Rectangle getBounds(int zoom) {
ImageData imageData = getImageData(zoom);
return new Rectangle(0, 0, imageData.width, imageData.height);
if (cachedImageData.containsKey(zoom)) {
ImageData imageData = cachedImageData.get(zoom);
return new Rectangle(0, 0, imageData.width, imageData.height);
}
ElementAtZoom<ImageData> imageDataAtZoom = loadImageData(zoom);
ImageData imageData = imageDataAtZoom.element();
Rectangle currentSize = new Rectangle(0, 0, imageData.width, imageData.height);
return Win32DPIUtils.scaleBounds(currentSize, zoom, imageDataAtZoom.zoom());
}
}

Expand Down
Loading