Skip to content

Conversation

@arunjose696
Copy link
Contributor

@arunjose696 arunjose696 commented Aug 7, 2025

This PR extends ImageDataProvider contract to clarify that implementations need to yield linearly scaled image data.
This commit also extends the strict checks for verifying linear scaling to GTK and Cocoa implementations.

@arunjose696 arunjose696 linked an issue Aug 7, 2025 that may be closed by this pull request
2 tasks
@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2025

Test Results

   546 files  ±0     546 suites  ±0   30m 40s ⏱️ - 5m 35s
 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 ac26789. ± Comparison against base commit 9620d00.

♻️ This comment has been updated with latest results.

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. I only have one comment regarding the system property usage on Linux/GTK.

@arunjose696 arunjose696 force-pushed the arunjose696/377/contractImageDataProvider branch 2 times, most recently from d1d3862 to fdb2dc7 Compare August 11, 2025 08:58
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 fine now.
I just have one proposal: instead of adding this constant that can be used from everywhere, we might encapsulate it (make it private) and provide methods like runIfStrictChecksEnabled(Runnable) and runWithStrictChecksDisabled(Runnable) that represent the two use cases we currently have in consumers code. And maybe we could do that in a separate PR (preparatory for the contract improval), so that we have the two changes (improvement of strict checks and contract improvement) separated.

@arunjose696 arunjose696 force-pushed the arunjose696/377/contractImageDataProvider branch from fdb2dc7 to 8536d7b Compare August 11, 2025 15:17
@arunjose696
Copy link
Contributor Author

The change looks fine now. I just have one proposal: instead of adding this constant that can be used from everywhere, we might encapsulate it (make it private) and provide methods like runIfStrictChecksEnabled(Runnable) and runWithStrictChecksDisabled(Runnable) that represent the two use cases we currently have in consumers code. And maybe we could do that in a separate PR (preparatory for the contract improval), so that we have the two changes (improvement of strict checks and contract improvement) separated.

Have made the refactoring of strictchecks to another PR #2410. This PR now only has the contract extension

@HeikoKlare HeikoKlare force-pushed the arunjose696/377/contractImageDataProvider branch from 8536d7b to 7ed834d Compare August 11, 2025 18:11
Clarify in the contract that ImageDataProvider implementations are
expected to return linearly scaled ImageData based on the zoom level.
@HeikoKlare HeikoKlare force-pushed the arunjose696/377/contractImageDataProvider branch from 7ed834d to ac26789 Compare August 11, 2025 18:13
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.

Sound good, thank you!

I just simplified the commit message as it still referred to the modification of strict checks which has been extracted to #2410

@HeikoKlare HeikoKlare changed the title Update ImageDataProvider contract Clarify linear scaling in ImageDataProvider contract Aug 11, 2025
@HeikoKlare HeikoKlare merged commit 538a08a into eclipse-platform:master Aug 11, 2025
17 checks passed
@HeikoKlare HeikoKlare deleted the arunjose696/377/contractImageDataProvider branch August 11, 2025 18:38
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.

Improve contract of ImageDataProvider

2 participants