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

Unified Diff: ui/aura/local/compositor_frame_sink_local.cc

Issue 2888043004: [cc] Add and plumb CFS::DidNotProduceFrame. (Closed)
Patch Set: address nits, rename to DidNotProduceFrame. Created 3 years, 7 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 | « ui/aura/local/compositor_frame_sink_local.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/local/compositor_frame_sink_local.cc
diff --git a/ui/aura/local/compositor_frame_sink_local.cc b/ui/aura/local/compositor_frame_sink_local.cc
index 9674689634bdc5893f9509c641c6c6ca7da79caa..2aa89b2de22c2af6649b1a7751fca1dfd658c5a7 100644
--- a/ui/aura/local/compositor_frame_sink_local.cc
+++ b/ui/aura/local/compositor_frame_sink_local.cc
@@ -61,6 +61,9 @@ void CompositorFrameSinkLocal::SubmitCompositorFrame(
cc::CompositorFrame frame) {
DCHECK(thread_checker_);
DCHECK(thread_checker_->CalledOnValidThread());
+ DCHECK(frame.metadata.begin_frame_ack.has_damage);
+ DCHECK_LE(cc::BeginFrameArgs::kStartingFrameNumber,
+ frame.metadata.begin_frame_ack.sequence_number);
cc::LocalSurfaceId old_local_surface_id = local_surface_id_;
if (!frame.render_pass_list.empty()) {
@@ -80,6 +83,15 @@ void CompositorFrameSinkLocal::SubmitCompositorFrame(
}
}
+void CompositorFrameSinkLocal::DidNotProduceFrame(
+ const cc::BeginFrameAck& ack) {
+ DCHECK(thread_checker_);
+ DCHECK(thread_checker_->CalledOnValidThread());
+ DCHECK(!ack.has_damage);
+ DCHECK_LE(cc::BeginFrameArgs::kStartingFrameNumber, ack.sequence_number);
+ support_->DidNotProduceFrame(ack);
+}
+
void CompositorFrameSinkLocal::DidReceiveCompositorFrameAck(
const cc::ReturnedResourceArray& resources) {
DCHECK(thread_checker_);
@@ -112,12 +124,4 @@ void CompositorFrameSinkLocal::OnNeedsBeginFrames(bool needs_begin_frames) {
support_->SetNeedsBeginFrame(needs_begin_frames);
}
-void CompositorFrameSinkLocal::OnDidFinishFrame(const cc::BeginFrameAck& ack) {
- DCHECK(thread_checker_);
- DCHECK(thread_checker_->CalledOnValidThread());
- // If there was damage, the submitted CompositorFrame includes the ack.
- if (!ack.has_damage)
- support_->BeginFrameDidNotSwap(ack);
-}
-
} // namespace aura
« no previous file with comments | « ui/aura/local/compositor_frame_sink_local.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698