Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(676)

Side by Side Diff: content/browser/gpu/browser_gpu_channel_host_factory.h

Issue 213493002: content: Add multi-proc surface texture support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/gpu/browser_gpu_channel_host_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 23 matching lines...) Expand all
34 const GPUCreateCommandBufferConfig& init_params) OVERRIDE; 34 const GPUCreateCommandBufferConfig& init_params) OVERRIDE;
35 virtual void CreateImage( 35 virtual void CreateImage(
36 gfx::PluginWindowHandle window, 36 gfx::PluginWindowHandle window,
37 int32 image_id, 37 int32 image_id,
38 const CreateImageCallback& callback) OVERRIDE; 38 const CreateImageCallback& callback) OVERRIDE;
39 virtual void DeleteImage(int32 image_idu, int32 sync_point) OVERRIDE; 39 virtual void DeleteImage(int32 image_idu, int32 sync_point) OVERRIDE;
40 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( 40 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer(
41 size_t width, 41 size_t width,
42 size_t height, 42 size_t height,
43 unsigned internalformat) OVERRIDE; 43 unsigned internalformat) OVERRIDE;
44 virtual void CreateSurfaceTexture(
45 int32 surface_texture_id,
46 base::ProcessHandle process_handle,
47 const CreateSurfaceTextureCallback& callback) OVERRIDE;
44 48
45 // Specify a task runner and callback to be used for a set of messages. The 49 // Specify a task runner and callback to be used for a set of messages. The
46 // callback will be set up on the current GpuProcessHost, identified by 50 // callback will be set up on the current GpuProcessHost, identified by
47 // GpuProcessHostId(). 51 // GpuProcessHostId().
48 virtual void SetHandlerForControlMessages( 52 virtual void SetHandlerForControlMessages(
49 const uint32* message_ids, 53 const uint32* message_ids,
50 size_t num_messages, 54 size_t num_messages,
51 const base::Callback<void(const IPC::Message&)>& handler, 55 const base::Callback<void(const IPC::Message&)>& handler,
52 base::TaskRunner* target_task_runner); 56 base::TaskRunner* target_task_runner);
53 int GpuProcessHostId() { return gpu_host_id_; } 57 int GpuProcessHostId() { return gpu_host_id_; }
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 static void CommandBufferCreatedOnIO(CreateRequest* request, int32 route_id); 117 static void CommandBufferCreatedOnIO(CreateRequest* request, int32 route_id);
114 void CreateImageOnIO( 118 void CreateImageOnIO(
115 gfx::PluginWindowHandle window, 119 gfx::PluginWindowHandle window,
116 int32 image_id, 120 int32 image_id,
117 const CreateImageCallback& callback); 121 const CreateImageCallback& callback);
118 static void ImageCreatedOnIO( 122 static void ImageCreatedOnIO(
119 const CreateImageCallback& callback, const gfx::Size size); 123 const CreateImageCallback& callback, const gfx::Size size);
120 static void OnImageCreated( 124 static void OnImageCreated(
121 const CreateImageCallback& callback, const gfx::Size size); 125 const CreateImageCallback& callback, const gfx::Size size);
122 void DeleteImageOnIO(int32 image_id, int32 sync_point); 126 void DeleteImageOnIO(int32 image_id, int32 sync_point);
127 void CreateSurfaceTextureOnIO(
128 int32 surface_texture_id,
129 base::ProcessHandle process_handle,
130 const CreateSurfaceTextureCallback& callback);
131 static void SurfaceTextureCreatedOnIO(
132 const CreateSurfaceTextureCallback& callback);
133 static void OnSurfaceTextureCreated(
134 const CreateSurfaceTextureCallback& callback);
123 static void AddFilterOnIO( 135 static void AddFilterOnIO(
124 int gpu_host_id, 136 int gpu_host_id,
125 scoped_refptr<IPC::ChannelProxy::MessageFilter> filter); 137 scoped_refptr<IPC::ChannelProxy::MessageFilter> filter);
126 138
127 const int gpu_client_id_; 139 const int gpu_client_id_;
128 scoped_ptr<base::WaitableEvent> shutdown_event_; 140 scoped_ptr<base::WaitableEvent> shutdown_event_;
129 scoped_refptr<GpuChannelHost> gpu_channel_; 141 scoped_refptr<GpuChannelHost> gpu_channel_;
130 int gpu_host_id_; 142 int gpu_host_id_;
131 scoped_refptr<EstablishRequest> pending_request_; 143 scoped_refptr<EstablishRequest> pending_request_;
132 std::vector<base::Closure> established_callbacks_; 144 std::vector<base::Closure> established_callbacks_;
133 145
134 static BrowserGpuChannelHostFactory* instance_; 146 static BrowserGpuChannelHostFactory* instance_;
135 147
136 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory); 148 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory);
137 }; 149 };
138 150
139 } // namespace content 151 } // namespace content
140 152
141 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ 153 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/gpu/browser_gpu_channel_host_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698