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_CLIENT_GPU_CHANNEL_HOST_H_ | 5 #ifndef CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ |
6 #define CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ | 6 #define CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 public: | 88 public: |
89 // Must be called on the main thread (as defined by the factory). | 89 // Must be called on the main thread (as defined by the factory). |
90 static scoped_refptr<GpuChannelHost> Create( | 90 static scoped_refptr<GpuChannelHost> Create( |
91 GpuChannelHostFactory* factory, | 91 GpuChannelHostFactory* factory, |
92 int gpu_host_id, | 92 int gpu_host_id, |
93 int client_id, | 93 int client_id, |
94 const gpu::GPUInfo& gpu_info, | 94 const gpu::GPUInfo& gpu_info, |
95 const IPC::ChannelHandle& channel_handle); | 95 const IPC::ChannelHandle& channel_handle); |
96 | 96 |
97 bool IsLost() const { | 97 bool IsLost() const { |
98 DCHECK(channel_filter_); | 98 DCHECK(channel_filter_.get()); |
99 return channel_filter_->IsLost(); | 99 return channel_filter_->IsLost(); |
100 } | 100 } |
101 | 101 |
102 // The GPU stats reported by the GPU process. | 102 // The GPU stats reported by the GPU process. |
103 const gpu::GPUInfo& gpu_info() const { return gpu_info_; } | 103 const gpu::GPUInfo& gpu_info() const { return gpu_info_; } |
104 | 104 |
105 // IPC::Sender implementation: | 105 // IPC::Sender implementation: |
106 virtual bool Send(IPC::Message* msg) OVERRIDE; | 106 virtual bool Send(IPC::Message* msg) OVERRIDE; |
107 | 107 |
108 // Create and connect to a command buffer in the GPU process. | 108 // Create and connect to a command buffer in the GPU process. |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 // Used to look up a proxy from its routing id. | 247 // Used to look up a proxy from its routing id. |
248 typedef base::hash_map<int, CommandBufferProxyImpl*> ProxyMap; | 248 typedef base::hash_map<int, CommandBufferProxyImpl*> ProxyMap; |
249 ProxyMap proxies_; | 249 ProxyMap proxies_; |
250 | 250 |
251 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); | 251 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); |
252 }; | 252 }; |
253 | 253 |
254 } // namespace content | 254 } // namespace content |
255 | 255 |
256 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ | 256 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ |
OLD | NEW |