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_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ | 5 #ifndef CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ |
6 #define CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ | 6 #define CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 static BrowserGpuChannelHostFactory* instance() { return instance_; } | 24 static BrowserGpuChannelHostFactory* instance() { return instance_; } |
25 | 25 |
26 // Overridden from GpuChannelHostFactory: | 26 // Overridden from GpuChannelHostFactory: |
27 bool IsMainThread() override; | 27 bool IsMainThread() override; |
28 scoped_refptr<base::SingleThreadTaskRunner> GetIOThreadTaskRunner() override; | 28 scoped_refptr<base::SingleThreadTaskRunner> GetIOThreadTaskRunner() override; |
29 scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) override; | 29 scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) override; |
30 CreateCommandBufferResult CreateViewCommandBuffer( | 30 CreateCommandBufferResult CreateViewCommandBuffer( |
31 int32 surface_id, | 31 int32 surface_id, |
32 const GPUCreateCommandBufferConfig& init_params, | 32 const GPUCreateCommandBufferConfig& init_params, |
33 int32 route_id) override; | 33 int32 route_id) override; |
34 IPC::AttachmentBroker* GetAttachmentBroker() override; | |
35 | 34 |
36 int GpuProcessHostId() { return gpu_host_id_; } | 35 int GpuProcessHostId() { return gpu_host_id_; } |
37 #if !defined(OS_ANDROID) | 36 #if !defined(OS_ANDROID) |
38 GpuChannelHost* EstablishGpuChannelSync( | 37 GpuChannelHost* EstablishGpuChannelSync( |
39 CauseForGpuLaunch cause_for_gpu_launch); | 38 CauseForGpuLaunch cause_for_gpu_launch); |
40 #endif | 39 #endif |
41 void EstablishGpuChannel(CauseForGpuLaunch cause_for_gpu_launch, | 40 void EstablishGpuChannel(CauseForGpuLaunch cause_for_gpu_launch, |
42 const base::Closure& callback); | 41 const base::Closure& callback); |
43 GpuChannelHost* GetGpuChannel(); | 42 GpuChannelHost* GetGpuChannel(); |
44 int GetGpuChannelId() { return gpu_client_id_; } | 43 int GetGpuChannelId() { return gpu_client_id_; } |
(...skipping 30 matching lines...) Expand all Loading... |
75 std::vector<base::Closure> established_callbacks_; | 74 std::vector<base::Closure> established_callbacks_; |
76 | 75 |
77 static BrowserGpuChannelHostFactory* instance_; | 76 static BrowserGpuChannelHostFactory* instance_; |
78 | 77 |
79 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory); | 78 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory); |
80 }; | 79 }; |
81 | 80 |
82 } // namespace content | 81 } // namespace content |
83 | 82 |
84 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ | 83 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ |
OLD | NEW |