Skip to content

Conversation

@akoch-yatta
Copy link
Contributor

This PR refactors Image#init for ImageData in the win32 implementation. Currently this method serves two purposes:

  1. creating handles for the given ImageData
  2. Doing 1. but additionally initializing an image with those handles

These two use cases are made more explicit refactoring this logic out into concrete methods. This is a necessary refactoring to be able to create all OS handles on demand and create temporary OS handles if neede.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 14, 2025

Test Results

   510 files  ±0     510 suites  ±0   9m 4s ⏱️ + 1m 55s
 4 345 tests ±0   4 331 ✅ ±0   14 💤 ±0  0 ❌ ±0 
16 613 runs  ±0  16 502 ✅ ±0  111 💤 ±0  0 ❌ ±0 

Results for commit 55c2e18. ± Comparison against base commit 0a0b40c.

♻️ This comment has been updated with latest results.

@akoch-yatta akoch-yatta force-pushed the refactor-init-with-imagedata branch 2 times, most recently from 9cd2005 to 441647e Compare March 14, 2025 10:05
This commit refactors Image#init for ImageData in the win32
implementation. Currently this method serves two purposes. Creating
handles for the given ImageData or additionally initializing an image
with those handles. This two use cases are made more explicit refactoring
this logic out into concrete methods.
@akoch-yatta akoch-yatta force-pushed the refactor-init-with-imagedata branch from 441647e to 55c2e18 Compare March 14, 2025 13:33
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.

This is a nice improvement as it disentagles multiple concerns implemented in one method and allows to explicitly call more specific methods at consumers. I traced every possible flow through the effected code to compare old and new implementation (and have to admit that it's rather difficult to follow all the flows) and can confirm that I did not find any difference before/after. I also tested an SDK with the change and found everything to work fine.

@HeikoKlare HeikoKlare merged commit 011a490 into eclipse-platform:master Mar 14, 2025
14 checks passed
@HeikoKlare HeikoKlare deleted the refactor-init-with-imagedata branch March 14, 2025 16:01
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