diff options
Diffstat (limited to 'ui/ozone/platform/drm/gpu/drm_window.cc')
-rw-r--r-- | ui/ozone/platform/drm/gpu/drm_window.cc | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/ui/ozone/platform/drm/gpu/drm_window.cc b/ui/ozone/platform/drm/gpu/drm_window.cc index 7517f09..ec6a0ea 100644 --- a/ui/ozone/platform/drm/gpu/drm_window.cc +++ b/ui/ozone/platform/drm/gpu/drm_window.cc @@ -51,7 +51,8 @@ DrmWindow::DrmWindow(gfx::AcceleratedWidget widget, controller_(NULL), cursor_frontbuffer_(0), cursor_frame_(0), - cursor_frame_delay_ms_(0) { + cursor_frame_delay_ms_(0), + last_swap_sync_(false) { } DrmWindow::~DrmWindow() { @@ -116,6 +117,28 @@ void DrmWindow::MoveCursor(const gfx::Point& location) { controller_->MoveCursor(location); } +void DrmWindow::QueueOverlayPlane(const OverlayPlane& plane) { + pending_planes_.push_back(plane); +} + +bool DrmWindow::SchedulePageFlip(bool is_sync, const base::Closure& 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, + callback); + } + + callback.Run(); + return true; +} + +const OverlayPlane* DrmWindow::GetLastModesetBuffer() { + return OverlayPlane::GetPrimaryPlane(last_submitted_planes_); +} + void DrmWindow::ResetCursor(bool bitmap_only) { if (!controller_) return; |