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

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

Issue 25795002: Move surface resize platform code from GpuProcessHostUIShim to RenderWidgetHostView implementations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated patch for reland after revert because chromium.webkit trybot fails on CWindow:SetWindowPos … Created 7 years, 2 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
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..2c4ad66c3f1664cdfc733a7667355edb5f312ff9 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,18 @@ gfx::GLSurfaceHandle RenderWidgetHostViewWin::GetCompositingSurface() {
return surface_handle;
}
+void RenderWidgetHostViewWin::ResizeCompositingSurface(const gfx::Size& size) {
+ // Ensure window does not have zero area because D3D cannot create a zero
+ // area swap chain.
+ ::SetWindowPos(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
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_win.h ('k') | content/port/browser/render_widget_host_view_port.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698