Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4140)

Unified Diff: chrome/browser/renderer_host/render_widget_host_view_win.cc

Issue 7054061: Ensure that the GPU compositing window does not have zero area on windows. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/gpu/gpu_process_host_ui_shim.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(&currentRect);
- 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,
« no previous file with comments | « no previous file | content/browser/gpu/gpu_process_host_ui_shim.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698