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_ |