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

Unified Diff: chrome/gpu/gpu_thread.cc

Issue 6076005: Mac: Don't hang gpu process on popup close under certain conditions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: final touches Created 10 years 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_thread.cc
diff --git a/chrome/gpu/gpu_thread.cc b/chrome/gpu/gpu_thread.cc
index d506dda5ab82f1f8a146bcf91f5034db35862c77..0f9960f6ed2efbbbe9861475e40619eb7c1e7698 100644
--- a/chrome/gpu/gpu_thread.cc
+++ b/chrome/gpu/gpu_thread.cc
@@ -55,22 +55,17 @@ void GpuThread::RemoveChannel(int renderer_id) {
void GpuThread::OnControlMessageReceived(const IPC::Message& msg) {
bool msg_is_ok = true;
IPC_BEGIN_MESSAGE_MAP_EX(GpuThread, msg, msg_is_ok)
- IPC_MESSAGE_HANDLER(GpuMsg_EstablishChannel,
- OnEstablishChannel)
- IPC_MESSAGE_HANDLER(GpuMsg_CloseChannel,
- OnCloseChannel)
- IPC_MESSAGE_HANDLER(GpuMsg_Synchronize,
- OnSynchronize)
- IPC_MESSAGE_HANDLER(GpuMsg_CollectGraphicsInfo,
- OnCollectGraphicsInfo)
+ IPC_MESSAGE_HANDLER(GpuMsg_EstablishChannel, OnEstablishChannel)
+ IPC_MESSAGE_HANDLER(GpuMsg_CloseChannel, OnCloseChannel)
+ IPC_MESSAGE_HANDLER(GpuMsg_Synchronize, OnSynchronize)
+ IPC_MESSAGE_HANDLER(GpuMsg_CollectGraphicsInfo, OnCollectGraphicsInfo)
#if defined(OS_MACOSX)
IPC_MESSAGE_HANDLER(GpuMsg_AcceleratedSurfaceBuffersSwappedACK,
OnAcceleratedSurfaceBuffersSwappedACK)
+ IPC_MESSAGE_HANDLER(GpuMsg_DidDestroySurface, OnDidDestroySurface)
#endif
- IPC_MESSAGE_HANDLER(GpuMsg_Crash,
- OnCrash)
- IPC_MESSAGE_HANDLER(GpuMsg_Hang,
- OnHang)
+ IPC_MESSAGE_HANDLER(GpuMsg_Crash, OnCrash)
+ IPC_MESSAGE_HANDLER(GpuMsg_Hang, OnHang)
IPC_END_MESSAGE_MAP_EX()
}
@@ -132,6 +127,13 @@ void GpuThread::OnAcceleratedSurfaceBuffersSwappedACK(
scoped_refptr<GpuChannel> channel = iter->second;
channel->AcceleratedSurfaceBuffersSwapped(route_id, swap_buffers_count);
}
+void GpuThread::OnDidDestroySurface(int renderer_id, int32 renderer_route_id) {
+ GpuChannelMap::const_iterator iter = gpu_channels_.find(renderer_id);
+ if (iter == gpu_channels_.end())
+ return;
+ scoped_refptr<GpuChannel> channel = iter->second;
+ channel->DidDestroySurface(renderer_route_id);
+}
#endif
void GpuThread::OnCrash() {

Powered by Google App Engine
This is Rietveld 408576698