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

Unified Diff: cc/test/fake_external_begin_frame_source.cc

Issue 2632563003: [cc] Calculate the correct latest_confirmed_sequence_number in cc::Scheduler. (Closed)
Patch Set: add todo for impl-side invalidations. Created 3 years, 10 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_external_begin_frame_source.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_external_begin_frame_source.cc
diff --git a/cc/test/fake_external_begin_frame_source.cc b/cc/test/fake_external_begin_frame_source.cc
index 916d01bde471578d0750cce31dba6eb89399e236..202b3cfce9179d03e18d068b7a2657d113f79a13 100644
--- a/cc/test/fake_external_begin_frame_source.cc
+++ b/cc/test/fake_external_begin_frame_source.cc
@@ -66,16 +66,32 @@ void FakeExternalBeginFrameSource::RemoveObserver(BeginFrameObserver* obs) {
client_->OnRemoveObserver(obs);
}
+void FakeExternalBeginFrameSource::DidFinishFrame(BeginFrameObserver* obs,
+ const BeginFrameAck& ack) {
+ last_acks_[obs] = ack;
+}
+
bool FakeExternalBeginFrameSource::IsThrottled() const {
return true;
}
+BeginFrameArgs FakeExternalBeginFrameSource::CreateBeginFrameArgs(
+ BeginFrameArgs::CreationLocation location,
+ base::SimpleTestTickClock* now_src) {
+ return CreateBeginFrameArgsForTesting(location, source_id(),
+ next_begin_frame_number_++, now_src);
+}
+
+BeginFrameArgs FakeExternalBeginFrameSource::CreateBeginFrameArgs(
+ BeginFrameArgs::CreationLocation location) {
+ return CreateBeginFrameArgsForTesting(location, source_id(),
+ next_begin_frame_number_++);
+}
+
void FakeExternalBeginFrameSource::TestOnBeginFrame(
const BeginFrameArgs& args) {
DCHECK(CalledOnValidThread());
current_args_ = args;
- current_args_.source_id = source_id();
- current_args_.sequence_number = next_begin_frame_number_++;
std::set<BeginFrameObserver*> observers(observers_);
for (auto* obs : observers)
obs->OnBeginFrame(current_args_);
@@ -88,10 +104,9 @@ void FakeExternalBeginFrameSource::PostTestOnBeginFrame() {
base::Bind(&FakeExternalBeginFrameSource::TestOnBeginFrame,
weak_ptr_factory_.GetWeakPtr()));
base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
- FROM_HERE, base::Bind(begin_frame_task_.callback(),
- CreateBeginFrameArgsForTesting(
- BEGINFRAME_FROM_HERE, source_id(),
- next_begin_frame_number_)),
+ FROM_HERE,
+ base::Bind(begin_frame_task_.callback(),
+ CreateBeginFrameArgs(BEGINFRAME_FROM_HERE)),
base::TimeDelta::FromMilliseconds(milliseconds_per_frame_));
next_begin_frame_number_++;
}
« no previous file with comments | « cc/test/fake_external_begin_frame_source.h ('k') | cc/test/scheduler_test_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698