Skip to content

Commit

Permalink
mac: Fix OSR scaling behavior when switching displays (fixes issue ch…
Browse files Browse the repository at this point in the history
  • Loading branch information
ujpv authored and magreenblatt committed Jan 12, 2023
1 parent f6d626d commit b1a530c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions libcef/browser/osr/render_widget_host_view_osr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1079,6 +1079,7 @@ void CefRenderWidgetHostViewOSR::SynchronizeVisualProperties(

void CefRenderWidgetHostViewOSR::OnScreenInfoChanged() {
TRACE_EVENT0("cef", "CefRenderWidgetHostViewOSR::OnScreenInfoChanged");
InvalidateLocalSurfaceId();
if (!render_widget_host_) {
return;
}
Expand Down
1 change: 1 addition & 0 deletions tests/cefclient/browser/browser_window_osr_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1232,6 +1232,7 @@ - (float)getDeviceScaleFactor {
}

- (void)viewDidChangeBackingProperties {
[super viewDidChangeBackingProperties];
const CGFloat device_scale_factor = [self getDeviceScaleFactor];

if (device_scale_factor == device_scale_factor_) {
Expand Down

0 comments on commit b1a530c

Please sign in to comment.