Skip to content

Replacement of Image(device, int, int) constructor in examples/snippets#2827

Merged
akoch-yatta merged 1 commit intoeclipse-platform:masterfrom
vi-eclipse:ReplaceImageGcDrawer
Jan 23, 2026
Merged

Replacement of Image(device, int, int) constructor in examples/snippets#2827
akoch-yatta merged 1 commit intoeclipse-platform:masterfrom
vi-eclipse:ReplaceImageGcDrawer

Conversation

@al-noori
Copy link
Contributor

This PR takes over a part to change all occurences of the image(device, int, int) constructor with the image(device, gc, int, int) constructor.

Within examples/snippets, almost all usages of the stated constructor are now replaced by an ImageGcDrawer and the Image(device, gc int, int) constructor afterwards. This replacement has/could not be made for the snippets {387, 215, 292, 95, 139} and partially not for 141. The details for them are commented here: vi-eclipse/Eclipse-Platform#310 (comment).

@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2025

Test Results

  176 files  ±0    176 suites  ±0   24m 52s ⏱️ - 1m 43s
4 680 tests ±0  4 658 ✅ ±0  22 💤 ±0  0 ❌ ±0 
  485 runs  ±0    479 ✅ ±0   6 💤 ±0  0 ❌ ±0 

Results for commit f892524. ± Comparison against base commit e74c0fa.

♻️ This comment has been updated with latest results.

@akoch-yatta
Copy link
Contributor

I got the following difference when opening Snippet10 on a 175% monitor with master (left) and this PR (right):
image

Didn't check the other Snippets yet.

@HeikoKlare
Copy link
Contributor

I got the following difference when opening Snippet10 on a 175% monitor with master (left) and this PR (right):

That looks like an issue with GC#drawImage and ImageGcDrawer. Should we create a separate ticket for that, @akoch-yatta?

@akoch-yatta
Copy link
Contributor

Yes, we had a look into it yesterday, but I didn't create a ticket yet. Just created #554

@akoch-yatta akoch-yatta force-pushed the ReplaceImageGcDrawer branch 2 times, most recently from db88589 to 123deb5 Compare January 23, 2026 07:53
Almost all usages of the stated constructor with an additional GC initialization are now replaced by an ImageGcDrawer and the Image(device, gc int, int) constructor afterwards for the snippets. This replacement has/could not be made for the snippets {387, 215, 292, 95, 139} and partially not for 141.
Copy link
Contributor

@akoch-yatta akoch-yatta left a comment

Choose a reason for hiding this comment

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

LGTM, tested the snippets with the snippetexplorer. I fixed two small issues in the PR - using imageWidth instead of imageHeight. With that all snippet looked good to me

@akoch-yatta akoch-yatta merged commit 582fc89 into eclipse-platform:master Jan 23, 2026
23 checks passed
@akoch-yatta akoch-yatta deleted the ReplaceImageGcDrawer branch January 23, 2026 08:26
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.

Replace Image(device,int,int) constructor in examples/snippets

3 participants