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

Side by Side Diff: content/common/gpu/gpu_channel.h

Issue 1134113002: content/common: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix CrOS build. Created 5 years, 7 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
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_GPU_CHANNEL_H_ 5 #ifndef CONTENT_COMMON_GPU_GPU_CHANNEL_H_
6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_H_ 6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <string> 9 #include <string>
10 10
(...skipping 11 matching lines...) Expand all
22 #include "gpu/command_buffer/service/valuebuffer_manager.h" 22 #include "gpu/command_buffer/service/valuebuffer_manager.h"
23 #include "ipc/ipc_sync_channel.h" 23 #include "ipc/ipc_sync_channel.h"
24 #include "ui/gfx/geometry/size.h" 24 #include "ui/gfx/geometry/size.h"
25 #include "ui/gfx/native_widget_types.h" 25 #include "ui/gfx/native_widget_types.h"
26 #include "ui/gl/gl_share_group.h" 26 #include "ui/gl/gl_share_group.h"
27 #include "ui/gl/gpu_preference.h" 27 #include "ui/gl/gpu_preference.h"
28 28
29 struct GPUCreateCommandBufferConfig; 29 struct GPUCreateCommandBufferConfig;
30 30
31 namespace base { 31 namespace base {
32 class MessageLoopProxy;
33 class WaitableEvent; 32 class WaitableEvent;
34 } 33 }
35 34
36 namespace gpu { 35 namespace gpu {
37 class PreemptionFlag; 36 class PreemptionFlag;
38 union ValueState; 37 union ValueState;
39 class ValueStateMap; 38 class ValueStateMap;
40 namespace gles2 { 39 namespace gles2 {
41 class SubscriptionRefSet; 40 class SubscriptionRefSet;
42 } 41 }
(...skipping 16 matching lines...) Expand all
59 // Takes ownership of the renderer process handle. 58 // Takes ownership of the renderer process handle.
60 GpuChannel(GpuChannelManager* gpu_channel_manager, 59 GpuChannel(GpuChannelManager* gpu_channel_manager,
61 GpuWatchdog* watchdog, 60 GpuWatchdog* watchdog,
62 gfx::GLShareGroup* share_group, 61 gfx::GLShareGroup* share_group,
63 gpu::gles2::MailboxManager* mailbox_manager, 62 gpu::gles2::MailboxManager* mailbox_manager,
64 int client_id, 63 int client_id,
65 bool software, 64 bool software,
66 bool allow_future_sync_points); 65 bool allow_future_sync_points);
67 ~GpuChannel() override; 66 ~GpuChannel() override;
68 67
69 void Init(base::MessageLoopProxy* io_message_loop, 68 void Init(base::SingleThreadTaskRunner* io_task_runner,
70 base::WaitableEvent* shutdown_event); 69 base::WaitableEvent* shutdown_event);
71 70
72 // Get the GpuChannelManager that owns this channel. 71 // Get the GpuChannelManager that owns this channel.
73 GpuChannelManager* gpu_channel_manager() const { 72 GpuChannelManager* gpu_channel_manager() const {
74 return gpu_channel_manager_; 73 return gpu_channel_manager_;
75 } 74 }
76 75
77 // Returns the name of the associated IPC channel. 76 // Returns the name of the associated IPC channel.
78 std::string GetChannelName(); 77 std::string GetChannelName();
79 78
80 #if defined(OS_POSIX) 79 #if defined(OS_POSIX)
81 base::ScopedFD TakeRendererFileDescriptor(); 80 base::ScopedFD TakeRendererFileDescriptor();
82 #endif // defined(OS_POSIX) 81 #endif // defined(OS_POSIX)
83 82
84 base::ProcessId renderer_pid() const { return channel_->GetPeerPID(); } 83 base::ProcessId renderer_pid() const { return channel_->GetPeerPID(); }
85 84
86 int client_id() const { return client_id_; } 85 int client_id() const { return client_id_; }
87 86
88 scoped_refptr<base::MessageLoopProxy> io_message_loop() const { 87 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner() const {
89 return io_message_loop_; 88 return io_task_runner_;
90 } 89 }
91 90
92 // IPC::Listener implementation: 91 // IPC::Listener implementation:
93 bool OnMessageReceived(const IPC::Message& msg) override; 92 bool OnMessageReceived(const IPC::Message& msg) override;
94 void OnChannelError() override; 93 void OnChannelError() override;
95 94
96 // IPC::Sender implementation: 95 // IPC::Sender implementation:
97 bool Send(IPC::Message* msg) override; 96 bool Send(IPC::Message* msg) override;
98 97
99 // Requeue the message that is currently being processed to the beginning of 98 // Requeue the message that is currently being processed to the beginning of
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 StubMap stubs_; 230 StubMap stubs_;
232 231
233 bool log_messages_; // True if we should log sent and received messages. 232 bool log_messages_; // True if we should log sent and received messages.
234 gpu::gles2::DisallowedFeatures disallowed_features_; 233 gpu::gles2::DisallowedFeatures disallowed_features_;
235 GpuWatchdog* watchdog_; 234 GpuWatchdog* watchdog_;
236 bool software_; 235 bool software_;
237 bool handle_messages_scheduled_; 236 bool handle_messages_scheduled_;
238 IPC::Message* currently_processing_message_; 237 IPC::Message* currently_processing_message_;
239 238
240 scoped_refptr<GpuChannelMessageFilter> filter_; 239 scoped_refptr<GpuChannelMessageFilter> filter_;
241 scoped_refptr<base::MessageLoopProxy> io_message_loop_; 240 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
242 241
243 size_t num_stubs_descheduled_; 242 size_t num_stubs_descheduled_;
244 243
245 bool allow_future_sync_points_; 244 bool allow_future_sync_points_;
246 245
247 // Member variables should appear before the WeakPtrFactory, to ensure 246 // Member variables should appear before the WeakPtrFactory, to ensure
248 // that any WeakPtrs to Controller are invalidated before its members 247 // that any WeakPtrs to Controller are invalidated before its members
249 // variable's destructors are executed, rendering them invalid. 248 // variable's destructors are executed, rendering them invalid.
250 base::WeakPtrFactory<GpuChannel> weak_factory_; 249 base::WeakPtrFactory<GpuChannel> weak_factory_;
251 250
252 DISALLOW_COPY_AND_ASSIGN(GpuChannel); 251 DISALLOW_COPY_AND_ASSIGN(GpuChannel);
253 }; 252 };
254 253
255 } // namespace content 254 } // namespace content
256 255
257 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_H_ 256 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_H_
OLDNEW
« no previous file with comments | « content/common/gpu/client/gpu_video_encode_accelerator_host.cc ('k') | content/common/gpu/gpu_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698