weston: sync vidda patch(44-48) [2/2]
PD#SWPL-172524
Problem:
frame lost when video play
Solution:
sync vidda patch
Verify:
t5w
Change-Id: I5769c9cb31f968c49f08650c0c8592dbcbc56595
Signed-off-by: limin.tian <limin.tian@amlogic.com>
diff --git a/libweston/compositor.c b/libweston/compositor.c
index b993690..55855cb 100644
--- a/libweston/compositor.c
+++ b/libweston/compositor.c
@@ -2155,7 +2155,7 @@
WL_EXPORT void
weston_compositor_get_time(struct timespec *time)
{
- clock_gettime(CLOCK_REALTIME, time);
+ clock_gettime(CLOCK_MONOTONIC, time);
}
/** weston_compositor_pick_view
@@ -3024,7 +3024,8 @@
msec_to_repaint = timespec_sub_to_msec(&output->next_repaint, now);
if (msec_to_repaint > 1) {
- weston_log("\n %s %d return ret:%d\n", __FUNCTION__,__LINE__,ret);
+ if (compositor->enable_video_debug)
+ weston_log("\n %s %d return ret:%d\n", __FUNCTION__,__LINE__,ret);
return ret;
}
@@ -3032,13 +3033,15 @@
* explicitly repaint all outputs when we come back. */
if (compositor->state == WESTON_COMPOSITOR_SLEEPING ||
compositor->state == WESTON_COMPOSITOR_OFFSCREEN) {
- weston_log("\n %s %d return ret:%d\n", __FUNCTION__,__LINE__,ret);
+ if (compositor->enable_video_debug)
+ weston_log("\n %s %d return ret:%d\n", __FUNCTION__,__LINE__,ret);
goto err;
}
/* We don't actually need to repaint this output; drop it from
* repaint until something causes damage. */
if (!output->repaint_needed) {
- weston_log("\n %s %d return ret:%d\n", __FUNCTION__,__LINE__,ret);
+ if (compositor->enable_video_debug)
+ weston_log("\n %s %d return ret:%d\n", __FUNCTION__,__LINE__,ret);
goto err;
}
@@ -3050,7 +3053,8 @@
ret = weston_output_repaint(output, repaint_data);
weston_compositor_read_presentation_clock(compositor, now);
if (ret != 0) {
- weston_log("\n %s %d return ret:%d\n", __FUNCTION__,__LINE__,ret);
+ if (compositor->enable_video_debug)
+ weston_log("\n %s %d return ret:%d\n", __FUNCTION__,__LINE__,ret);
goto err;
}
output->repainted = true;
@@ -4088,7 +4092,9 @@
surface_set_video_plane,
surface_set_pts,
surface_keep_last_frame,
- surface_set_display_rate
+ surface_set_display_rate,
+ surface_destroy_callback,
+ surface_enable_ll_mode
};
static int