OLD | NEW |
| (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_FRAME_GENERATOR_UTIL_H_ | |
6 #define REMOTING_TEST_FRAME_GENERATOR_UTIL_H_ | |
7 | |
8 #include <memory> | |
9 | |
10 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" | |
11 | |
12 namespace webrtc { | |
13 class DesktopFrame; | |
14 } // namespace webrtc | |
15 | |
16 namespace remoting { | |
17 namespace test { | |
18 | |
19 // Loads test image from remoting/test/data. | |
20 std::unique_ptr<webrtc::DesktopFrame> LoadDesktopFrameFromPng(const char* name); | |
21 | |
22 // Draws rectangle filled with the given |color|. | |
23 void DrawRect(webrtc::DesktopFrame* frame, | |
24 webrtc::DesktopRect rect, | |
25 uint32_t color); | |
26 | |
27 // Draws barcode that encodes |value| on the |frame|. If |changed| is true then | |
28 // frame->updated_region() will be updated as well. | |
29 void DrawBarcode(int value, bool changed, webrtc::DesktopFrame* frame); | |
30 | |
31 // Reads barcode from the frame. | |
32 int ReadBarcode(const webrtc::DesktopFrame& frame); | |
33 | |
34 } // namespace test | |
35 } // namespace remoting | |
36 | |
37 #endif // REMOTING_TEST_FRAME_GENERATOR_UTIL_H_ | |
OLD | NEW |