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

Side by Side Diff: chrome/gpu/gpu_channel.h

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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_GPU_GPU_CHANNEL_H_ 5 #ifndef CHROME_GPU_GPU_CHANNEL_H_
6 #define CHROME_GPU_GPU_CHANNEL_H_ 6 #define CHROME_GPU_GPU_CHANNEL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set>
9 #include <string> 10 #include <string>
10 #include <vector> 11 #include <vector>
11 12
12 #include "base/id_map.h" 13 #include "base/id_map.h"
13 #include "base/scoped_open_process.h" 14 #include "base/scoped_open_process.h"
14 #include "base/scoped_ptr.h" 15 #include "base/scoped_ptr.h"
15 #include "build/build_config.h" 16 #include "build/build_config.h"
16 #include "chrome/common/gpu_create_command_buffer_config.h" 17 #include "chrome/common/gpu_create_command_buffer_config.h"
17 #include "chrome/common/gpu_video_common.h" 18 #include "chrome/common/gpu_video_common.h"
18 #include "chrome/common/message_router.h" 19 #include "chrome/common/message_router.h"
(...skipping 29 matching lines...) Expand all
48 virtual void OnMessageReceived(const IPC::Message& msg); 49 virtual void OnMessageReceived(const IPC::Message& msg);
49 virtual void OnChannelConnected(int32 peer_pid); 50 virtual void OnChannelConnected(int32 peer_pid);
50 virtual void OnChannelError(); 51 virtual void OnChannelError();
51 52
52 // IPC::Message::Sender implementation: 53 // IPC::Message::Sender implementation:
53 virtual bool Send(IPC::Message* msg); 54 virtual bool Send(IPC::Message* msg);
54 55
55 #if defined(OS_MACOSX) 56 #if defined(OS_MACOSX)
56 virtual void AcceleratedSurfaceBuffersSwapped( 57 virtual void AcceleratedSurfaceBuffersSwapped(
57 int32 route_id, uint64 swap_buffers_count); 58 int32 route_id, uint64 swap_buffers_count);
59 void DidDestroySurface(int32 renderer_route_id);
60
61 bool IsRenderViewGone(int32 renderer_route_id);
58 #endif 62 #endif
59 63
60 private: 64 private:
61 void OnControlMessageReceived(const IPC::Message& msg); 65 void OnControlMessageReceived(const IPC::Message& msg);
62 66
63 int GenerateRouteID(); 67 int GenerateRouteID();
64 68
65 // Message handlers. 69 // Message handlers.
66 void OnCreateViewCommandBuffer( 70 void OnCreateViewCommandBuffer(
67 gfx::NativeViewId view, 71 gfx::NativeViewId view,
(...skipping 19 matching lines...) Expand all
87 91
88 // The id of the renderer who is on the other side of the channel. 92 // The id of the renderer who is on the other side of the channel.
89 int renderer_id_; 93 int renderer_id_;
90 94
91 // Used to implement message routing functionality to CommandBuffer objects 95 // Used to implement message routing functionality to CommandBuffer objects
92 MessageRouter router_; 96 MessageRouter router_;
93 97
94 #if defined(ENABLE_GPU) 98 #if defined(ENABLE_GPU)
95 typedef IDMap<GpuCommandBufferStub, IDMapOwnPointer> StubMap; 99 typedef IDMap<GpuCommandBufferStub, IDMapOwnPointer> StubMap;
96 StubMap stubs_; 100 StubMap stubs_;
97 #endif 101
102 #if defined(OS_MACOSX)
103 std::set<int32> destroyed_renderer_routes_;
104 #endif // defined (OS_MACOSX)
105 #endif // defined (ENABLE_GPU)
98 106
99 bool log_messages_; // True if we should log sent and received messages. 107 bool log_messages_; // True if we should log sent and received messages.
100 108
101 DISALLOW_COPY_AND_ASSIGN(GpuChannel); 109 DISALLOW_COPY_AND_ASSIGN(GpuChannel);
102 }; 110 };
103 111
104 #endif // CHROME_GPU_GPU_CHANNEL_H_ 112 #endif // CHROME_GPU_GPU_CHANNEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698