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

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 master. Created 5 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 | « cc/test/fake_layer_tree_host_impl.h ('k') | cc/test/scheduler_test_common.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « cc/test/fake_layer_tree_host_impl.h ('k') | cc/test/scheduler_test_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698