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

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

Issue 440203002: Merge 283085 "Added more detailed result codes for CreateViewCom..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/2062/src/
Patch Set: Created 6 years, 4 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
11 #include "base/atomic_sequence_num.h" 11 #include "base/atomic_sequence_num.h"
12 #include "base/containers/hash_tables.h" 12 #include "base/containers/hash_tables.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/process/process.h" 16 #include "base/process/process.h"
17 #include "base/synchronization/lock.h" 17 #include "base/synchronization/lock.h"
18 #include "content/common/content_export.h" 18 #include "content/common/content_export.h"
19 #include "content/common/gpu/gpu_process_launch_causes.h" 19 #include "content/common/gpu/gpu_process_launch_causes.h"
20 #include "content/common/gpu/gpu_result_codes.h"
20 #include "content/common/message_router.h" 21 #include "content/common/message_router.h"
21 #include "gpu/config/gpu_info.h" 22 #include "gpu/config/gpu_info.h"
22 #include "ipc/ipc_channel_handle.h" 23 #include "ipc/ipc_channel_handle.h"
23 #include "ipc/ipc_sync_channel.h" 24 #include "ipc/ipc_sync_channel.h"
24 #include "ipc/message_filter.h" 25 #include "ipc/message_filter.h"
25 #include "ui/gfx/gpu_memory_buffer.h" 26 #include "ui/gfx/gpu_memory_buffer.h"
26 #include "ui/gfx/native_widget_types.h" 27 #include "ui/gfx/native_widget_types.h"
27 #include "ui/gfx/size.h" 28 #include "ui/gfx/size.h"
28 #include "ui/gl/gpu_preference.h" 29 #include "ui/gl/gpu_preference.h"
29 30
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 class CONTENT_EXPORT GpuChannelHostFactory { 62 class CONTENT_EXPORT GpuChannelHostFactory {
62 public: 63 public:
63 typedef base::Callback<void(const gfx::Size)> CreateImageCallback; 64 typedef base::Callback<void(const gfx::Size)> CreateImageCallback;
64 65
65 virtual ~GpuChannelHostFactory() {} 66 virtual ~GpuChannelHostFactory() {}
66 67
67 virtual bool IsMainThread() = 0; 68 virtual bool IsMainThread() = 0;
68 virtual base::MessageLoop* GetMainLoop() = 0; 69 virtual base::MessageLoop* GetMainLoop() = 0;
69 virtual scoped_refptr<base::MessageLoopProxy> GetIOLoopProxy() = 0; 70 virtual scoped_refptr<base::MessageLoopProxy> GetIOLoopProxy() = 0;
70 virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) = 0; 71 virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) = 0;
71 virtual bool CreateViewCommandBuffer( 72 virtual CreateCommandBufferResult CreateViewCommandBuffer(
72 int32 surface_id, 73 int32 surface_id,
73 const GPUCreateCommandBufferConfig& init_params, 74 const GPUCreateCommandBufferConfig& init_params,
74 int32 route_id) = 0; 75 int32 route_id) = 0;
75 virtual void CreateImage( 76 virtual void CreateImage(
76 gfx::PluginWindowHandle window, 77 gfx::PluginWindowHandle window,
77 int32 image_id, 78 int32 image_id,
78 const CreateImageCallback& callback) = 0; 79 const CreateImageCallback& callback) = 0;
79 virtual void DeleteImage(int32 image_id, int32 sync_point) = 0; 80 virtual void DeleteImage(int32 image_id, int32 sync_point) = 0;
80 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( 81 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer(
81 size_t width, 82 size_t width,
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 // Used to look up a proxy from its routing id. 245 // Used to look up a proxy from its routing id.
245 typedef base::hash_map<int, CommandBufferProxyImpl*> ProxyMap; 246 typedef base::hash_map<int, CommandBufferProxyImpl*> ProxyMap;
246 ProxyMap proxies_; 247 ProxyMap proxies_;
247 248
248 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); 249 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost);
249 }; 250 };
250 251
251 } // namespace content 252 } // namespace content
252 253
253 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ 254 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/gpu_message_filter.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