| Ticket UUID: | b17dcd7168676c6cb8dd9ade07ddca1a39d912a4 | |||
| Title: | Windows: imgPhInstance-7.* test failures (wayland branch) | |||
| Type: | Bug | Version: | wayland | |
| Submitter: | jan.nijtmans | Created on: | 2026-11-13 15:43:02 | |
| Subsystem: | 41. Photo Images | Assigned To: | kevin_walzer | |
| Priority: | 5 Medium | Severity: | Important | |
| Status: | Open | Last Modified: | 2026-11-13 19:24:51 | |
| Resolution: | None | Closed By: | nobody | |
| Closed on: | ||||
| Description: |
Running testcases on Windows (wayland branch) tkImgPhoto.c D:\a\tk\tk\tk\win\..\generic\tkImgPhoto.c(2453): warning C4101: 'offset': unreferenced local variable tkImgPhInstance.c D:\a\tk\tk\tk\win\..\generic\tkImgPhInstance.c(944): warning C4101: 'offset': unreferenced local variable ... imgPhInstance.test If I revert tkImgPhoto.c and tkImgPhInstance.c to the 'trunk' versions (removing the wayland-specific edits in those 2 files). The warnings are gone and the testcases pass. So, something still needs to be done related to this. | |||
| User Comments: |
serhiy.storchaka added on 2026-11-13 19:24:51:
I do not propose to remove TK_CAN_RENDER_RGBA, and Jan's branch is only an experiment. The proposed change is only the condition of the early return in TkImgDitherInstance():
-#ifdef TK_CAN_RENDER_RGBA
+#ifdef TK_USE_WAYLAND
/* Images with 8-bit color do not need dithering. */
return;
#else
...
-#endif /*TK_CAN_RENDER_RGBA*/
+#endif /*TK_USE_WAYLAND*/
Nothing changes on Wayland. On Windows and macOS, which also define TK_CAN_RENDER_RGBA, the pixmap of the instance is dithered again, as on main. imgPhInstance-7.* are skipped on Wayland (pixelProbe); they fail on Windows. kevin_walzer added on 2026-11-13 18:40:43: This is what I get testing with this branch on Wayland: kevin@vbox:~/tk/tests$ tclsh9.1 imgPhInstance.test imgPhInstance.test: Total 11 Passed 0 Skipped 11 Failed 0 Number of tests skipped for each constraint: 11 pixelProbe There's a separate constraint that skips all the tests. I'm not happy with removing TK_CAN_RENDER_RGBA - this is pretty foundational to Wayland. serhiy.storchaka added on 2026-11-13 16:25:49: The cause is [7170274de3]: TkImgDitherInstance() returns immediately if TK_CAN_RENDER_RGBA is defined, which is also the case on Windows and macOS. The fixes for [32f2e19de8] and [de6ef8276c] draw images with a non-default -gamma or -palette from the pixmap of the instance, which is filled by TkImgDitherInstance(), so now an empty pixmap is drawn. The minimal fix is to limit that early return to Wayland, where -gamma and -palette would still be ignored. [8beb2a08a0] (branch rgba-gamma-palette) fixes them on all platforms which render RGBA images, including Wayland, without the pixmap. jan.nijtmans added on 2026-11-13 15:47:38: I created a [901032026|branch], which reverts the wayland-specific changes in tkImgPhoto.c and tkImgPhInstance.c. The imgPhInstance-7.* testcases now pass on Windows (but probably break things on Wayland). Kevin, does this give any hints? | |||
Home
Timeline
Branches
Tags
Forum
Tickets
Download
Wiki