Project: SWT
Bug 100665 Add Resource.getDevice()
Reported: 2005-06-17 16:42:47 | Status: resolved fixed

It would be really useful to if Resource had a getDevice() method. The JFace ImageDescriptors could use this when creating a descriptor from an existing resource. The descriptor is capable of reusing the existing image when asked for another image on the same device, but it frequently needs to create copies of the image in the (common) situations where the device is unknown. A getDevice() method would allow us to reduce the number of images created when a new image is created on the same device.

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/GC.java bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/Resource.java bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/GC.java bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java