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:
parent
8cc97f6913
commit
6636bc6ca3
@ -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,
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user