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:
sergeyu@chromium.org 2013-11-22 20:39:16 +00:00
parent 78b41a09bd
commit e839da02c1

View File

@ -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.