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

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: Moved IPC call up to GpuCommandBufferStub via callback to satisfy checkdeps. 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
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..707e866dd6f0df26107d6536edaf1c4f2d066b51 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));
}
nduca 2010/11/23 16:59:49 How does the Macosx SetSwapBuffersCallback get imp
Ken Russell (switch to Gerrit) 2010/11/23 19:17:55 It's wired up through the GLES2Decoder. It does se
jonathan.backer 2010/11/23 21:00:19 Done.
+#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.width(), size.height(), &result));
+}
+#endif // defined(OS_LINUX)
+
#endif // ENABLE_GPU

Powered by Google App Engine
This is Rietveld 408576698