#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "remoting/base/util.h"
#include <math.h>
#include <string.h>
#include "base/i18n/time_formatting.h"
#include "base/logging.h"
#include "base/time/time.h"
#include "remoting/base/cpu_utils.h"
#include "third_party/libyuv/include/libyuv/convert.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_region.h"
namespace remoting {
constexpr int kBytesPerPixelRGB32 = …;
static int CalculateRGBOffset(int x, int y, int stride) { … }
std::string GetTimestampString() { … }
int RoundToTwosMultiple(int x) { … }
webrtc::DesktopRect AlignRect(const webrtc::DesktopRect& rect) { … }
webrtc::DesktopRect GetRowAlignedRect(const webrtc::DesktopRect rect,
int max_right) { … }
void CopyRGB32Rect(const uint8_t* source_buffer,
int source_stride,
const webrtc::DesktopRect& source_buffer_rect,
uint8_t* dest_buffer,
int dest_stride,
const webrtc::DesktopRect& dest_buffer_rect,
const webrtc::DesktopRect& dest_rect) { … }
std::string ReplaceLfByCrLf(const std::string& in) { … }
std::string ReplaceCrLfByLf(const std::string& in) { … }
bool DoesRectContain(const webrtc::DesktopRect& a,
const webrtc::DesktopRect& b) { … }
}