mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-09 17:06:14 +00:00
lib: Add igt_dirty_fb
Just wraps drmModeDirtyFB and for now invalidates the whole FB. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
fb66a5df93
commit
a2d5b348ee
14
lib/igt_fb.c
14
lib/igt_fb.c
@ -1014,6 +1014,20 @@ static void create_cairo_surface__blit(int fd, struct igt_fb *fb)
|
||||
blit, destroy_cairo_surface__blit);
|
||||
}
|
||||
|
||||
/**
|
||||
* igt_dirty_fb:
|
||||
* @fd: open drm file descriptor
|
||||
* @fb: pointer to an #igt_fb structure
|
||||
*
|
||||
* Flushes out the whole framebuffer.
|
||||
*
|
||||
* Returns: 0 upon success.
|
||||
*/
|
||||
int igt_dirty_fb(int fd, struct igt_fb *fb)
|
||||
{
|
||||
return drmModeDirtyFB(fb->fd, fb->fb_id, NULL, 0);
|
||||
}
|
||||
|
||||
static void destroy_cairo_surface__gtt(void *arg)
|
||||
{
|
||||
struct igt_fb *fb = arg;
|
||||
|
@ -93,6 +93,7 @@ unsigned int igt_create_image_fb(int drm_fd, int width, int height,
|
||||
unsigned int igt_create_stereo_fb(int drm_fd, drmModeModeInfo *mode,
|
||||
uint32_t format, uint64_t tiling);
|
||||
void igt_remove_fb(int fd, struct igt_fb *fb);
|
||||
int igt_dirty_fb(int fd, struct igt_fb *fb);
|
||||
|
||||
/* cairo-based painting */
|
||||
cairo_t *igt_get_cairo_ctx(int fd, struct igt_fb *fb);
|
||||
|
Loading…
x
Reference in New Issue
Block a user