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

Unified Diff: ui/aura/mus/window_compositor_frame_sink.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 | « ui/aura/mus/window_compositor_frame_sink.h ('k') | ui/compositor/test/in_process_context_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/mus/window_compositor_frame_sink.cc
diff --git a/ui/aura/mus/window_compositor_frame_sink.cc b/ui/aura/mus/window_compositor_frame_sink.cc
index 7d252b89d69e1edbe206a486c1f95342d9988f0a..60b19af9395e67b6a6711323cb3a296ec7e4e969 100644
--- a/ui/aura/mus/window_compositor_frame_sink.cc
+++ b/ui/aura/mus/window_compositor_frame_sink.cc
@@ -5,6 +5,7 @@
#include "ui/aura/mus/window_compositor_frame_sink.h"
#include "base/bind.h"
+#include "cc/output/begin_frame_args.h"
#include "cc/output/compositor_frame_sink_client.h"
#include "gpu/ipc/client/gpu_channel_host.h"
@@ -119,6 +120,12 @@ void WindowCompositorFrameSink::OnNeedsBeginFrames(bool needs_begin_frames) {
compositor_frame_sink_->SetNeedsBeginFrame(needs_begin_frames);
}
+void WindowCompositorFrameSink::OnDidFinishFrame(const cc::BeginFrameAck& ack) {
+ // If there was damage, SubmitCompositorFrame serves as ack.
+ if (!ack.has_damage)
+ compositor_frame_sink_->BeginFrameDidNotDraw(ack);
+}
+
WindowCompositorFrameSinkBinding::~WindowCompositorFrameSinkBinding() {}
WindowCompositorFrameSinkBinding::WindowCompositorFrameSinkBinding(
« no previous file with comments | « ui/aura/mus/window_compositor_frame_sink.h ('k') | ui/compositor/test/in_process_context_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698