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

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

Issue 1370233003: Disable region copy on ARM since it isn't supported (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2454
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
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 f55c925d34780cdcbe077a85fb28aa296c4d1a9a..dc9fbf53a8c124cc450ddfaba267c17ae4206ef3 100644
--- a/ui/ozone/platform/drm/gpu/drm_surface.cc
+++ b/ui/ozone/platform/drm/gpu/drm_surface.cc
@@ -99,9 +99,14 @@ 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()));
+ // First set the pending flag otherwise there could be a re-entrancy issue if
+ // the callback is executed synchronously.
+ pending_pageflip_ = true;
+ if (!window_->SchedulePageFlip(false /* is_sync */,
+ base::Bind(&DrmSurface::OnPageFlip,
+ weak_ptr_factory_.GetWeakPtr()))) {
+ pending_pageflip_ = false;
+ }
}
void DrmSurface::OnPageFlip(gfx::SwapResult result) {

Powered by Google App Engine
This is Rietveld 408576698