Windows: OSR - Scale change and resize deadlock

Issue #3240 resolved
Nick Mueller created an issue

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%.

  1. Set display to “Show only on 1”
  2. Open cefclient with --off-screen-rendering-enabled
  3. Maximize the cefclient window
  4. 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)

  1. Log in to comment