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

Unified Diff: content/browser/gpu/gpu_process_host_ui_shim.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 | « chrome/browser/renderer_host/render_widget_host_view_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_process_host_ui_shim.cc
===================================================================
--- content/browser/gpu/gpu_process_host_ui_shim.cc (revision 87636)
+++ content/browser/gpu/gpu_process_host_ui_shim.cc (working copy)
@@ -4,6 +4,8 @@
#include "content/browser/gpu/gpu_process_host_ui_shim.h"
+#include <algorithm>
+
#include "base/id_map.h"
#include "base/process_util.h"
#include "base/debug/trace_event.h"
@@ -194,11 +196,13 @@
XSync(display, False);
}
#elif defined(OS_WIN)
+ // Ensure window does not have zero area because D3D cannot create a zero
+ // area swap chain.
SetWindowPos(handle,
NULL,
0, 0,
- size.width(),
- size.height(),
+ std::max(1, size.width()),
+ std::max(1, size.height()),
SWP_NOSENDCHANGING | SWP_NOCOPYBITS | SWP_NOZORDER |
SWP_NOACTIVATE | SWP_DEFERERASE);
#endif
« no previous file with comments | « chrome/browser/renderer_host/render_widget_host_view_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698