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

Unified Diff: remoting/test/cyclic_frame_generator.cc

Issue 2431513003: Revert of 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
« no previous file with comments | « remoting/test/cyclic_frame_generator.h ('k') | remoting/test/frame_generator_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/test/cyclic_frame_generator.cc
diff --git a/remoting/test/cyclic_frame_generator.cc b/remoting/test/cyclic_frame_generator.cc
index ef59810efc3f36ae947fa653cf5c37b76190e611..11c8bc57a2d8eb4d46983cb8c261a4d026713968 100644
--- a/remoting/test/cyclic_frame_generator.cc
+++ b/remoting/test/cyclic_frame_generator.cc
@@ -48,7 +48,6 @@
std::unique_ptr<webrtc::DesktopFrame> CyclicFrameGenerator::GenerateFrame(
webrtc::SharedMemoryFactory* shared_memory_factory) {
base::TimeTicks now = clock_->NowTicks();
-
int frame_id = (now - started_time_) / cursor_blink_period_;
int reference_frame =
((now - started_time_) / frame_cycle_period_) % reference_frames_.size();
@@ -81,15 +80,20 @@
last_frame_type_ = ChangeType::NO_CHANGES;
}
+ if (draw_barcode_)
+ DrawBarcode(frame_id, frame_id != last_frame_id_, frame.get());
+
last_reference_frame_ = reference_frame;
last_cursor_state_ = cursor_state;
+ last_frame_id_ = frame_id;
return frame;
}
CyclicFrameGenerator::ChangeInfoList CyclicFrameGenerator::GetChangeList(
- base::TimeTicks timestamp) {
- int frame_id = (timestamp - started_time_) / cursor_blink_period_;
+ webrtc::DesktopFrame* frame) {
+ CHECK(draw_barcode_);
+ int frame_id = ReadBarcode(*frame);
CHECK_GE(frame_id, last_identifier_frame_);
ChangeInfoList result;
@@ -106,10 +110,5 @@
return result;
}
-protocol::InputEventTimestamps CyclicFrameGenerator::TakeLastEventTimestamps() {
- base::TimeTicks now = clock_->NowTicks();
- return protocol::InputEventTimestamps{now, now};
-}
-
} // namespace test
} // namespace remoting
« no previous file with comments | « remoting/test/cyclic_frame_generator.h ('k') | remoting/test/frame_generator_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698