| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 // GpuChannelHostFactory implementation. | 26 // GpuChannelHostFactory implementation. |
| 27 bool IsMainThread() override; | 27 bool IsMainThread() override; |
| 28 base::MessageLoop* GetMainLoop() override; | 28 base::MessageLoop* GetMainLoop() override; |
| 29 scoped_refptr<base::MessageLoopProxy> GetIOLoopProxy() override; | 29 scoped_refptr<base::MessageLoopProxy> GetIOLoopProxy() override; |
| 30 scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) override; | 30 scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) override; |
| 31 CreateCommandBufferResult CreateViewCommandBuffer( | 31 CreateCommandBufferResult CreateViewCommandBuffer( |
| 32 int32 surface_id, | 32 int32 surface_id, |
| 33 const GPUCreateCommandBufferConfig& init_params, | 33 const GPUCreateCommandBufferConfig& init_params, |
| 34 int32 route_id) override; | 34 int32 route_id) override; |
| 35 virtual void WaitForPendingGpuMemoryBufferUsageToComplete( |
| 36 const base::Closure& callback) override; |
| 35 | 37 |
| 36 // Specify a task runner and callback to be used for a set of messages. The | 38 // Specify a task runner and callback to be used for a set of messages. The |
| 37 // callback will be set up on the current GpuProcessHost, identified by | 39 // callback will be set up on the current GpuProcessHost, identified by |
| 38 // GpuProcessHostId(). | 40 // GpuProcessHostId(). |
| 39 virtual void SetHandlerForControlMessages( | 41 virtual void SetHandlerForControlMessages( |
| 40 const uint32* message_ids, | 42 const uint32* message_ids, |
| 41 size_t num_messages, | 43 size_t num_messages, |
| 42 const base::Callback<void(const IPC::Message&)>& handler, | 44 const base::Callback<void(const IPC::Message&)>& handler, |
| 43 base::TaskRunner* target_task_runner); | 45 base::TaskRunner* target_task_runner); |
| 44 int GpuProcessHostId() { return gpu_host_id_; } | 46 int GpuProcessHostId() { return gpu_host_id_; } |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 std::vector<base::Closure> established_callbacks_; | 81 std::vector<base::Closure> established_callbacks_; |
| 80 | 82 |
| 81 static BrowserGpuChannelHostFactory* instance_; | 83 static BrowserGpuChannelHostFactory* instance_; |
| 82 | 84 |
| 83 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory); | 85 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory); |
| 84 }; | 86 }; |
| 85 | 87 |
| 86 } // namespace content | 88 } // namespace content |
| 87 | 89 |
| 88 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ | 90 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ |
| OLD | NEW |