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

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: crown of aragorn 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 struct GpuListenerInfo { 53 struct GpuListenerInfo {
54 GpuListenerInfo(); 54 GpuListenerInfo();
55 ~GpuListenerInfo(); 55 ~GpuListenerInfo();
56 56
57 base::WeakPtr<IPC::Listener> listener; 57 base::WeakPtr<IPC::Listener> listener;
58 scoped_refptr<base::MessageLoopProxy> loop; 58 scoped_refptr<base::MessageLoopProxy> loop;
59 }; 59 };
60 60
61 class CONTENT_EXPORT GpuChannelHostFactory { 61 class CONTENT_EXPORT GpuChannelHostFactory {
62 public: 62 public:
63 typedef base::Callback<void(const gfx::Size)> CreateImageCallback;
64
65 virtual ~GpuChannelHostFactory() {} 63 virtual ~GpuChannelHostFactory() {}
66 64
67 virtual bool IsMainThread() = 0; 65 virtual bool IsMainThread() = 0;
68 virtual base::MessageLoop* GetMainLoop() = 0; 66 virtual base::MessageLoop* GetMainLoop() = 0;
69 virtual scoped_refptr<base::MessageLoopProxy> GetIOLoopProxy() = 0; 67 virtual scoped_refptr<base::MessageLoopProxy> GetIOLoopProxy() = 0;
70 virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) = 0; 68 virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) = 0;
71 virtual bool CreateViewCommandBuffer( 69 virtual bool CreateViewCommandBuffer(
72 int32 surface_id, 70 int32 surface_id,
73 const GPUCreateCommandBufferConfig& init_params, 71 const GPUCreateCommandBufferConfig& init_params,
74 int32 route_id) = 0; 72 int32 route_id) = 0;
75 virtual void CreateImage(
76 gfx::PluginWindowHandle window,
77 int32 image_id,
78 const CreateImageCallback& callback) = 0;
79 virtual void DeleteImage(int32 image_id, int32 sync_point) = 0;
80 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( 73 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer(
81 size_t width, 74 size_t width,
82 size_t height, 75 size_t height,
83 unsigned internalformat, 76 unsigned internalformat,
84 unsigned usage) = 0; 77 unsigned usage) = 0;
85 }; 78 };
86 79
87 // Encapsulates an IPC channel between the client and one GPU process. 80 // Encapsulates an IPC channel between the client and one GPU process.
88 // On the GPU process side there's a corresponding GpuChannel. 81 // On the GPU process side there's a corresponding GpuChannel.
89 // Every method can be called on any thread with a message loop, except for the 82 // 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
244 // Used to look up a proxy from its routing id. 237 // Used to look up a proxy from its routing id.
245 typedef base::hash_map<int, CommandBufferProxyImpl*> ProxyMap; 238 typedef base::hash_map<int, CommandBufferProxyImpl*> ProxyMap;
246 ProxyMap proxies_; 239 ProxyMap proxies_;
247 240
248 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); 241 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost);
249 }; 242 };
250 243
251 } // namespace content 244 } // namespace content
252 245
253 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ 246 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698