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

Unified Diff: remoting/test/frame_generator_util.h

Issue 2182833002: Add scroll perf test for protocol in chromoting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gyp Created 4 years, 5 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.cc ('k') | remoting/test/frame_generator_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/test/frame_generator_util.h
diff --git a/remoting/test/frame_generator_util.h b/remoting/test/frame_generator_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..e0f7c53422520e8d72c427e1652c32209701829c
--- /dev/null
+++ b/remoting/test/frame_generator_util.h
@@ -0,0 +1,37 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef REMOTING_TEST_FRAME_GENERATOR_UTIL_H_
+#define REMOTING_TEST_FRAME_GENERATOR_UTIL_H_
+
+#include <memory>
+
+#include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
+
+namespace webrtc {
+class DesktopFrame;
+} // namespace webrtc
+
+namespace remoting {
+namespace test {
+
+// Loads test image from remoting/test/data.
+std::unique_ptr<webrtc::DesktopFrame> LoadDesktopFrameFromPng(const char* name);
+
+// Draws rectangle filled with the given |color|.
+void DrawRect(webrtc::DesktopFrame* frame,
+ webrtc::DesktopRect rect,
+ uint32_t color);
+
+// Draws barcode that encodes |value| on the |frame|. If |changed| is true then
+// frame->updated_region() will be updated as well.
+void DrawBarcode(int value, bool changed, webrtc::DesktopFrame* frame);
+
+// Reads barcode from the frame.
+int ReadBarcode(const webrtc::DesktopFrame& frame);
+
+} // namespace test
+} // namespace remoting
+
+#endif // REMOTING_TEST_FRAME_GENERATOR_UTIL_H_
« no previous file with comments | « remoting/test/cyclic_frame_generator.cc ('k') | remoting/test/frame_generator_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698