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 20 matching lines...) Expand all Loading... |
31 class WaitableEvent; | 31 class WaitableEvent; |
32 } | 32 } |
33 | 33 |
34 namespace gpu { | 34 namespace gpu { |
35 class PreemptionFlag; | 35 class PreemptionFlag; |
36 namespace gles2 { | 36 namespace gles2 { |
37 class ImageManager; | 37 class ImageManager; |
38 } | 38 } |
39 } | 39 } |
40 | 40 |
| 41 namespace IPC { |
| 42 class MessageFilter; |
| 43 } |
| 44 |
41 namespace content { | 45 namespace content { |
42 class DevToolsGpuAgent; | 46 class DevToolsGpuAgent; |
43 class GpuChannelManager; | 47 class GpuChannelManager; |
44 class GpuChannelMessageFilter; | 48 class GpuChannelMessageFilter; |
45 class GpuWatchdog; | 49 class GpuWatchdog; |
46 | 50 |
47 // Encapsulates an IPC channel between the GPU process and one renderer | 51 // Encapsulates an IPC channel between the GPU process and one renderer |
48 // process. On the renderer side there's a corresponding GpuChannelHost. | 52 // process. On the renderer side there's a corresponding GpuChannelHost. |
49 class GpuChannel : public IPC::Listener, | 53 class GpuChannel : public IPC::Listener, |
50 public IPC::Sender, | 54 public IPC::Sender, |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 bool handle_messages_scheduled() const { return handle_messages_scheduled_; } | 142 bool handle_messages_scheduled() const { return handle_messages_scheduled_; } |
139 uint64 messages_processed() const { return messages_processed_; } | 143 uint64 messages_processed() const { return messages_processed_; } |
140 | 144 |
141 // If |preemption_flag->IsSet()|, any stub on this channel | 145 // If |preemption_flag->IsSet()|, any stub on this channel |
142 // should stop issuing GL commands. Setting this to NULL stops deferral. | 146 // should stop issuing GL commands. Setting this to NULL stops deferral. |
143 void SetPreemptByFlag( | 147 void SetPreemptByFlag( |
144 scoped_refptr<gpu::PreemptionFlag> preemption_flag); | 148 scoped_refptr<gpu::PreemptionFlag> preemption_flag); |
145 | 149 |
146 void CacheShader(const std::string& key, const std::string& shader); | 150 void CacheShader(const std::string& key, const std::string& shader); |
147 | 151 |
148 void AddFilter(IPC::ChannelProxy::MessageFilter* filter); | 152 void AddFilter(IPC::MessageFilter* filter); |
149 void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter); | 153 void RemoveFilter(IPC::MessageFilter* filter); |
150 | 154 |
151 uint64 GetMemoryUsage(); | 155 uint64 GetMemoryUsage(); |
152 | 156 |
153 protected: | 157 protected: |
154 virtual ~GpuChannel(); | 158 virtual ~GpuChannel(); |
155 | 159 |
156 private: | 160 private: |
157 friend class base::RefCountedThreadSafe<GpuChannel>; | 161 friend class base::RefCountedThreadSafe<GpuChannel>; |
158 friend class GpuChannelMessageFilter; | 162 friend class GpuChannelMessageFilter; |
159 | 163 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 scoped_ptr<DevToolsGpuAgent> devtools_gpu_agent_; | 232 scoped_ptr<DevToolsGpuAgent> devtools_gpu_agent_; |
229 | 233 |
230 size_t num_stubs_descheduled_; | 234 size_t num_stubs_descheduled_; |
231 | 235 |
232 DISALLOW_COPY_AND_ASSIGN(GpuChannel); | 236 DISALLOW_COPY_AND_ASSIGN(GpuChannel); |
233 }; | 237 }; |
234 | 238 |
235 } // namespace content | 239 } // namespace content |
236 | 240 |
237 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_H_ | 241 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_H_ |
OLD | NEW |