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

Side by Side Diff: ui/ozone/platform/dri/native_display_delegate_proxy.cc

Issue 821133006: ozone: Dispatch GPU process IPCs to IO thread directly from GpuPlatformSupportHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "ui/ozone/platform/dri/native_display_delegate_proxy.h" 5 #include "ui/ozone/platform/dri/native_display_delegate_proxy.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "ui/display/types/display_snapshot.h" 10 #include "ui/display/types/display_snapshot.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 case DeviceEvent::REMOVE: 189 case DeviceEvent::REMOVE:
190 VLOG(1) << "Got display removed event for " << event.path().value(); 190 VLOG(1) << "Got display removed event for " << event.path().value();
191 proxy_->Send(new OzoneGpuMsg_RemoveGraphicsDevice(event.path())); 191 proxy_->Send(new OzoneGpuMsg_RemoveGraphicsDevice(event.path()));
192 break; 192 break;
193 } 193 }
194 194
195 FOR_EACH_OBSERVER(NativeDisplayObserver, observers_, 195 FOR_EACH_OBSERVER(NativeDisplayObserver, observers_,
196 OnConfigurationChanged()); 196 OnConfigurationChanged());
197 } 197 }
198 198
199 void NativeDisplayDelegateProxy::OnChannelEstablished(int host_id, 199 void NativeDisplayDelegateProxy::OnChannelEstablished(
200 IPC::Sender* sender) { 200 int host_id,
201 scoped_refptr<base::SingleThreadTaskRunner> send_runner,
202 const base::Callback<void(IPC::Message*)>& send_callback) {
201 FOR_EACH_OBSERVER(NativeDisplayObserver, observers_, 203 FOR_EACH_OBSERVER(NativeDisplayObserver, observers_,
202 OnConfigurationChanged()); 204 OnConfigurationChanged());
203 } 205 }
204 206
205 void NativeDisplayDelegateProxy::OnChannelDestroyed(int host_id) { 207 void NativeDisplayDelegateProxy::OnChannelDestroyed(int host_id) {
206 // If the channel got destroyed in the middle of a configuration then just 208 // If the channel got destroyed in the middle of a configuration then just
207 // respond with failure. 209 // respond with failure.
208 if (!get_displays_callback_.is_null()) { 210 if (!get_displays_callback_.is_null()) {
209 get_displays_callback_.Run(std::vector<DisplaySnapshot*>()); 211 get_displays_callback_.Run(std::vector<DisplaySnapshot*>());
210 get_displays_callback_.Reset(); 212 get_displays_callback_.Reset();
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 void NativeDisplayDelegateProxy::OnDisplayConfigured(int64_t display_id, 249 void NativeDisplayDelegateProxy::OnDisplayConfigured(int64_t display_id,
248 bool status) { 250 bool status) {
249 auto it = configure_callback_map_.find(display_id); 251 auto it = configure_callback_map_.find(display_id);
250 if (it != configure_callback_map_.end()) { 252 if (it != configure_callback_map_.end()) {
251 it->second.Run(status); 253 it->second.Run(status);
252 configure_callback_map_.erase(it); 254 configure_callback_map_.erase(it);
253 } 255 }
254 } 256 }
255 257
256 } // namespace ui 258 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698