Index: content/browser/renderer_host/render_widget_host_view_win.cc |
diff --git a/content/browser/renderer_host/render_widget_host_view_win.cc b/content/browser/renderer_host/render_widget_host_view_win.cc |
index 92abb4b2c10df2501881b0b0003dac636eb1eb0f..66a3d370671f0bcb70ca66cb8544a5390c024b98 100644 |
--- a/content/browser/renderer_host/render_widget_host_view_win.cc |
+++ b/content/browser/renderer_host/render_widget_host_view_win.cc |
@@ -2554,6 +2554,20 @@ gfx::GLSurfaceHandle RenderWidgetHostViewWin::GetCompositingSurface() { |
return surface_handle; |
} |
+void RenderWidgetHostViewWin::ResizeCompositingSurface(const gfx::Size& size) { |
+ gfx::GLSurfaceHandle surface = GetCompositingSurface(); |
+ |
+ // Ensure window does not have zero area because D3D cannot create a zero |
+ // area swap chain. |
+ SetWindowPos(surface.handle, |
piman
2013/10/03 00:17:29
surface.handle is compositor_host_window_
|
+ NULL, |
+ 0, 0, |
+ std::max(1, size.width()), |
+ std::max(1, size.height()), |
+ SWP_NOSENDCHANGING | SWP_NOCOPYBITS | SWP_NOZORDER | |
+ SWP_NOACTIVATE | SWP_DEFERERASE | SWP_NOMOVE); |
+} |
+ |
void RenderWidgetHostViewWin::OnAcceleratedCompositingStateChange() { |
bool show = render_widget_host_->is_accelerated_compositing_active(); |
// When we first create the compositor, we will get a show request from |