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

Unified Diff: chrome/gpu/gpu_command_buffer_stub.cc

Issue 5105006: Resize synchronization for Linux. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: make -j17 all is my friend (fix the test build). Created 10 years, 1 month 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/gpu/gpu_command_buffer_stub.h ('k') | gfx/gtk_preserve_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/gpu/gpu_command_buffer_stub.cc
diff --git a/chrome/gpu/gpu_command_buffer_stub.cc b/chrome/gpu/gpu_command_buffer_stub.cc
index 2834c00438494339e9dfa3cb208c874ace606c56..1adb22ce3f33adf47b0ec60cadbabefad3f6e451 100644
--- a/chrome/gpu/gpu_command_buffer_stub.cc
+++ b/chrome/gpu/gpu_command_buffer_stub.cc
@@ -113,6 +113,14 @@ void GpuCommandBufferStub::OnInitialize(
NewCallback(this,
&GpuCommandBufferStub::SwapBuffersCallback));
}
+#elif defined(OS_LINUX)
+ if (handle_) {
+ // Set up a pathway to allow the Gpu process to ask the browser
+ // for a window resize.
+ processor_->SetResizeCallback(
+ NewCallback(this,
+ &GpuCommandBufferStub::ResizeCallback));
+ }
#endif
} else {
processor_.reset();
@@ -203,4 +211,13 @@ void GpuCommandBufferStub::SwapBuffersCallback() {
}
#endif // defined(OS_MACOSX)
+#if defined(OS_LINUX)
+void GpuCommandBufferStub::ResizeCallback(gfx::Size size) {
+ ChildThread* gpu_thread = ChildThread::current();
+ bool result = false;
+ gpu_thread->Send(
+ new GpuHostMsg_ResizeXID(handle_, size, &result));
+}
+#endif // defined(OS_LINUX)
+
#endif // ENABLE_GPU
« no previous file with comments | « chrome/gpu/gpu_command_buffer_stub.h ('k') | gfx/gtk_preserve_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698