OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_COMMON_GPU_GPU_CHANNEL_H_ | 5 #ifndef CONTENT_COMMON_GPU_GPU_CHANNEL_H_ |
6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_H_ | 6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 79 |
80 // Returns the name of the associated IPC channel. | 80 // Returns the name of the associated IPC channel. |
81 std::string GetChannelName(); | 81 std::string GetChannelName(); |
82 | 82 |
83 #if defined(OS_POSIX) | 83 #if defined(OS_POSIX) |
84 int TakeRendererFileDescriptor(); | 84 int TakeRendererFileDescriptor(); |
85 #endif // defined(OS_POSIX) | 85 #endif // defined(OS_POSIX) |
86 | 86 |
87 base::ProcessId renderer_pid() const { return channel_->peer_pid(); } | 87 base::ProcessId renderer_pid() const { return channel_->peer_pid(); } |
88 | 88 |
| 89 scoped_refptr<base::MessageLoopProxy> io_message_loop() const { |
| 90 return io_message_loop_; |
| 91 } |
| 92 |
89 // IPC::Listener implementation: | 93 // IPC::Listener implementation: |
90 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 94 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
91 virtual void OnChannelError() OVERRIDE; | 95 virtual void OnChannelError() OVERRIDE; |
92 | 96 |
93 // IPC::Sender implementation: | 97 // IPC::Sender implementation: |
94 virtual bool Send(IPC::Message* msg) OVERRIDE; | 98 virtual bool Send(IPC::Message* msg) OVERRIDE; |
95 | 99 |
96 // Requeue the message that is currently being processed to the beginning of | 100 // Requeue the message that is currently being processed to the beginning of |
97 // the queue. Used when the processing of a message gets aborted because of | 101 // the queue. Used when the processing of a message gets aborted because of |
98 // unscheduling conditions. | 102 // unscheduling conditions. |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 scoped_refptr<gpu::PreemptionFlag> preemption_flag); | 153 scoped_refptr<gpu::PreemptionFlag> preemption_flag); |
150 | 154 |
151 #if defined(OS_ANDROID) | 155 #if defined(OS_ANDROID) |
152 StreamTextureManagerAndroid* stream_texture_manager() { | 156 StreamTextureManagerAndroid* stream_texture_manager() { |
153 return stream_texture_manager_.get(); | 157 return stream_texture_manager_.get(); |
154 } | 158 } |
155 #endif | 159 #endif |
156 | 160 |
157 void CacheShader(const std::string& key, const std::string& shader); | 161 void CacheShader(const std::string& key, const std::string& shader); |
158 | 162 |
| 163 void AddFilter(IPC::ChannelProxy::MessageFilter* filter); |
| 164 void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter); |
| 165 |
159 protected: | 166 protected: |
160 virtual ~GpuChannel(); | 167 virtual ~GpuChannel(); |
161 | 168 |
162 private: | 169 private: |
163 friend class base::RefCountedThreadSafe<GpuChannel>; | 170 friend class base::RefCountedThreadSafe<GpuChannel>; |
164 friend class GpuChannelMessageFilter; | 171 friend class GpuChannelMessageFilter; |
165 | 172 |
166 void OnDestroy(); | 173 void OnDestroy(); |
167 | 174 |
168 bool OnControlMessageReceived(const IPC::Message& msg); | 175 bool OnControlMessageReceived(const IPC::Message& msg); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 scoped_refptr<base::MessageLoopProxy> io_message_loop_; | 266 scoped_refptr<base::MessageLoopProxy> io_message_loop_; |
260 | 267 |
261 size_t num_stubs_descheduled_; | 268 size_t num_stubs_descheduled_; |
262 | 269 |
263 DISALLOW_COPY_AND_ASSIGN(GpuChannel); | 270 DISALLOW_COPY_AND_ASSIGN(GpuChannel); |
264 }; | 271 }; |
265 | 272 |
266 } // namespace content | 273 } // namespace content |
267 | 274 |
268 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_H_ | 275 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_H_ |
OLD | NEW |