Fix MouseCursor to MouseCursorShape conversion in ScreenCapturerWin.
BUG=crbug.com/322596 R=dcaiafa@chromium.org, wez@chromium.org Review URL: https://webrtc-codereview.appspot.com/4279005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5165 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
78b41a09bd
commit
e839da02c1
@ -337,10 +337,13 @@ void ScreenCapturerWin::CaptureCursor() {
|
||||
scoped_ptr<MouseCursorShape> cursor(new MouseCursorShape);
|
||||
cursor->hotspot = cursor_image->hotspot();
|
||||
cursor->size = cursor_image->image().size();
|
||||
cursor->data.assign(
|
||||
cursor_image->image().data(),
|
||||
cursor_image->image().data() +
|
||||
cursor_image->image().stride() * DesktopFrame::kBytesPerPixel);
|
||||
uint8_t* current_row = cursor_image->image().data();
|
||||
for (int y = 0; y < cursor_image->image().size().height(); ++y) {
|
||||
cursor->data.append(current_row,
|
||||
current_row + cursor_image->image().size().width() *
|
||||
DesktopFrame::kBytesPerPixel);
|
||||
current_row += cursor_image->image().stride();
|
||||
}
|
||||
|
||||
// Compare the current cursor with the last one we sent to the client. If
|
||||
// they're the same, then don't bother sending the cursor again.
|
||||
|
Loading…
Reference in New Issue
Block a user