uterm: video: add display_fill/blit helpers

Instead of requiring to create uterm-screens, it is now possible to blit
and fill displays directly similar to fake-blends.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2012-10-13 16:48:09 +02:00
parent 8cc97f6913
commit 6636bc6ca3
2 changed files with 29 additions and 0 deletions

View File

@ -216,6 +216,13 @@ int uterm_display_get_dpms(const struct uterm_display *disp);
int uterm_display_use(struct uterm_display *disp);
int uterm_display_swap(struct uterm_display *disp);
int uterm_display_fill(struct uterm_display *disp,
uint8_t r, uint8_t g, uint8_t b,
unsigned int x, unsigned int y,
unsigned int width, unsigned int height);
int uterm_display_blit(struct uterm_display *disp,
const struct uterm_video_buffer *buf,
unsigned int x, unsigned int y);
int uterm_display_fake_blend(struct uterm_display *disp,
const struct uterm_video_buffer *buf,
unsigned int x, unsigned int y,

View File

@ -412,6 +412,28 @@ int uterm_display_swap(struct uterm_display *disp)
return VIDEO_CALL(disp->ops->swap, 0, disp);
}
int uterm_display_fill(struct uterm_display *disp,
uint8_t r, uint8_t g, uint8_t b,
unsigned int x, unsigned int y,
unsigned int width, unsigned int height)
{
if (!disp)
return -EINVAL;
return VIDEO_CALL(disp->ops->fill, -EOPNOTSUPP, disp, r, g, b, x, y,
width, height);
}
int uterm_display_blit(struct uterm_display *disp,
const struct uterm_video_buffer *buf,
unsigned int x, unsigned int y)
{
if (!disp)
return -EINVAL;
return VIDEO_CALL(disp->ops->blit, -EOPNOTSUPP, disp, buf, x, y);
}
int uterm_display_fake_blend(struct uterm_display *disp,
const struct uterm_video_buffer *buf,
unsigned int x, unsigned int y,