| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/drm/gpu/drm_thread_message_proxy.h" | 5 #include "ui/ozone/platform/drm/gpu/drm_thread_message_proxy.h" |
| 6 | 6 |
| 7 #include "base/thread_task_runner_handle.h" | 7 #include "base/thread_task_runner_handle.h" |
| 8 #include "ipc/ipc_message.h" | 8 #include "ipc/ipc_message.h" |
| 9 #include "ipc/ipc_sender.h" | 9 #include "ipc/ipc_sender.h" |
| 10 #include "ui/ozone/common/gpu/ozone_gpu_messages.h" | 10 #include "ui/ozone/common/gpu/ozone_gpu_messages.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 void DrmThreadMessageProxy::OnCursorMove(gfx::AcceleratedWidget widget, | 96 void DrmThreadMessageProxy::OnCursorMove(gfx::AcceleratedWidget widget, |
| 97 const gfx::Point& location) { | 97 const gfx::Point& location) { |
| 98 DCHECK(drm_thread_->IsRunning()); | 98 DCHECK(drm_thread_->IsRunning()); |
| 99 drm_thread_->task_runner()->PostTask( | 99 drm_thread_->task_runner()->PostTask( |
| 100 FROM_HERE, base::Bind(&DrmThread::MoveCursor, | 100 FROM_HERE, base::Bind(&DrmThread::MoveCursor, |
| 101 base::Unretained(drm_thread_), widget, location)); | 101 base::Unretained(drm_thread_), widget, location)); |
| 102 } | 102 } |
| 103 | 103 |
| 104 void DrmThreadMessageProxy::OnCheckOverlayCapabilities( | 104 void DrmThreadMessageProxy::OnCheckOverlayCapabilities( |
| 105 gfx::AcceleratedWidget widget, | 105 gfx::AcceleratedWidget widget, |
| 106 const std::vector<OverlayCheck_Params>& overlays) { | 106 const std::vector<OverlayCheck_Params>& current_combination, |
| 107 const std::vector<OverlayCheck_Params>& new_combination) { |
| 107 DCHECK(drm_thread_->IsRunning()); | 108 DCHECK(drm_thread_->IsRunning()); |
| 108 auto callback = | 109 auto callback = |
| 109 base::Bind(&DrmThreadMessageProxy::OnCheckOverlayCapabilitiesCallback, | 110 base::Bind(&DrmThreadMessageProxy::OnCheckOverlayCapabilitiesCallback, |
| 110 weak_ptr_factory_.GetWeakPtr()); | 111 weak_ptr_factory_.GetWeakPtr()); |
| 111 drm_thread_->task_runner()->PostTask( | 112 drm_thread_->task_runner()->PostTask( |
| 112 FROM_HERE, base::Bind(&DrmThread::CheckOverlayCapabilities, | 113 FROM_HERE, |
| 113 base::Unretained(drm_thread_), widget, overlays, | 114 base::Bind(&DrmThread::CheckOverlayCapabilities, |
| 114 CreateSafeCallback(callback))); | 115 base::Unretained(drm_thread_), widget, current_combination, |
| 116 new_combination, CreateSafeCallback(callback))); |
| 115 } | 117 } |
| 116 | 118 |
| 117 void DrmThreadMessageProxy::OnRefreshNativeDisplays() { | 119 void DrmThreadMessageProxy::OnRefreshNativeDisplays() { |
| 118 DCHECK(drm_thread_->IsRunning()); | 120 DCHECK(drm_thread_->IsRunning()); |
| 119 auto callback = | 121 auto callback = |
| 120 base::Bind(&DrmThreadMessageProxy::OnRefreshNativeDisplaysCallback, | 122 base::Bind(&DrmThreadMessageProxy::OnRefreshNativeDisplaysCallback, |
| 121 weak_ptr_factory_.GetWeakPtr()); | 123 weak_ptr_factory_.GetWeakPtr()); |
| 122 drm_thread_->task_runner()->PostTask( | 124 drm_thread_->task_runner()->PostTask( |
| 123 FROM_HERE, | 125 FROM_HERE, |
| 124 base::Bind(&DrmThread::RefreshNativeDisplays, | 126 base::Bind(&DrmThread::RefreshNativeDisplays, |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 HDCPState state) const { | 256 HDCPState state) const { |
| 255 sender_->Send(new OzoneHostMsg_HDCPStateReceived(display_id, success, state)); | 257 sender_->Send(new OzoneHostMsg_HDCPStateReceived(display_id, success, state)); |
| 256 } | 258 } |
| 257 | 259 |
| 258 void DrmThreadMessageProxy::OnSetHDCPStateCallback(int64_t display_id, | 260 void DrmThreadMessageProxy::OnSetHDCPStateCallback(int64_t display_id, |
| 259 bool success) const { | 261 bool success) const { |
| 260 sender_->Send(new OzoneHostMsg_HDCPStateUpdated(display_id, success)); | 262 sender_->Send(new OzoneHostMsg_HDCPStateUpdated(display_id, success)); |
| 261 } | 263 } |
| 262 | 264 |
| 263 } // namespace ui | 265 } // namespace ui |
| OLD | NEW |