| Index: chrome/browser/renderer_host/render_widget_host_view_win.cc
|
| ===================================================================
|
| --- chrome/browser/renderer_host/render_widget_host_view_win.cc (revision 87636)
|
| +++ chrome/browser/renderer_host/render_widget_host_view_win.cc (working copy)
|
| @@ -1549,9 +1549,14 @@
|
|
|
| RECT currentRect;
|
| GetClientRect(¤tRect);
|
| - int width = currentRect.right - currentRect.left;
|
| - int height = currentRect.bottom - currentRect.top;
|
|
|
| + // Ensure window does not have zero area because D3D cannot create a zero
|
| + // area swap chain.
|
| + int width = std::max(1,
|
| + static_cast<int>(currentRect.right - currentRect.left));
|
| + int height = std::max(1,
|
| + static_cast<int>(currentRect.bottom - currentRect.top));
|
| +
|
| compositor_host_window_ = CreateWindowEx(
|
| WS_EX_LEFT | WS_EX_LTRREADING | WS_EX_RIGHTSCROLLBAR,
|
| MAKEINTATOM(window_class), 0,
|
|
|