| Index: ui/ozone/platform/drm/gpu/drm_window.cc
|
| diff --git a/ui/ozone/platform/drm/gpu/drm_window.cc b/ui/ozone/platform/drm/gpu/drm_window.cc
|
| index ebf937dbfdebdafdfe4b9ab5c2b243b1828430c2..9137fc8f1c971c5b06262d7b2a7322fa8771c731 100644
|
| --- a/ui/ozone/platform/drm/gpu/drm_window.cc
|
| +++ b/ui/ozone/platform/drm/gpu/drm_window.cc
|
| @@ -78,6 +78,10 @@ HardwareDisplayController* DrmWindow::GetController() {
|
| return controller_;
|
| }
|
|
|
| +scoped_refptr<DrmDevice> DrmWindow::GetAllocationDrmDevice() const {
|
| + return device_manager_->GetDrmDevice(widget_);
|
| +}
|
| +
|
| void DrmWindow::OnBoundsChanged(const gfx::Rect& bounds) {
|
| TRACE_EVENT2("drm", "DrmWindow::OnBoundsChanged", "widget", widget_, "bounds",
|
| bounds.ToString());
|
| @@ -125,19 +129,18 @@ void DrmWindow::QueueOverlayPlane(const OverlayPlane& plane) {
|
| pending_planes_.push_back(plane);
|
| }
|
|
|
| -bool DrmWindow::SchedulePageFlip(bool is_sync,
|
| +void DrmWindow::SchedulePageFlip(bool is_sync,
|
| const SwapCompletionCallback& callback) {
|
| last_submitted_planes_.clear();
|
| last_submitted_planes_.swap(pending_planes_);
|
| last_swap_sync_ = is_sync;
|
|
|
| if (controller_) {
|
| - return controller_->SchedulePageFlip(last_submitted_planes_, is_sync, false,
|
| - callback);
|
| + controller_->SchedulePageFlip(last_submitted_planes_, is_sync, false,
|
| + callback);
|
| + } else {
|
| + callback.Run(gfx::SwapResult::SWAP_ACK);
|
| }
|
| -
|
| - callback.Run(gfx::SwapResult::SWAP_ACK);
|
| - return true;
|
| }
|
|
|
| bool DrmWindow::TestPageFlip(const std::vector<OverlayCheck_Params>& overlays,
|
| @@ -194,6 +197,17 @@ void DrmWindow::GetVSyncParameters(
|
| callback.Run(timebase, interval);
|
| }
|
|
|
| +bool DrmWindow::IsDisplayedOnUniversalDisplayLinkDevice() const {
|
| + if (!controller_)
|
| + return false;
|
| +
|
| + scoped_refptr<DrmDevice> primary =
|
| + device_manager_->GetDrmDevice(gfx::kNullAcceleratedWidget);
|
| + DCHECK(primary);
|
| +
|
| + return primary != controller_->GetAllocationDrmDevice();
|
| +}
|
| +
|
| void DrmWindow::ResetCursor(bool bitmap_only) {
|
| if (!controller_)
|
| return;
|
|
|