uterm: video: fix blit() and fill() height adjustments

Whoops, we missed the last line for all blit()/fill() operations. Fix the
decrement to correctly count as many lines as given.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2012-07-31 13:35:18 +02:00
parent 7c075e3891
commit 6ab01cbf6b
2 changed files with 4 additions and 4 deletions

View File

@ -404,7 +404,7 @@ static int display_blit(struct uterm_display *disp,
dst = &dst[y * rb->stride + x * 4];
src = buf->data;
while (--height) {
while (height--) {
memcpy(dst, src, 4 * width);
dst += rb->stride;
src += buf->stride;
@ -446,7 +446,7 @@ static int display_fill(struct uterm_display *disp,
dst = rb->map;
dst = &dst[y * rb->stride + x * 4];
while (--height) {
while (height--) {
for (i = 0; i < width; ++i) {
((uint32_t*)dst)[i] = ((r & 0xff) << 16) |
((g & 0xff) << 8) |

View File

@ -371,7 +371,7 @@ static int display_blit(struct uterm_display *disp,
dst = &dst[y * disp->fbdev.stride + x * disp->fbdev.bpp];
src = buf->data;
while (--height) {
while (height--) {
memcpy(dst, src, 4 * width);
dst += disp->fbdev.stride;
src += buf->stride;
@ -410,7 +410,7 @@ static int display_fill(struct uterm_display *disp,
dst = &disp->fbdev.map[disp->fbdev.yres * disp->fbdev.stride];
dst = &dst[y * disp->fbdev.stride + x * disp->fbdev.bpp];
while (--height) {
while (height--) {
for (i = 0; i < width; ++i) {
((uint32_t*)dst)[i] = ((r & 0xff) << 16) |
((g & 0xff) << 8) |