| Index: ui/ozone/platform/drm/gpu/hardware_display_controller.cc
|
| diff --git a/ui/ozone/platform/drm/gpu/hardware_display_controller.cc b/ui/ozone/platform/drm/gpu/hardware_display_controller.cc
|
| index 7b577900378e1ac475166ed24f48517355e58848..46218658981d6b3e597cb936460e8db47695530e 100644
|
| --- a/ui/ozone/platform/drm/gpu/hardware_display_controller.cc
|
| +++ b/ui/ozone/platform/drm/gpu/hardware_display_controller.cc
|
| @@ -77,42 +77,42 @@ void HardwareDisplayController::Disable() {
|
|
|
| void HardwareDisplayController::SchedulePageFlip(
|
| const OverlayPlaneList& plane_list,
|
| - const PageFlipCallback& callback) {
|
| - ActualSchedulePageFlip(plane_list, false /* test_only */, callback);
|
| + SwapCompletionOnceCallback callback) {
|
| + ActualSchedulePageFlip(plane_list, false /* test_only */,
|
| + std::move(callback));
|
| }
|
|
|
| bool HardwareDisplayController::TestPageFlip(
|
| const OverlayPlaneList& plane_list) {
|
| return ActualSchedulePageFlip(plane_list, true /* test_only */,
|
| - base::Bind(&EmptyFlipCallback));
|
| + base::BindOnce(&EmptyFlipCallback));
|
| }
|
|
|
| bool HardwareDisplayController::ActualSchedulePageFlip(
|
| const OverlayPlaneList& plane_list,
|
| bool test_only,
|
| - const PageFlipCallback& callback) {
|
| + SwapCompletionOnceCallback callback) {
|
| TRACE_EVENT0("drm", "HDC::SchedulePageFlip");
|
|
|
| DCHECK(!is_disabled_);
|
|
|
| // Ignore requests with no planes to schedule.
|
| if (plane_list.empty()) {
|
| - callback.Run(gfx::SwapResult::SWAP_ACK);
|
| + std::move(callback).Run(gfx::SwapResult::SWAP_ACK);
|
| return true;
|
| }
|
|
|
| - scoped_refptr<PageFlipRequest> page_flip_request =
|
| - new PageFlipRequest(crtc_controllers_.size(), callback);
|
| -
|
| OverlayPlaneList pending_planes = plane_list;
|
| std::sort(pending_planes.begin(), pending_planes.end(),
|
| [](const OverlayPlane& l, const OverlayPlane& r) {
|
| return l.z_order < r.z_order;
|
| });
|
| if (pending_planes.front().z_order != 0) {
|
| - callback.Run(gfx::SwapResult::SWAP_FAILED);
|
| + std::move(callback).Run(gfx::SwapResult::SWAP_FAILED);
|
| return false;
|
| }
|
| + scoped_refptr<PageFlipRequest> page_flip_request =
|
| + new PageFlipRequest(crtc_controllers_.size(), std::move(callback));
|
|
|
| for (const auto& planes : owned_hardware_planes_)
|
| planes.first->plane_manager()->BeginFrame(planes.second.get());
|
|
|