summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLeo Liu <leo.liu@amd.com>2016-05-09 15:09:45 -0400
committerLeo Liu <leo.liu@amd.com>2016-05-16 16:28:51 -0400
commit96580ad593f3821256dc5a5f5f61ee809fb775a1 (patch)
treea3a108dc0e900f82b9841043b7926e03df5db3e0 /src
parentb0bd908284d2b5e6d7c6e3967bedb62f04e1b206 (diff)
downloadexternal_mesa3d-96580ad593f3821256dc5a5f5f61ee809fb775a1.zip
external_mesa3d-96580ad593f3821256dc5a5f5f61ee809fb775a1.tar.gz
external_mesa3d-96580ad593f3821256dc5a5f5f61ee809fb775a1.tar.bz2
vl/dri3: implement funciton for get dirty area
This will clear presentation area not covered by video content Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/vl/vl_winsys_dri3.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/vl/vl_winsys_dri3.c b/src/gallium/auxiliary/vl/vl_winsys_dri3.c
index afab85a..a370315 100644
--- a/src/gallium/auxiliary/vl/vl_winsys_dri3.c
+++ b/src/gallium/auxiliary/vl/vl_winsys_dri3.c
@@ -41,6 +41,7 @@
#include "util/u_memory.h"
#include "util/u_inlines.h"
+#include "vl/vl_compositor.h"
#include "vl/vl_winsys.h"
#define BACK_BUFFER_NUM 3
@@ -69,6 +70,8 @@ struct vl_dri3_screen
struct vl_dri3_buffer *back_buffers[BACK_BUFFER_NUM];
int cur_back;
+
+ struct u_rect dirty_areas[BACK_BUFFER_NUM];
};
static void
@@ -251,6 +254,7 @@ dri3_get_back_buffer(struct vl_dri3_screen *scrn)
if (!buffer)
return NULL;
+ vl_compositor_reset_dirty_area(&scrn->dirty_areas[scrn->cur_back]);
scrn->back_buffers[scrn->cur_back] = buffer;
}
@@ -363,8 +367,11 @@ vl_dri3_screen_texture_from_drawable(struct vl_screen *vscreen, void *drawable)
static struct u_rect *
vl_dri3_screen_get_dirty_area(struct vl_screen *vscreen)
{
- /* TODO */
- return NULL;
+ struct vl_dri3_screen *scrn = (struct vl_dri3_screen *)vscreen;
+
+ assert(scrn);
+
+ return &scrn->dirty_areas[scrn->cur_back];
}
static uint64_t