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

Unified Diff: components/exo/surface.cc

Issue 2527283003: cc: Introduce BeginFrame sequence numbers and acknowledgements.
Patch Set: Address Brian's comments. Created 4 years 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 | « cc/trees/single_thread_proxy.cc ('k') | content/browser/android/synchronous_compositor_browser_filter.h » ('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 8c5ed61a34fbf8d36487c17dee035e2b90c4db1a..d002d84bb00459e84257eded2e5461d47015a21b 100644
--- a/components/exo/surface.cc
+++ b/components/exo/surface.cc
@@ -454,6 +454,12 @@ void Surface::Commit() {
CheckIfSurfaceHierarchyNeedsCommitToNewSurfaces();
CommitSurfaceHierarchy();
}
+
+ cc::BeginFrameAck ack(last_begin_frame_args_.source_id,
+ last_begin_frame_args_.sequence_number,
+ last_begin_frame_args_.sequence_number, 0, true);
+ if (begin_frame_source_)
+ begin_frame_source_->DidFinishFrame(this, ack);
}
void Surface::CommitSurfaceHierarchy() {
@@ -647,11 +653,11 @@ void Surface::OnWindowRemovingFromRootWindow(aura::Window* window,
}
void Surface::OnBeginFrame(const cc::BeginFrameArgs& args) {
+ last_begin_frame_args_ = args;
while (!active_frame_callbacks_.empty()) {
active_frame_callbacks_.front().Run(args.frame_time);
active_frame_callbacks_.pop_front();
}
- last_begin_frame_args_ = args;
}
const cc::BeginFrameArgs& Surface::LastUsedBeginFrameArgs() const {
« no previous file with comments | « cc/trees/single_thread_proxy.cc ('k') | content/browser/android/synchronous_compositor_browser_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698