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..c34dbc7b7ba8c3044334fd1a699b863b50d64031 100644 |
--- a/chrome/gpu/gpu_command_buffer_stub.cc |
+++ b/chrome/gpu/gpu_command_buffer_stub.cc |
@@ -114,6 +114,15 @@ void GpuCommandBufferStub::OnInitialize( |
&GpuCommandBufferStub::SwapBuffersCallback)); |
} |
#endif |
+#if defined(OS_LINUX) |
nduca
2010/11/23 21:03:51
hmm, elif?
|
+ 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(); |
command_buffer_.reset(); |
@@ -203,4 +212,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 |