| Index: remoting/test/scroll_frame_generator.cc
|
| diff --git a/remoting/test/scroll_frame_generator.cc b/remoting/test/scroll_frame_generator.cc
|
| index 01e0af239da995088c13a81b431462598aaa8c7d..1a6a1ec0b6834d89306d5a3dffc81980f8141410 100644
|
| --- a/remoting/test/scroll_frame_generator.cc
|
| +++ b/remoting/test/scroll_frame_generator.cc
|
| @@ -41,12 +41,19 @@
|
| result->mutable_updated_region()->SetRect(
|
| webrtc::DesktopRect::MakeSize(result->size()));
|
|
|
| + ++last_frame_id_;
|
| + frame_timestamp_[last_frame_id_] = now;
|
| + DrawBarcode(last_frame_id_, true, result.get());
|
| +
|
| return result;
|
| }
|
|
|
| -protocol::InputEventTimestamps ScrollFrameGenerator::TakeLastEventTimestamps() {
|
| - base::TimeTicks now = base::TimeTicks::Now();
|
| - return protocol::InputEventTimestamps{now, now};
|
| +base::TimeDelta ScrollFrameGenerator::GetFrameLatency(
|
| + const webrtc::DesktopFrame& frame) {
|
| + int frame_id = ReadBarcode(frame);
|
| + if (!frame_timestamp_.count(frame_id))
|
| + LOG(FATAL) << "Unknown frame_id.";
|
| + return base::TimeTicks::Now() - frame_timestamp_[frame_id];
|
| }
|
|
|
| } // namespace test
|
|
|