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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 int route_id; | 72 int route_id; |
73 int32 put_offset; | 73 int32 put_offset; |
74 unsigned int flush_count; | 74 unsigned int flush_count; |
75 std::vector<ui::LatencyInfo> latency_info; | 75 std::vector<ui::LatencyInfo> latency_info; |
76 }; | 76 }; |
77 | 77 |
78 class CONTENT_EXPORT GpuChannelHostFactory { | 78 class CONTENT_EXPORT GpuChannelHostFactory { |
79 public: | 79 public: |
80 virtual ~GpuChannelHostFactory() {} | 80 virtual ~GpuChannelHostFactory() {} |
81 | 81 |
82 virtual bool IsMainThread() = 0; | 82 virtual scoped_refptr<base::SingleThreadTaskRunner> GetMainTaskRunner() = 0; |
83 virtual base::MessageLoop* GetMainLoop() = 0; | |
84 virtual scoped_refptr<base::MessageLoopProxy> GetIOLoopProxy() = 0; | 83 virtual scoped_refptr<base::MessageLoopProxy> GetIOLoopProxy() = 0; |
85 virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) = 0; | 84 virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) = 0; |
86 virtual CreateCommandBufferResult CreateViewCommandBuffer( | 85 virtual CreateCommandBufferResult CreateViewCommandBuffer( |
87 int32 surface_id, | 86 int32 surface_id, |
88 const GPUCreateCommandBufferConfig& init_params, | 87 const GPUCreateCommandBufferConfig& init_params, |
89 int32 route_id) = 0; | 88 int32 route_id) = 0; |
90 }; | 89 }; |
91 | 90 |
92 // Encapsulates an IPC channel between the client and one GPU process. | 91 // Encapsulates an IPC channel between the client and one GPU process. |
93 // On the GPU process side there's a corresponding GpuChannel. | 92 // On the GPU process side there's a corresponding GpuChannel. |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 typedef base::hash_map<int, CommandBufferProxyImpl*> ProxyMap; | 268 typedef base::hash_map<int, CommandBufferProxyImpl*> ProxyMap; |
270 ProxyMap proxies_; | 269 ProxyMap proxies_; |
271 ProxyFlushInfo flush_info_; | 270 ProxyFlushInfo flush_info_; |
272 | 271 |
273 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); | 272 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); |
274 }; | 273 }; |
275 | 274 |
276 } // namespace content | 275 } // namespace content |
277 | 276 |
278 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ | 277 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ |
OLD | NEW |