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

Unified Diff: components/exo/surface.cc

Issue 2786643002: [exo]CompositorFrameSinkHolder calls WillDraw in DidReceiveCompositorFrameAck (Closed)
Patch Set: Address A Comment Created 3 years, 8 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 | « components/exo/surface.h ('k') | components/exo/surface_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « components/exo/surface.h ('k') | components/exo/surface_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698