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

Unified Diff: cc/test/fake_layer_tree_host_impl.cc

Issue 787763006: cc: Adding BeginFrameTracker object and removing Now() from LTHI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase onto dependent patches. Created 5 years, 8 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
Index: cc/test/fake_layer_tree_host_impl.cc
diff --git a/cc/test/fake_layer_tree_host_impl.cc b/cc/test/fake_layer_tree_host_impl.cc
index d026120ab18c2afe658b2a9de77e94c51a219b3d..81216a0aa043c0373c79cce557fd6d2e1ae98cc7 100644
--- a/cc/test/fake_layer_tree_host_impl.cc
+++ b/cc/test/fake_layer_tree_host_impl.cc
@@ -61,14 +61,15 @@ void FakeLayerTreeHostImpl::CreatePendingTree() {
}
BeginFrameArgs FakeLayerTreeHostImpl::CurrentBeginFrameArgs() const {
- if (!current_begin_frame_args_.IsValid())
- return LayerTreeHostImpl::CurrentBeginFrameArgs();
- return current_begin_frame_args_;
+ return current_begin_frame_tracker_.DangerousMethodCurrentOrLast();
}
void FakeLayerTreeHostImpl::SetCurrentBeginFrameArgs(
const BeginFrameArgs& args) {
- current_begin_frame_args_ = args;
+ if (!current_begin_frame_tracker_.DangerousMethodHasFinished()) {
+ current_begin_frame_tracker_.Finish();
+ }
+ current_begin_frame_tracker_.Start(args);
}
int FakeLayerTreeHostImpl::RecursiveUpdateNumChildren(LayerImpl* layer) {

Powered by Google App Engine
This is Rietveld 408576698