Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Unified Diff: ui/ozone/platform/drm/gpu/crtc_controller.cc

Issue 1418503012: [Ozone-DRM] Remove bool return value for SchedulePageFlip call (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased & updated Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/platform/drm/gpu/crtc_controller.h ('k') | ui/ozone/platform/drm/gpu/drm_window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/gpu/crtc_controller.cc
diff --git a/ui/ozone/platform/drm/gpu/crtc_controller.cc b/ui/ozone/platform/drm/gpu/crtc_controller.cc
index 1b92b0e19d1edc05167af235035223ac55521140..46efd4609b8cd194dbda90e75f1aaa0478ae4013 100644
--- a/ui/ozone/platform/drm/gpu/crtc_controller.cc
+++ b/ui/ozone/platform/drm/gpu/crtc_controller.cc
@@ -33,7 +33,7 @@ CrtcController::~CrtcController() {
SetCursor(nullptr);
drm_->DisableCrtc(crtc_);
if (page_flip_request_)
- SignalPageFlipRequest();
+ SignalPageFlipRequest(gfx::SwapResult::SWAP_ACK);
}
}
@@ -119,11 +119,6 @@ std::vector<uint32_t> CrtcController::GetCompatibleHardwarePlaneIds(
return drm_->plane_manager()->GetCompatibleHardwarePlaneIds(plane, crtc_);
}
-void CrtcController::PageFlipFailed() {
- pending_planes_.clear();
- SignalPageFlipRequest();
-}
-
void CrtcController::OnPageFlipEvent(unsigned int frame,
unsigned int seconds,
unsigned int useconds) {
@@ -131,10 +126,7 @@ void CrtcController::OnPageFlipEvent(unsigned int frame,
static_cast<uint64_t>(seconds) * base::Time::kMicrosecondsPerSecond +
useconds;
- current_planes_.clear();
- current_planes_.swap(pending_planes_);
-
- SignalPageFlipRequest();
+ SignalPageFlipRequest(gfx::SwapResult::SWAP_ACK);
}
bool CrtcController::SetCursor(const scoped_refptr<ScanoutBuffer>& buffer) {
@@ -168,10 +160,15 @@ bool CrtcController::ResetCursor() {
return status;
}
-void CrtcController::SignalPageFlipRequest() {
+void CrtcController::SignalPageFlipRequest(gfx::SwapResult result) {
+ if (result == gfx::SwapResult::SWAP_ACK)
+ current_planes_.swap(pending_planes_);
+
+ pending_planes_.clear();
+
scoped_refptr<PageFlipRequest> request;
request.swap(page_flip_request_);
- request->Signal(gfx::SwapResult::SWAP_ACK);
+ request->Signal(result);
}
} // namespace ui
« no previous file with comments | « ui/ozone/platform/drm/gpu/crtc_controller.h ('k') | ui/ozone/platform/drm/gpu/drm_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698