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

Unified Diff: cc/trees/layer_tree_host_impl.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/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index e27073c6351fc2341e27cb411ae7621e9c8730d3..d1ca08e899b117b76614c4e00bb04b46aaadab7e 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -48,6 +48,7 @@
#include "cc/layers/scrollbar_layer_impl_base.h"
#include "cc/layers/surface_layer_impl.h"
#include "cc/layers/viewport.h"
+#include "cc/output/begin_frame_args.h"
#include "cc/output/compositor_frame.h"
#include "cc/output/compositor_frame_metadata.h"
#include "cc/output/compositor_frame_sink.h"
@@ -179,7 +180,10 @@ DEFINE_SCOPED_UMA_HISTOGRAM_TIMER(PendingTreeDurationHistogramTimer,
LayerTreeHostImpl::FrameData::FrameData()
: render_surface_layer_list(nullptr),
has_no_damage(false),
- may_contain_video(false) {}
+ may_contain_video(false),
+ begin_frame_source_id(0),
+ begin_frame_number(BeginFrameArgs::kInvalidFrameNumber),
+ latest_confirmed_frame(BeginFrameArgs::kInvalidFrameNumber) {}
LayerTreeHostImpl::FrameData::~FrameData() {}
@@ -1658,6 +1662,10 @@ bool LayerTreeHostImpl::DrawLayers(FrameData* frame) {
}
}
+ DCHECK_LT(BeginFrameArgs::kInvalidFrameNumber, frame->begin_frame_number);
+ metadata.begin_frame_source_id = frame->begin_frame_source_id;
+ metadata.begin_frame_number = frame->begin_frame_number;
+ metadata.latest_confirmed_frame = frame->latest_confirmed_frame;
CompositorFrame compositor_frame;
compositor_frame.metadata = std::move(metadata);
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698