#include "modules/desktop_capture/linux/x11/x_server_pixel_buffer.h"
#include <X11/Xutil.h>
#include <stdint.h>
#include <string.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include "modules/desktop_capture/desktop_frame.h"
#include "modules/desktop_capture/linux/x11/window_list_utils.h"
#include "modules/desktop_capture/linux/x11/x_error_trap.h"
#include "modules/desktop_capture/linux/x11/x_window_property.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
namespace webrtc {
namespace {
uint32_t MaskToShift(uint32_t mask) { … }
bool IsXImageRGBFormat(XImage* image) { … }
void FastBlit(XImage* x_image,
uint8_t* src_pos,
const DesktopRect& rect,
DesktopFrame* frame) { … }
void SlowBlit(XImage* x_image,
uint8_t* src_pos,
const DesktopRect& rect,
DesktopFrame* frame) { … }
}
XServerPixelBuffer::XServerPixelBuffer() { … }
XServerPixelBuffer::~XServerPixelBuffer() { … }
void XServerPixelBuffer::Release() { … }
void XServerPixelBuffer::ReleaseSharedMemorySegment() { … }
bool XServerPixelBuffer::Init(XAtomCache* cache, Window window) { … }
void XServerPixelBuffer::InitShm(const XWindowAttributes& attributes) { … }
bool XServerPixelBuffer::InitPixmaps(int depth) { … }
bool XServerPixelBuffer::IsWindowValid() const { … }
void XServerPixelBuffer::Synchronize() { … }
bool XServerPixelBuffer::CaptureRect(const DesktopRect& rect,
DesktopFrame* frame) { … }
}