Skip to content

Commit 37314de

Browse files
committed
Refactoring ImageProviders
- Remove class StaticZoomUpdater
1 parent 284cbb8 commit 37314de

File tree

1 file changed

+0
-22
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics

1 file changed

+0
-22
lines changed

bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java

-22
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import org.eclipse.swt.internal.DPIUtil.*;
2323
import org.eclipse.swt.internal.gdip.*;
2424
import org.eclipse.swt.internal.win32.*;
25-
import org.eclipse.swt.widgets.*;
2625

2726
/**
2827
* Instances of this class are graphics which have been prepared
@@ -2036,27 +2035,6 @@ public static Image win32_new(Device device, int type, long handle) {
20362035
return image;
20372036
}
20382037

2039-
//This class is only used for a workaround and will be removed again
2040-
private class StaticZoomUpdater implements AutoCloseable {
2041-
private final boolean updateStaticZoom;
2042-
private final int currentNativeDeviceZoom;
2043-
2044-
private StaticZoomUpdater(int targetZoom) {
2045-
this.currentNativeDeviceZoom = DPIUtil.getNativeDeviceZoom();
2046-
this.updateStaticZoom = this.currentNativeDeviceZoom != targetZoom && device instanceof Display display && display.isRescalingAtRuntime();
2047-
if (updateStaticZoom) {
2048-
DPIUtil.setDeviceZoom(targetZoom);
2049-
}
2050-
}
2051-
2052-
@Override
2053-
public void close() {
2054-
if (updateStaticZoom) {
2055-
DPIUtil.setDeviceZoom(currentNativeDeviceZoom);
2056-
}
2057-
}
2058-
}
2059-
20602038
private abstract class AbstractImageProviderWrapper {
20612039
abstract Object getProvider();
20622040
abstract ImageData getImageData(int zoom);

0 commit comments

Comments
 (0)