Chromium Code Reviews| 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 scoped_refptr<base::SingleThreadTaskRunner> TaskRunner() override; | |
|
piman
2015/12/15 07:15:35
nit: GetMainThreadTaskRunner() ? To parallel GetIO
| |
| 34 | 35 |
| 35 int GpuProcessHostId() { return gpu_host_id_; } | 36 int GpuProcessHostId() { return gpu_host_id_; } |
| 36 #if !defined(OS_ANDROID) | 37 #if !defined(OS_ANDROID) |
| 37 GpuChannelHost* EstablishGpuChannelSync( | 38 GpuChannelHost* EstablishGpuChannelSync( |
| 38 CauseForGpuLaunch cause_for_gpu_launch); | 39 CauseForGpuLaunch cause_for_gpu_launch); |
| 39 #endif | 40 #endif |
| 40 void EstablishGpuChannel(CauseForGpuLaunch cause_for_gpu_launch, | 41 void EstablishGpuChannel(CauseForGpuLaunch cause_for_gpu_launch, |
| 41 const base::Closure& callback); | 42 const base::Closure& callback); |
| 42 GpuChannelHost* GetGpuChannel(); | 43 GpuChannelHost* GetGpuChannel(); |
| 43 int GetGpuChannelId() { return gpu_client_id_; } | 44 int GetGpuChannelId() { return gpu_client_id_; } |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 74 std::vector<base::Closure> established_callbacks_; | 75 std::vector<base::Closure> established_callbacks_; |
| 75 | 76 |
| 76 static BrowserGpuChannelHostFactory* instance_; | 77 static BrowserGpuChannelHostFactory* instance_; |
| 77 | 78 |
| 78 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory); | 79 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory); |
| 79 }; | 80 }; |
| 80 | 81 |
| 81 } // namespace content | 82 } // namespace content |
| 82 | 83 |
| 83 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ | 84 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ |
| OLD | NEW |