Skip to content

Qt and wx default to bitmap present#175

Merged
almarklein merged 2 commits intomainfrom
qt-bitmap
Feb 5, 2026
Merged

Qt and wx default to bitmap present#175
almarklein merged 2 commits intomainfrom
qt-bitmap

Conversation

@almarklein
Copy link
Member

@almarklein almarklein commented Feb 2, 2026

To avoid the many problems users face with presenting to a surface in a qt application, I propose we default to 'bitmap' for qt and wx. I briefly considered detecting cases where problems are more likely to occur, like is it on Wayland, or is the widget in a dockwidget, etc. but I figured we can better keep it simple and consistent.

I feel that with #138 we can now do this. Leaving this open for a bit so ppl can react if they have questions or objections.

Some related issue:

@Vipitis
Copy link
Contributor

Vipitis commented Feb 2, 2026

I was trying my idea from earlier to maybe see a difference in latency etc... one thing I directly noticed is that the screen method is way smoother on resize(bitmap is the left, screen the right):

responsiveness.mp4

My tired eyes also made me believe the gamma was different (like maybe srgb?) but I think that is just view angle thing, I couldn't measure any pixel value differences in screenshots... unless the OS compositor hides that from screenshots somehow.

ref: Vipitis@e4837e2

@almarklein
Copy link
Member Author

almarklein commented Feb 3, 2026

I made the texture greener, and it does indeed look different. Looking into it ...

As for the resizing, this is somewhat expected. During a resize, qt does multiple paint events. With 'screen' this results in new draws. With 'bitmap' it simply draws the last texture. A new draw will be scheduled, but it will be delayed compared to the paint event, especially on low fps. I don't think this is a problem. On some systems (glfw?) the image freezes during a resize.

@almarklein
Copy link
Member Author

OMG, ok, the difference seems to be that Qt applies a color transformation when on a P3 display. I created an issue to track this further #176

@almarklein almarklein merged commit 1f8306b into main Feb 5, 2026
20 checks passed
@almarklein almarklein deleted the qt-bitmap branch February 5, 2026 11:42
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