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

Side by Side Diff: content/common/gpu/client/gpu_channel_host.h

Issue 331723003: gpu: Remove Create/DeleteImage IPC by adding an X11_PIXMAP_BUFFER GpuMemoryBuffer type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 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
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_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ 5 #ifndef CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_
6 #define CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ 6 #define CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 struct GpuListenerInfo { 54 struct GpuListenerInfo {
55 GpuListenerInfo(); 55 GpuListenerInfo();
56 ~GpuListenerInfo(); 56 ~GpuListenerInfo();
57 57
58 base::WeakPtr<IPC::Listener> listener; 58 base::WeakPtr<IPC::Listener> listener;
59 scoped_refptr<base::MessageLoopProxy> loop; 59 scoped_refptr<base::MessageLoopProxy> loop;
60 }; 60 };
61 61
62 class CONTENT_EXPORT GpuChannelHostFactory { 62 class CONTENT_EXPORT GpuChannelHostFactory {
63 public: 63 public:
64 typedef base::Callback<void(const gfx::Size)> CreateImageCallback;
65
66 virtual ~GpuChannelHostFactory() {} 64 virtual ~GpuChannelHostFactory() {}
67 65
68 virtual bool IsMainThread() = 0; 66 virtual bool IsMainThread() = 0;
69 virtual base::MessageLoop* GetMainLoop() = 0; 67 virtual base::MessageLoop* GetMainLoop() = 0;
70 virtual scoped_refptr<base::MessageLoopProxy> GetIOLoopProxy() = 0; 68 virtual scoped_refptr<base::MessageLoopProxy> GetIOLoopProxy() = 0;
71 virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) = 0; 69 virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) = 0;
72 virtual CreateCommandBufferResult CreateViewCommandBuffer( 70 virtual CreateCommandBufferResult CreateViewCommandBuffer(
73 int32 surface_id, 71 int32 surface_id,
74 const GPUCreateCommandBufferConfig& init_params, 72 const GPUCreateCommandBufferConfig& init_params,
75 int32 route_id) = 0; 73 int32 route_id) = 0;
76 virtual void CreateImage(
77 gfx::PluginWindowHandle window,
78 int32 image_id,
79 const CreateImageCallback& callback) = 0;
80 virtual void DeleteImage(int32 image_id, int32 sync_point) = 0;
81 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( 74 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer(
82 size_t width, 75 size_t width,
83 size_t height, 76 size_t height,
84 unsigned internalformat, 77 unsigned internalformat,
85 unsigned usage) = 0; 78 unsigned usage) = 0;
86 }; 79 };
87 80
88 // Encapsulates an IPC channel between the client and one GPU process. 81 // Encapsulates an IPC channel between the client and one GPU process.
89 // On the GPU process side there's a corresponding GpuChannel. 82 // On the GPU process side there's a corresponding GpuChannel.
90 // Every method can be called on any thread with a message loop, except for the 83 // Every method can be called on any thread with a message loop, except for the
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 // Used to look up a proxy from its routing id. 238 // Used to look up a proxy from its routing id.
246 typedef base::hash_map<int, CommandBufferProxyImpl*> ProxyMap; 239 typedef base::hash_map<int, CommandBufferProxyImpl*> ProxyMap;
247 ProxyMap proxies_; 240 ProxyMap proxies_;
248 241
249 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); 242 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost);
250 }; 243 };
251 244
252 } // namespace content 245 } // namespace content
253 246
254 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ 247 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_
OLDNEW
« no previous file with comments | « content/common/gpu/client/command_buffer_proxy_impl.cc ('k') | content/common/gpu/client/gpu_channel_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698