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 "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/process/process.h" | 10 #include "base/process/process.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 virtual int32 CreateViewCommandBuffer( | 31 virtual int32 CreateViewCommandBuffer( |
32 int32 surface_id, | 32 int32 surface_id, |
33 const GPUCreateCommandBufferConfig& init_params) OVERRIDE; | 33 const GPUCreateCommandBufferConfig& init_params) OVERRIDE; |
34 virtual void CreateImage( | 34 virtual void CreateImage( |
35 gfx::PluginWindowHandle window, | 35 gfx::PluginWindowHandle window, |
36 int32 image_id, | 36 int32 image_id, |
37 const CreateImageCallback& callback) OVERRIDE; | 37 const CreateImageCallback& callback) OVERRIDE; |
38 virtual void DeleteImage(int32 image_idu, int32 sync_point) OVERRIDE; | 38 virtual void DeleteImage(int32 image_idu, int32 sync_point) OVERRIDE; |
39 virtual GpuChannelHost* EstablishGpuChannelSync( | 39 virtual GpuChannelHost* EstablishGpuChannelSync( |
40 CauseForGpuLaunch cause_for_gpu_launch) OVERRIDE; | 40 CauseForGpuLaunch cause_for_gpu_launch) OVERRIDE; |
| 41 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( |
| 42 size_t width, |
| 43 size_t height, |
| 44 unsigned internalformat) OVERRIDE; |
41 | 45 |
42 // Specify a task runner and callback to be used for a set of messages. The | 46 // Specify a task runner and callback to be used for a set of messages. The |
43 // callback will be set up on the current GpuProcessHost, identified by | 47 // callback will be set up on the current GpuProcessHost, identified by |
44 // GpuProcessHostId(). | 48 // GpuProcessHostId(). |
45 virtual void SetHandlerForControlMessages( | 49 virtual void SetHandlerForControlMessages( |
46 const uint32* message_ids, | 50 const uint32* message_ids, |
47 size_t num_messages, | 51 size_t num_messages, |
48 const base::Callback<void(const IPC::Message&)>& handler, | 52 const base::Callback<void(const IPC::Message&)>& handler, |
49 base::TaskRunner* target_task_runner); | 53 base::TaskRunner* target_task_runner); |
50 int GpuProcessHostId() { return gpu_host_id_; } | 54 int GpuProcessHostId() { return gpu_host_id_; } |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 int gpu_host_id_; | 105 int gpu_host_id_; |
102 | 106 |
103 static BrowserGpuChannelHostFactory* instance_; | 107 static BrowserGpuChannelHostFactory* instance_; |
104 | 108 |
105 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory); | 109 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory); |
106 }; | 110 }; |
107 | 111 |
108 } // namespace content | 112 } // namespace content |
109 | 113 |
110 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ | 114 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ |
OLD | NEW |