diff options
Diffstat (limited to 'chrome/browser/gpu_process_host.cc')
-rw-r--r-- | chrome/browser/gpu_process_host.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/browser/gpu_process_host.cc b/chrome/browser/gpu_process_host.cc index c321f97..eeb50bd 100644 --- a/chrome/browser/gpu_process_host.cc +++ b/chrome/browser/gpu_process_host.cc @@ -171,6 +171,7 @@ void GpuProcessHost::OnControlMessageReceived(const IPC::Message& message) { IPC_MESSAGE_HANDLER(GpuHostMsg_SynchronizeReply, OnSynchronizeReply) #if defined(OS_LINUX) IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuHostMsg_GetViewXID, OnGetViewXID) + IPC_MESSAGE_HANDLER(GpuHostMsg_ReleaseXID, OnReleaseXID) IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuHostMsg_ResizeXID, OnResizeXID) #elif defined(OS_MACOSX) IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceSetIOSurface, @@ -228,6 +229,11 @@ void GetViewXIDDispatcher(gfx::NativeViewId id, IPC::Message* reply_msg) { NewRunnableFunction(&SendDelayedReply, reply_msg)); } +void ReleaseXIDDispatcher(unsigned long xid) { + GtkNativeViewManager* manager = Singleton<GtkNativeViewManager>::get(); + manager->ReleasePermanentXID(xid); +} + void ResizeXIDDispatcher(unsigned long xid, gfx::Size size, IPC::Message *reply_msg) { GdkWindow* window = reinterpret_cast<GdkWindow*>(gdk_xid_table_lookup(xid)); @@ -255,6 +261,13 @@ void GpuProcessHost::OnGetViewXID(gfx::NativeViewId id, NewRunnableFunction(&GetViewXIDDispatcher, id, reply_msg)); } +void GpuProcessHost::OnReleaseXID(unsigned long xid) { + // Have to release a permanent XID from UI thread. + BrowserThread::PostTask( + BrowserThread::UI, FROM_HERE, + NewRunnableFunction(&ReleaseXIDDispatcher, xid)); +} + void GpuProcessHost::OnResizeXID(unsigned long xid, gfx::Size size, IPC::Message *reply_msg) { // Have to resize the window from UI thread. |