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

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

Issue 1334483002: Force buffer re-allocation when the backing display changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months 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 | « no previous file | ui/ozone/platform/drm/gpu/drm_surface_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/gpu/drm_surface.cc
diff --git a/ui/ozone/platform/drm/gpu/drm_surface.cc b/ui/ozone/platform/drm/gpu/drm_surface.cc
index f3780ff1ffe3a35cca39e33f0004d6a11f04aae9..bb606d3786e977dbe5747e3c5453bd850b041974 100644
--- a/ui/ozone/platform/drm/gpu/drm_surface.cc
+++ b/ui/ozone/platform/drm/gpu/drm_surface.cc
@@ -99,9 +99,12 @@ void DrmSurface::SchedulePageFlip() {
// Update our front buffer pointer.
std::swap(front_buffer_, back_buffer_);
- pending_pageflip_ = window_->SchedulePageFlip(
- false /* is_sync */,
- base::Bind(&DrmSurface::OnPageFlip, weak_ptr_factory_.GetWeakPtr()));
+ pending_pageflip_ = true;
alexst (slow to review) 2015/09/08 21:12:53 Please make a quick note that this is a re-entranc
dnicoara 2015/09/09 14:09:52 Done.
+ if (!window_->SchedulePageFlip(false /* is_sync */,
+ base::Bind(&DrmSurface::OnPageFlip,
+ weak_ptr_factory_.GetWeakPtr()))) {
+ pending_pageflip_ = false;
+ }
}
void DrmSurface::OnPageFlip(gfx::SwapResult result) {
« no previous file with comments | « no previous file | ui/ozone/platform/drm/gpu/drm_surface_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698