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 24 matching lines...) Expand all Loading... |
35 const GPUCreateCommandBufferConfig& init_params, | 35 const GPUCreateCommandBufferConfig& init_params, |
36 int32 route_id) OVERRIDE; | 36 int32 route_id) OVERRIDE; |
37 virtual void CreateImage( | 37 virtual void CreateImage( |
38 gfx::PluginWindowHandle window, | 38 gfx::PluginWindowHandle window, |
39 int32 image_id, | 39 int32 image_id, |
40 const CreateImageCallback& callback) OVERRIDE; | 40 const CreateImageCallback& callback) OVERRIDE; |
41 virtual void DeleteImage(int32 image_idu, int32 sync_point) OVERRIDE; | 41 virtual void DeleteImage(int32 image_idu, int32 sync_point) OVERRIDE; |
42 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( | 42 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( |
43 size_t width, | 43 size_t width, |
44 size_t height, | 44 size_t height, |
45 unsigned internalformat) OVERRIDE; | 45 unsigned internalformat, |
| 46 unsigned usage) OVERRIDE; |
46 | 47 |
47 // Specify a task runner and callback to be used for a set of messages. The | 48 // Specify a task runner and callback to be used for a set of messages. The |
48 // callback will be set up on the current GpuProcessHost, identified by | 49 // callback will be set up on the current GpuProcessHost, identified by |
49 // GpuProcessHostId(). | 50 // GpuProcessHostId(). |
50 virtual void SetHandlerForControlMessages( | 51 virtual void SetHandlerForControlMessages( |
51 const uint32* message_ids, | 52 const uint32* message_ids, |
52 size_t num_messages, | 53 size_t num_messages, |
53 const base::Callback<void(const IPC::Message&)>& handler, | 54 const base::Callback<void(const IPC::Message&)>& handler, |
54 base::TaskRunner* target_task_runner); | 55 base::TaskRunner* target_task_runner); |
55 int GpuProcessHostId() { return gpu_host_id_; } | 56 int GpuProcessHostId() { return gpu_host_id_; } |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 std::vector<base::Closure> established_callbacks_; | 135 std::vector<base::Closure> established_callbacks_; |
135 | 136 |
136 static BrowserGpuChannelHostFactory* instance_; | 137 static BrowserGpuChannelHostFactory* instance_; |
137 | 138 |
138 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory); | 139 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory); |
139 }; | 140 }; |
140 | 141 |
141 } // namespace content | 142 } // namespace content |
142 | 143 |
143 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ | 144 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ |
OLD | NEW |