| 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 GPU_IPC_CLIENT_GPU_CHANNEL_HOST_H_ | 5 #ifndef GPU_IPC_CLIENT_GPU_CHANNEL_HOST_H_ |
| 6 #define GPU_IPC_CLIENT_GPU_CHANNEL_HOST_H_ | 6 #define GPU_IPC_CLIENT_GPU_CHANNEL_HOST_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 public: | 71 public: |
| 72 // Must be called on the main thread (as defined by the factory). | 72 // Must be called on the main thread (as defined by the factory). |
| 73 static scoped_refptr<GpuChannelHost> Create( | 73 static scoped_refptr<GpuChannelHost> Create( |
| 74 GpuChannelHostFactory* factory, | 74 GpuChannelHostFactory* factory, |
| 75 int channel_id, | 75 int channel_id, |
| 76 const gpu::GPUInfo& gpu_info, | 76 const gpu::GPUInfo& gpu_info, |
| 77 const IPC::ChannelHandle& channel_handle, | 77 const IPC::ChannelHandle& channel_handle, |
| 78 base::WaitableEvent* shutdown_event, | 78 base::WaitableEvent* shutdown_event, |
| 79 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager); | 79 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager); |
| 80 | 80 |
| 81 static const int32_t kDefaultStreamId = gpu::GPU_STREAM_DEFAULT; | |
| 82 static const gpu::GpuStreamPriority kDefaultStreamPriority = | |
| 83 gpu::GpuStreamPriority::NORMAL; | |
| 84 | |
| 85 bool IsLost() const { | 81 bool IsLost() const { |
| 86 DCHECK(channel_filter_.get()); | 82 DCHECK(channel_filter_.get()); |
| 87 return channel_filter_->IsLost(); | 83 return channel_filter_->IsLost(); |
| 88 } | 84 } |
| 89 | 85 |
| 90 int channel_id() const { return channel_id_; } | 86 int channel_id() const { return channel_id_; } |
| 91 | 87 |
| 92 // The GPU stats reported by the GPU process. | 88 // The GPU stats reported by the GPU process. |
| 93 const gpu::GPUInfo& gpu_info() const { return gpu_info_; } | 89 const gpu::GPUInfo& gpu_info() const { return gpu_info_; } |
| 94 | 90 |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 mutable base::Lock context_lock_; | 288 mutable base::Lock context_lock_; |
| 293 std::unique_ptr<IPC::SyncChannel> channel_; | 289 std::unique_ptr<IPC::SyncChannel> channel_; |
| 294 base::hash_map<int32_t, StreamFlushInfo> stream_flush_info_; | 290 base::hash_map<int32_t, StreamFlushInfo> stream_flush_info_; |
| 295 | 291 |
| 296 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); | 292 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); |
| 297 }; | 293 }; |
| 298 | 294 |
| 299 } // namespace gpu | 295 } // namespace gpu |
| 300 | 296 |
| 301 #endif // GPU_IPC_CLIENT_GPU_CHANNEL_HOST_H_ | 297 #endif // GPU_IPC_CLIENT_GPU_CHANNEL_HOST_H_ |
| OLD | NEW |