summaryrefslogtreecommitdiff
path: root/chromium/ui/ozone/platform/drm/gpu/drm_thread_message_proxy.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/ui/ozone/platform/drm/gpu/drm_thread_message_proxy.cc')
-rw-r--r--chromium/ui/ozone/platform/drm/gpu/drm_thread_message_proxy.cc23
1 files changed, 14 insertions, 9 deletions
diff --git a/chromium/ui/ozone/platform/drm/gpu/drm_thread_message_proxy.cc b/chromium/ui/ozone/platform/drm/gpu/drm_thread_message_proxy.cc
index b1add6a3d74..fb46660ae63 100644
--- a/chromium/ui/ozone/platform/drm/gpu/drm_thread_message_proxy.cc
+++ b/chromium/ui/ozone/platform/drm/gpu/drm_thread_message_proxy.cc
@@ -8,7 +8,7 @@
#include "base/threading/thread_task_runner_handle.h"
#include "ipc/ipc_message.h"
#include "ipc/ipc_sender.h"
-#include "ui/display/types/display_snapshot_mojo.h"
+#include "ui/display/types/display_snapshot.h"
#include "ui/ozone/common/gpu/ozone_gpu_messages.h"
#include "ui/ozone/platform/drm/common/drm_util.h"
#include "ui/ozone/platform/drm/gpu/drm_thread_proxy.h"
@@ -109,8 +109,9 @@ void DrmThreadMessageProxy::OnCursorMove(gfx::AcceleratedWidget widget,
void DrmThreadMessageProxy::OnCheckOverlayCapabilities(
gfx::AcceleratedWidget widget,
- const std::vector<OverlayCheck_Params>& overlays) {
+ const std::vector<OverlayCheck_Params>& param_overlays) {
DCHECK(drm_thread_->IsRunning());
+ auto overlays = CreateOverlaySurfaceCandidateListFrom(param_overlays);
auto callback =
base::BindOnce(&DrmThreadMessageProxy::OnCheckOverlayCapabilitiesCallback,
weak_ptr_factory_.GetWeakPtr());
@@ -191,9 +192,11 @@ void DrmThreadMessageProxy::OnAddGraphicsDevice(
const base::FilePath& path,
const base::FileDescriptor& fd) {
DCHECK(drm_thread_->IsRunning());
+ base::File file(fd.fd);
drm_thread_->task_runner()->PostTask(
- FROM_HERE, base::Bind(&DrmThread::AddGraphicsDevice,
- base::Unretained(drm_thread_), path, fd));
+ FROM_HERE,
+ base::Bind(&DrmThread::AddGraphicsDevice, base::Unretained(drm_thread_),
+ path, Passed(&file)));
}
void DrmThreadMessageProxy::OnRemoveGraphicsDevice(const base::FilePath& path) {
@@ -239,11 +242,13 @@ void DrmThreadMessageProxy::OnSetColorCorrection(
}
void DrmThreadMessageProxy::OnCheckOverlayCapabilitiesCallback(
- gfx::AcceleratedWidget widget,
- const std::vector<OverlayCheck_Params>& overlays,
- const std::vector<OverlayCheckReturn_Params>& returns) const {
- sender_->Send(
- new OzoneHostMsg_OverlayCapabilitiesReceived(widget, overlays, returns));
+ const gfx::AcceleratedWidget& widget,
+ const OverlaySurfaceCandidateList& candidates,
+ const OverlayStatusList& returns) const {
+ auto param_overlays = CreateParamsFromOverlaySurfaceCandidate(candidates);
+ auto param_returns = CreateParamsFromOverlayStatusList(returns);
+ sender_->Send(new OzoneHostMsg_OverlayCapabilitiesReceived(
+ widget, param_overlays, param_returns));
}
void DrmThreadMessageProxy::OnRefreshNativeDisplaysCallback(