MSW Change to set DoubleBuffered by default

41 views
Skip to first unread message

Eric Jensen

unread,
Nov 6, 2022, 9:15:21 AM11/6/22
to wx-u...@googlegroups.com
Hi,

i just updated my few months old wx codebase to latest trunk, and the
above mentioned change caused (and still does) me some problems.

In my application i display video streams, with either VLC or
wxWebViewEdge.

This can be embedded in a GUI, or in a dedicated wxDialog in
fullscreen mode.

Before the change, these 4 scenarios all worked fine.
But now:

VLC - windowed - low fps
VLC - fullscreen - black screen

wxWebViewEdge - windowed - works
wxWebViewEdge - fullscreen - white screen

I was able to fix two of these by adding SetDoubleBuffered(false) at
various locations. I wasn't able to fix the "vlc - windowed - low fps".

It would have been great if this feature could be disabled at either
run- or compile time.


Regards,
Eric


PB

unread,
Nov 7, 2022, 1:27:57 AM11/7/22
to wx-users
Hi,

I believe you are aware of it but since you did not mention it just to be sure: You did try the official way of disabling double buffering on Windows, i.e., calling MSW-specific wxWindow::MSWDisableComposited() on the "drawing" window.


Regards,
PB

Eric Jensen

unread,
Nov 7, 2022, 12:07:01 PM11/7/22
to PB
Hello PB,

Monday, November 7, 2022, 7:27:57 AM, you wrote:

P> Hi,

P> I believe you are aware of it but since you did not mention it just to be
P> sure: You did try the official way of disabling double buffering on
P> Windows, i.e., calling MSW-specific
P> wxWindow::MSWDisableComposited() on the
P> "drawing" window.

P> See
P> https://docs.wxwidgets.org/trunk/classwx_window.html#a603211743db40362e8d9cd19fe5f66c8

Thanks! No, i actually didn't know about this method.

And yes, i did find it in changes.txt where i should have looked, so
the blame is on me :)

Eric

Vadim Zeitlin

unread,
Nov 8, 2022, 8:43:17 AM11/8/22
to wx-u...@googlegroups.com
On Sun, 6 Nov 2022 15:15:11 +0100 Eric Jensen wrote:

EJ> i just updated my few months old wx codebase to latest trunk, and the
EJ> above mentioned change caused (and still does) me some problems.
EJ>
EJ> In my application i display video streams, with either VLC or
EJ> wxWebViewEdge.
EJ>
EJ> This can be embedded in a GUI, or in a dedicated wxDialog in
EJ> fullscreen mode.
EJ>
EJ> Before the change, these 4 scenarios all worked fine.
EJ> But now:
EJ>
EJ> VLC - windowed - low fps
EJ> VLC - fullscreen - black screen
EJ>
EJ> wxWebViewEdge - windowed - works
EJ> wxWebViewEdge - fullscreen - white screen
EJ>
EJ> I was able to fix two of these by adding SetDoubleBuffered(false) at
EJ> various locations. I wasn't able to fix the "vlc - windowed - low fps".

Do I understand correctly that this was fixed by calling
MSWDisableComposited()?

EJ> It would have been great if this feature could be disabled at either
EJ> run- or compile time.

I really don't want to add a compile-time option for this, but it would be
nice to turn it off automatically for the known problematic cases. In
particular, I suspect that we need to always do it for full screen windows,
right? But how could we detect the VLC/windows case, would you have any
idea?


I'm also not sure if SetDoubleBuffered(false) should be made to do the
same thing as MSWDisableComposited() does because it seems wrong to use
this function under the other platforms to work around a MSW-specific
issue.

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
Reply all
Reply to author
Forward
0 new messages