Index: components/exo/surface.cc |
diff --git a/components/exo/surface.cc b/components/exo/surface.cc |
index 57a45f616823460b66219c4fb8775de0936aef05..ab863b1e3efeea31058fe2b7c7ea0d0d05cb1317 100644 |
--- a/components/exo/surface.cc |
+++ b/components/exo/surface.cc |
@@ -464,6 +464,13 @@ void Surface::CommitSurfaceHierarchy() { |
local_surface_id_ = id_allocator_.GenerateId(); |
} |
+ // Move pending frame callbacks to the end of frame_callbacks_. |
+ frame_callbacks_.splice(frame_callbacks_.end(), pending_frame_callbacks_); |
+ |
+ // Move pending presentation callbacks to the end of presentation_callbacks_. |
+ presentation_callbacks_.splice(presentation_callbacks_.end(), |
+ pending_presentation_callbacks_); |
+ |
UpdateSurface(false); |
if (old_local_surface_id != local_surface_id_) { |
@@ -492,13 +499,6 @@ void Surface::CommitSurfaceHierarchy() { |
compositor_frame_sink_holder_->HasReleaseCallbackForResource( |
current_resource_.id)); |
- // Move pending frame callbacks to the end of frame_callbacks_. |
- frame_callbacks_.splice(frame_callbacks_.end(), pending_frame_callbacks_); |
- |
- // Move pending presentation callbacks to the end of presentation_callbacks_. |
- presentation_callbacks_.splice(presentation_callbacks_.end(), |
- pending_presentation_callbacks_); |
- |
// Synchronize window hierarchy. This will position and update the stacking |
// order of all sub-surfaces after committing all pending state of sub-surface |
// descendants. |
@@ -605,7 +605,7 @@ std::unique_ptr<base::trace_event::TracedValue> Surface::AsTracedValue() const { |
return value; |
} |
-void Surface::WillDraw() { |
+void Surface::DidReceiveCompositorFrameAck() { |
active_frame_callbacks_.splice(active_frame_callbacks_.end(), |
frame_callbacks_); |
swapping_presentation_callbacks_.splice( |