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

Unified Diff: remoting/test/scroll_frame_generator.cc

Issue 2420183002: Don't use barcodes in ProtocolPerfTests (Closed)
Patch Set: . Created 4 years, 2 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: remoting/test/scroll_frame_generator.cc
diff --git a/remoting/test/scroll_frame_generator.cc b/remoting/test/scroll_frame_generator.cc
index 1a6a1ec0b6834d89306d5a3dffc81980f8141410..e789837994b77f69165e9c64b001f8ff1ec382d3 100644
--- a/remoting/test/scroll_frame_generator.cc
+++ b/remoting/test/scroll_frame_generator.cc
@@ -41,19 +41,13 @@ std::unique_ptr<webrtc::DesktopFrame> ScrollFrameGenerator::GenerateFrame(
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;
}
-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];
+protocol::InputEventTimestamps ScrollFrameGenerator::TakeLastEventTimestamps() {
+ base::TimeTicks now = base::TimeTicks::Now();
+ return protocol::InputEventTimestamps{.client_timestamp = now,
+ .host_timestamp = now};
}
} // namespace test
« remoting/test/protocol_perftest.cc ('K') | « remoting/test/scroll_frame_generator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698