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

Side by Side Diff: gpu/ipc/client/gpu_channel_host.h

Issue 2197613003: gpu: Introduce GpuChannelEstablishFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tot merge Created 4 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
« no previous file with comments | « content/public/browser/content_browser_client.cc ('k') | services/ui/common/gpu_service.h » ('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 GPU_IPC_CLIENT_GPU_CHANNEL_HOST_H_ 5 #ifndef GPU_IPC_CLIENT_GPU_CHANNEL_HOST_H_
6 #define GPU_IPC_CLIENT_GPU_CHANNEL_HOST_H_ 6 #define GPU_IPC_CLIENT_GPU_CHANNEL_HOST_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 25 matching lines...) Expand all
36 namespace IPC { 36 namespace IPC {
37 class SyncMessageFilter; 37 class SyncMessageFilter;
38 } 38 }
39 39
40 namespace gpu { 40 namespace gpu {
41 class GpuMemoryBufferManager; 41 class GpuMemoryBufferManager;
42 } 42 }
43 43
44 namespace gpu { 44 namespace gpu {
45 45
46 class GpuChannelHost;
47 using GpuChannelEstablishedCallback =
48 base::Callback<void(scoped_refptr<GpuChannelHost>)>;
49
50 class GPU_EXPORT GpuChannelEstablishFactory {
51 public:
52 virtual ~GpuChannelEstablishFactory() {}
53
54 virtual void EstablishGpuChannel(
55 const GpuChannelEstablishedCallback& callback) = 0;
56 virtual scoped_refptr<GpuChannelHost> EstablishGpuChannelSync() = 0;
57 };
58
46 class GPU_EXPORT GpuChannelHostFactory { 59 class GPU_EXPORT GpuChannelHostFactory {
47 public: 60 public:
48 virtual ~GpuChannelHostFactory() {} 61 virtual ~GpuChannelHostFactory() {}
49 62
50 virtual bool IsMainThread() = 0; 63 virtual bool IsMainThread() = 0;
51 virtual scoped_refptr<base::SingleThreadTaskRunner> 64 virtual scoped_refptr<base::SingleThreadTaskRunner>
52 GetIOThreadTaskRunner() = 0; 65 GetIOThreadTaskRunner() = 0;
53 virtual std::unique_ptr<base::SharedMemory> AllocateSharedMemory( 66 virtual std::unique_ptr<base::SharedMemory> AllocateSharedMemory(
54 size_t size) = 0; 67 size_t size) = 0;
55 }; 68 };
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 mutable base::Lock context_lock_; 280 mutable base::Lock context_lock_;
268 std::unique_ptr<IPC::SyncChannel> channel_; 281 std::unique_ptr<IPC::SyncChannel> channel_;
269 base::hash_map<int32_t, StreamFlushInfo> stream_flush_info_; 282 base::hash_map<int32_t, StreamFlushInfo> stream_flush_info_;
270 283
271 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); 284 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost);
272 }; 285 };
273 286
274 } // namespace gpu 287 } // namespace gpu
275 288
276 #endif // GPU_IPC_CLIENT_GPU_CHANNEL_HOST_H_ 289 #endif // GPU_IPC_CLIENT_GPU_CHANNEL_HOST_H_
OLDNEW
« no previous file with comments | « content/public/browser/content_browser_client.cc ('k') | services/ui/common/gpu_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698