diff --git a/libcef/browser/osr/render_widget_host_view_osr.cc b/libcef/browser/osr/render_widget_host_view_osr.cc index 160295d94..f0aa83d38 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.cc +++ b/libcef/browser/osr/render_widget_host_view_osr.cc @@ -1375,6 +1375,7 @@ void CefRenderWidgetHostViewOSR::ResizeRootLayer() { root_layer_->SetBounds(gfx::Rect(size)); compositor_->SetScaleAndSize(scale_factor_, size_in_pixels); + PlatformResizeCompositorWidget(size_in_pixels); } void CefRenderWidgetHostViewOSR::OnBeginFrameTimerTick() { diff --git a/libcef/browser/osr/render_widget_host_view_osr.h b/libcef/browser/osr/render_widget_host_view_osr.h index f9405367c..c0e9cce3b 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.h +++ b/libcef/browser/osr/render_widget_host_view_osr.h @@ -315,6 +315,7 @@ class CefRenderWidgetHostViewOSR #endif // defined(OS_MACOSX) void PlatformCreateCompositorWidget(); + void PlatformResizeCompositorWidget(const gfx::Size& size); void PlatformDestroyCompositorWidget(); #if defined(USE_AURA) diff --git a/libcef/browser/osr/render_widget_host_view_osr_linux.cc b/libcef/browser/osr/render_widget_host_view_osr_linux.cc index 444103a2a..d239e665d 100644 --- a/libcef/browser/osr/render_widget_host_view_osr_linux.cc +++ b/libcef/browser/osr/render_widget_host_view_osr_linux.cc @@ -123,6 +123,9 @@ void CefRenderWidgetHostViewOSR::PlatformCreateCompositorWidget() { compositor_widget_ = window_->xwindow(); } +void CefRenderWidgetHostViewOSR::PlatformResizeCompositorWidget(const gfx::Size&) { +} + void CefRenderWidgetHostViewOSR::PlatformDestroyCompositorWidget() { DCHECK(window_); window_->Close(); diff --git a/libcef/browser/osr/render_widget_host_view_osr_mac.mm b/libcef/browser/osr/render_widget_host_view_osr_mac.mm index 9188ddb4b..a99b57fed 100644 --- a/libcef/browser/osr/render_widget_host_view_osr_mac.mm +++ b/libcef/browser/osr/render_widget_host_view_osr_mac.mm @@ -318,6 +318,9 @@ void CefRenderWidgetHostViewOSR::PlatformCreateCompositorWidget() { browser_compositor_->Unsuspend(); } +void CefRenderWidgetHostViewOSR::PlatformResizeCompositorWidget(const gfx::Size&) { +} + void CefRenderWidgetHostViewOSR::PlatformDestroyCompositorWidget() { DCHECK(window_); diff --git a/libcef/browser/osr/render_widget_host_view_osr_win.cc b/libcef/browser/osr/render_widget_host_view_osr_win.cc index f63385065..b38056854 100644 --- a/libcef/browser/osr/render_widget_host_view_osr_win.cc +++ b/libcef/browser/osr/render_widget_host_view_osr_win.cc @@ -149,6 +149,12 @@ void CefRenderWidgetHostViewOSR::PlatformCreateCompositorWidget() { compositor_widget_ = window_->hwnd(); } +void CefRenderWidgetHostViewOSR::PlatformResizeCompositorWidget(const gfx::Size& size) { + DCHECK(window_); + SetWindowPos(window_->hwnd(), NULL, 0, 0, size.width(), size.height(), + SWP_NOMOVE | SWP_NOZORDER | SWP_NOREDRAW); +} + void CefRenderWidgetHostViewOSR::PlatformDestroyCompositorWidget() { window_.reset(NULL); compositor_widget_ = gfx::kNullAcceleratedWidget;