mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-07 19:34:56 +00:00
fb_drv: fix clipping
Use the clipped coordinates for calculating the buffer addresses, too. Fixes #1227.
This commit is contained in:
parent
a189135940
commit
5abca43688
@ -111,8 +111,8 @@ namespace Framebuffer {
|
||||
if (!bypp) return;
|
||||
|
||||
/* copy pixels from back buffer to physical frame buffer */
|
||||
char *src = (char *)_bb_addr + bypp*(_scr_width*y + x),
|
||||
*dst = (char *)_fb_addr + bypp*(_scr_width*y + x);
|
||||
char *src = (char *)_bb_addr + bypp*(_scr_width*y1 + x1),
|
||||
*dst = (char *)_fb_addr + bypp*(_scr_width*y1 + x1);
|
||||
|
||||
blit(src, bypp*_scr_width, dst, bypp*_scr_width,
|
||||
bypp*(x2 - x1 + 1), y2 - y1 + 1);
|
||||
|
@ -57,8 +57,8 @@ class Framebuffer::Session_component :
|
||||
int bypp = _mode.bytes_per_pixel();
|
||||
|
||||
/* copy pixels from back buffer to physical frame buffer */
|
||||
char *src = (char *)_bb_addr + bypp*(_mode.width()*y + x),
|
||||
*dst = (char *)_fb_addr + bypp*(_mode.width()*y + x);
|
||||
char *src = (char *)_bb_addr + bypp*(_mode.width()*y1 + x1),
|
||||
*dst = (char *)_fb_addr + bypp*(_mode.width()*y1 + x1);
|
||||
|
||||
blit(src, bypp*_mode.width(), dst, bypp*_mode.width(),
|
||||
bypp*(x2 - x1 + 1), y2 - y1 + 1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user