When I added commit
c12164c1622a2209fe07555e682cc479c6854e7e
to copy an entire row at a time to the framebuffer, I miscalculated the
offset to copy from/to. Their may be uninitialized data at the
beginning and end of the temporary row buffer, if only part of the row
is getting copied. We need to make sure we jump passed that junk in
memory and copy just the part that got filled in.
&device_pixel_value, buffer->bytes_per_pixel);
}
- offset = row * buffer->row_stride * buffer->bytes_per_pixel;
- memcpy (buffer->map_address + offset, row_buffer,
+ offset = row * buffer->row_stride * buffer->bytes_per_pixel + x * buffer->bytes_per_pixel;
+ memcpy (buffer->map_address + offset, row_buffer + x * buffer->bytes_per_pixel,
width * buffer->bytes_per_pixel);
}
free (row_buffer);