Partially revert https://webrtc-review.googlesource.com/c/src/+/110461.
X11 returns the image data in a |long|, and CL [1] broke the captured on 32-bit builds. [1] - https://webrtc-review.googlesource.com/c/src/+/110461 Bug: chromium:954762 Change-Id: I2620e977ed0dd7ae355b9acd938cfcbeaaa9bfb3 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134541 Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Wez <wez@google.com> Reviewed-by: Sergey Ulanov <sergeyu@chromium.org> Cr-Commit-Position: refs/heads/master@{#27807}
This commit is contained in:
parent
44125faba5
commit
c1187ab34b
@ -206,11 +206,12 @@ void MouseCursorMonitorX11::CaptureCursor() {
|
||||
std::unique_ptr<DesktopFrame> image(
|
||||
new BasicDesktopFrame(DesktopSize(img->width, img->height)));
|
||||
|
||||
uint64_t* src = reinterpret_cast<uint64_t*>(img->pixels);
|
||||
// Xlib stores 32-bit data in longs, even if longs are 64-bits long.
|
||||
unsigned long* src = img->pixels;
|
||||
uint32_t* dst = reinterpret_cast<uint32_t*>(image->data());
|
||||
uint32_t* dst_end = dst + (img->width * img->height);
|
||||
while (dst < dst_end) {
|
||||
*dst++ = *src++;
|
||||
*dst++ = static_cast<uint32_t>(*src++);
|
||||
}
|
||||
|
||||
DesktopVector hotspot(std::min(img->width, img->xhot),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user