Windows: Resize offscreen compositor window to match view size (issue #1933)
This commit is contained in:
parent
e2f626dcf8
commit
37d988bda8
|
@ -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() {
|
||||
|
|
|
@ -315,6 +315,7 @@ class CefRenderWidgetHostViewOSR
|
|||
#endif // defined(OS_MACOSX)
|
||||
|
||||
void PlatformCreateCompositorWidget();
|
||||
void PlatformResizeCompositorWidget(const gfx::Size& size);
|
||||
void PlatformDestroyCompositorWidget();
|
||||
|
||||
#if defined(USE_AURA)
|
||||
|
|
|
@ -123,6 +123,9 @@ void CefRenderWidgetHostViewOSR::PlatformCreateCompositorWidget() {
|
|||
compositor_widget_ = window_->xwindow();
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::PlatformResizeCompositorWidget(const gfx::Size&) {
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::PlatformDestroyCompositorWidget() {
|
||||
DCHECK(window_);
|
||||
window_->Close();
|
||||
|
|
|
@ -318,6 +318,9 @@ void CefRenderWidgetHostViewOSR::PlatformCreateCompositorWidget() {
|
|||
browser_compositor_->Unsuspend();
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::PlatformResizeCompositorWidget(const gfx::Size&) {
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::PlatformDestroyCompositorWidget() {
|
||||
DCHECK(window_);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue