Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[win32] No handle creation on Image::getBounds #1643

Conversation

akoch-yatta
Copy link
Contributor

This commit adapts the bounds calculation in Image to not create any handle, but use and scale the bounds of an existing handle if no handle for the desired zoom is available

Fixes #1639

This commit adapts the bounds calculation in Image to not create any handle, but use and scale the bounds of an existing handle if no handle for the desired zoom is available

Fixes eclipse-platform#1639
Copy link
Contributor

Test Results

   383 files  ±0     383 suites  ±0   5m 9s ⏱️ +5s
 4 095 tests ±0   4 088 ✅ ±0   7 💤 ±0  0 ❌ ±0 
12 147 runs  ±0  12 064 ✅ ±0  83 💤 ±0  0 ❌ ±0 

Results for commit e04ebe4. ± Comparison against base commit 2ece1af.

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.

The change looks good to me.

@tobiasmelcher may I ask you to validate whether this is a proper fix for #1639?

Copy link
Contributor

@tobiasmelcher tobiasmelcher left a comment

Choose a reason for hiding this comment

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

fix works fine in our scenario. "Graphic is disposed" SWTException is no longer thrown.

@HeikoKlare
Copy link
Contributor

Thank you for the quick validation!

Test failures are unrelated and documented:

@HeikoKlare HeikoKlare merged commit f8cbe80 into eclipse-platform:master Dec 10, 2024
9 of 14 checks passed
@akoch-yatta akoch-yatta deleted the prevent-handle-creation-on-image-bounds-calculation branch January 13, 2025 11:37
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.

Regression: Exception After Image Refactoring "Graphic is disposed" on Windows with pull/1496
3 participants