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

Unified Diff: services/ui/public/cpp/window_compositor_frame_sink.cc

Issue 2527283003: cc: Introduce BeginFrame sequence numbers and acknowledgements.
Patch Set: Address Sami's comments, DisplayScheduler observes while BFSObservers exist. 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
Index: services/ui/public/cpp/window_compositor_frame_sink.cc
diff --git a/services/ui/public/cpp/window_compositor_frame_sink.cc b/services/ui/public/cpp/window_compositor_frame_sink.cc
index 2d893733bc679977bfcb12a1fc7e36f8cc5ca5be..4cb1017678f45469e8dbc2e0fc83c1c40e45f2d1 100644
--- a/services/ui/public/cpp/window_compositor_frame_sink.cc
+++ b/services/ui/public/cpp/window_compositor_frame_sink.cc
@@ -5,6 +5,7 @@
#include "services/ui/public/cpp/window_compositor_frame_sink.h"
#include "base/bind.h"
+#include "cc/output/begin_frame_args.h"
#include "cc/output/compositor_frame.h"
#include "cc/output/compositor_frame_sink_client.h"
#include "gpu/ipc/client/gpu_channel_host.h"
@@ -104,6 +105,12 @@ void WindowCompositorFrameSink::OnBeginFrame(
begin_frame_source_->OnBeginFrame(begin_frame_args);
}
+void WindowCompositorFrameSink::OnDidFinishFrame(const cc::BeginFrameAck& ack) {
+ // If there were updates, SubmitCompositorFrame serves as ack.
+ if (!ack.has_updates)
+ compositor_frame_sink_->BeginFrameDidNotDraw(ack);
+}
+
void WindowCompositorFrameSink::ReclaimResources(
const cc::ReturnedResourceArray& resources) {
DCHECK(thread_checker_);

Powered by Google App Engine
This is Rietveld 408576698