Skip to content

Conversation

@akoch-yatta
Copy link
Contributor

@akoch-yatta akoch-yatta commented Aug 11, 2025

This PR extends the internal zoom used in Image in the windows implementation to a complex object. This is preparatory work to provide a consistent behavior independent of the auto scale mode, e.g. when an Image is drawn with a GC.

The introduced ZoomContext is only used in one place with two different values for targetZoom and nativeZoom, in Image#applyUsingAnyHandle. This is the correct way to fill ZoomContext here, but the zoom does not matter for the usages of this method anyway.

The complex ZoomComplex object introduced in Image is a first step in unifying zoom semantics. We noticed that depending on the configured autoscale mode, different zoom calculations must be used. This led to multiple regressions in the previous releases. One simple example is the font zoom. In most cases it is equal to the native zoom of the monitor or primary monitor. With a fixed zoom, it should use the fixed zoom instead.
The goal is to move this logic into the (probably windows only) ZoomContext object, that will provide an abstract layer for this and hopefully improves testability as well.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 11, 2025

Test Results

   546 files  ±0     546 suites  ±0   31m 9s ⏱️ + 3m 28s
 4 425 tests ±0   4 408 ✅ ±0   17 💤 ±0  0 ❌ ±0 
16 746 runs  ±0  16 619 ✅ ±0  127 💤 ±0  0 ❌ ±0 

Results for commit 16da749. ± Comparison against base commit 51d6029.

♻️ This comment has been updated with latest results.

@akoch-yatta akoch-yatta force-pushed the win32-introduce-image-zoomcontext branch from 8f8cb1e to 52375f4 Compare August 11, 2025 09:59
@akoch-yatta akoch-yatta force-pushed the win32-introduce-image-zoomcontext branch from 52375f4 to 697f5cf Compare August 11, 2025 13:25
Copy link
Contributor

@HeikoKlare HeikoKlare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the latest updates of the PR!
The change is sound and adds the necessary capabilities for properly distinguishing native and target zoom to the Image class. This change alone (without the follow-up changes) does not have any user-perceivable effect. I tested with different auto-scale settings (monitor-specific on/off, fixed auto-scale) and did not find any changes in behavior.

This commit extends the internal zoom used in Image in the windows
implementation to a complex object. This is preparatory work to provide
a consistent behavior independent of the auto scale mode, e.g. when an
Image is drawn with a GC.
@HeikoKlare HeikoKlare force-pushed the win32-introduce-image-zoomcontext branch from 697f5cf to 16da749 Compare August 11, 2025 14:22
@HeikoKlare HeikoKlare merged commit 10cc2e6 into eclipse-platform:master Aug 11, 2025
17 checks passed
@HeikoKlare HeikoKlare deleted the win32-introduce-image-zoomcontext branch August 11, 2025 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants