Commit 812289e
[Win32] Remove obsolete zoom parameter for refreshing GC handle
When refreshing a GC with another zoom, that zoom is unnecessarily
duplicated in the DrawableWrapper of the Image and as a parameter of the
refresh method of the GC. This refresh method than unnecessarily uses
that zoom to initialize the GCData's native zoom with it, even though
that's overwritten with the proper zoom by initializing the GC with the
DrawableWrapper afterwards.
This change removes the zoom duplication by removing the parameter in
the refresh method of the GC. It removes the unnecessary assignment of
the GCData's native zoom and moves the check for whether a refresh is
necessary because of a zoom change from the GC to the image. In
addition, it ensures that the memGC of an image is not accidentally set
to null in case the memGC's zoom does already fit to the requested zoom.1 parent 97855ad commit 812289e
File tree
2 files changed
+9
-11
lines changed- bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics
2 files changed
+9
-11
lines changedLines changed: 3 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5833 | 5833 | | |
5834 | 5834 | | |
5835 | 5835 | | |
5836 | | - | |
| 5836 | + | |
5837 | 5837 | | |
5838 | | - | |
5839 | | - | |
5840 | | - | |
5841 | 5838 | | |
5842 | 5839 | | |
5843 | 5840 | | |
5844 | | - | |
| 5841 | + | |
5845 | 5842 | | |
5846 | 5843 | | |
5847 | 5844 | | |
| |||
5947 | 5944 | | |
5948 | 5945 | | |
5949 | 5946 | | |
5950 | | - | |
5951 | | - | |
| 5947 | + | |
5952 | 5948 | | |
5953 | 5949 | | |
5954 | 5950 | | |
| |||
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2177 | 2177 | | |
2178 | 2178 | | |
2179 | 2179 | | |
2180 | | - | |
2181 | | - | |
2182 | | - | |
2183 | | - | |
| 2180 | + | |
| 2181 | + | |
| 2182 | + | |
| 2183 | + | |
| 2184 | + | |
| 2185 | + | |
2184 | 2186 | | |
2185 | 2187 | | |
2186 | 2188 | | |
| |||
0 commit comments