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

Side by Side Diff: remoting/test/scroll_frame_generator.h

Issue 2190473002: Revert of Add scroll perf test for protocol in chromoting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « remoting/test/protocol_perftest.cc ('k') | remoting/test/scroll_frame_generator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef REMOTING_TEST_SCROLL_FRAME_GENERATOR_H_
6 #define REMOTING_TEST_SCROLL_FRAME_GENERATOR_H_
7
8 #include <memory>
9 #include <unordered_map>
10
11 #include "base/memory/ref_counted.h"
12 #include "base/time/time.h"
13 #include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h"
14
15 namespace remoting {
16 namespace test {
17
18 class ScrollFrameGenerator
19 : public base::RefCountedThreadSafe<ScrollFrameGenerator> {
20 public:
21 ScrollFrameGenerator();
22
23 std::unique_ptr<webrtc::DesktopFrame> GenerateFrame(
24 webrtc::SharedMemoryFactory* shared_memory_factory);
25
26 base::TimeDelta GetFrameLatency(const webrtc::DesktopFrame& frame);
27
28 private:
29 ~ScrollFrameGenerator();
30 friend class base::RefCountedThreadSafe<ScrollFrameGenerator>;
31
32 std::unique_ptr<webrtc::DesktopFrame> base_frame_;
33 base::TimeTicks start_time_;
34
35 std::unordered_map<int, base::TimeTicks> frame_timestamp_;
36
37 // Id of the last frame encoded on the barcode.
38 int last_frame_id_ = -1;
39
40 DISALLOW_COPY_AND_ASSIGN(ScrollFrameGenerator);
41 };
42
43 } // namespace test
44 } // namespace remoting
45
46 #endif // REMOTING_TEST_SCROLL_FRAME_GENERATOR_H_
OLDNEW
« no previous file with comments | « remoting/test/protocol_perftest.cc ('k') | remoting/test/scroll_frame_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698