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

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

Issue 1513053002: WIP - Gutterless resize on Windows Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback Created 5 years 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
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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 virtual ~GpuChannelHostFactory() {} 63 virtual ~GpuChannelHostFactory() {}
64 64
65 virtual bool IsMainThread() = 0; 65 virtual bool IsMainThread() = 0;
66 virtual scoped_refptr<base::SingleThreadTaskRunner> 66 virtual scoped_refptr<base::SingleThreadTaskRunner>
67 GetIOThreadTaskRunner() = 0; 67 GetIOThreadTaskRunner() = 0;
68 virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) = 0; 68 virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) = 0;
69 virtual CreateCommandBufferResult CreateViewCommandBuffer( 69 virtual CreateCommandBufferResult CreateViewCommandBuffer(
70 int32 surface_id, 70 int32 surface_id,
71 const GPUCreateCommandBufferConfig& init_params, 71 const GPUCreateCommandBufferConfig& init_params,
72 int32 route_id) = 0; 72 int32 route_id) = 0;
73 virtual scoped_refptr<base::SingleThreadTaskRunner> TaskRunner() = 0;
73 }; 74 };
74 75
75 // Encapsulates an IPC channel between the client and one GPU process. 76 // Encapsulates an IPC channel between the client and one GPU process.
76 // On the GPU process side there's a corresponding GpuChannel. 77 // On the GPU process side there's a corresponding GpuChannel.
77 // Every method can be called on any thread with a message loop, except for the 78 // Every method can be called on any thread with a message loop, except for the
78 // IO thread. 79 // IO thread.
79 class GpuChannelHost : public IPC::Sender, 80 class GpuChannelHost : public IPC::Sender,
80 public base::RefCountedThreadSafe<GpuChannelHost> { 81 public base::RefCountedThreadSafe<GpuChannelHost> {
81 public: 82 public:
82 // Must be called on the main thread (as defined by the factory). 83 // Must be called on the main thread (as defined by the factory).
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 mutable base::Lock context_lock_; 304 mutable base::Lock context_lock_;
304 scoped_ptr<IPC::SyncChannel> channel_; 305 scoped_ptr<IPC::SyncChannel> channel_;
305 base::hash_map<int32, StreamFlushInfo> stream_flush_info_; 306 base::hash_map<int32, StreamFlushInfo> stream_flush_info_;
306 307
307 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); 308 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost);
308 }; 309 };
309 310
310 } // namespace content 311 } // namespace content
311 312
312 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ 313 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698