Windows: OSR - Scale change and resize deadlock
Simplest way to reproduce, with cefclient, Windows 10, present on v90-master:
Requires two monitors set to different scale and resolution. I had one 4k@150%, one 1080@100%.
- Set display to “Show only on 1”
- Open cefclient with
--off-screen-rendering-enabled
- Maximize the cefclient window
- Set display to “Show only on 2”
This is representative of a use case where a user is working on a laptop and plugs into an external monitor of different scale and resolution and is configured to only display on the external monitor, or that the external monitor is primary.
Actual outcome: The app fails to update scale and resolution, and becomes unresponsive to resizes.
What is going on? Looks like in render_widget_host_view_osr.cc
, the resize command is started and held, and then before it completes, device_scale_factor
is updated and the condition hold_resize_ && pixel_size == SizeInPixels()
never succeeds because SizeInPixels()
is based on the new scale factor.
Proposed resolution: When resize is held, cache the device_scale_factor and use that for the hold release condition.
I have a patch that does the proposed solution and I have verified works with cefclient. I’m just planning to submit a PR shortly once I finish getting my local config setup for this repo.
Comments (6)
-
reporter -
- changed status to resolved
Fix OSR resize issue when multiple monitors have different scale factors (fixes issue
#3240)→ <<cset 9e416a7921bb>>
-
Fix OSR resize issue when multiple monitors have different scale factors (fixes issue
#3240)→ <<cset 1cbaee486864>>
-
Fix OSR resize issue when multiple monitors have different scale factors (fixes issue
#3240)→ <<cset 0e3b3bb1108d>>
-
Revert "Fix OSR resize issue when multiple monitors have different scale factors (fixes issue
#3240)"This reverts commit 9e416a7921bb52eaa96b03b1e9d3c128a8d5e669.
Reverted due to compile error.
→ <<cset 17d51ceed0b8>>
-
Fix OSR resize issue when multiple monitors have different scale factors (fixes issue
#3240)→ <<cset 029cc679159f>>
- Log in to comment
Sorry, my PR didn’t link back to the issue. It is up here.