Chromium Code Reviews| 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 |