Index: components/exo/surface.cc |
diff --git a/components/exo/surface.cc b/components/exo/surface.cc |
index 57a45f616823460b66219c4fb8775de0936aef05..86706c330a36f473e84f8ccbd0fa01dcc5f4dc91 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. |