diff options
author | fukubayashi.akio <fukubayashi.akio@genetec.co.jp> | 2019-06-06 19:29:41 +0900 |
---|---|---|
committer | fukubayashi.akio <fukubayashi.akio@genetec.co.jp> | 2019-06-06 19:29:41 +0900 |
commit | efe567cf2fc39e3c7ea87edf7bc54284252c6c83 (patch) | |
tree | 4ddb98481b0503271ec4c49d098bf9d6fffbd03b /waltham-transmitter/transmitter-plugin | |
parent | 3354b93c4a12caa2a32d2309ec12e98755aed057 (diff) |
Fix issues slow app switching
Signed-off-by: fukubayashi.akio <fukubayashi.akio@genetec.co.jp>
Diffstat (limited to 'waltham-transmitter/transmitter-plugin')
-rw-r--r-- | waltham-transmitter/transmitter-plugin/output.c | 15 | ||||
-rw-r--r-- | waltham-transmitter/transmitter-plugin/transmitter_api.h | 2 |
2 files changed, 14 insertions, 3 deletions
diff --git a/waltham-transmitter/transmitter-plugin/output.c b/waltham-transmitter/transmitter-plugin/output.c index 829b4bf..c7aa616 100644 --- a/waltham-transmitter/transmitter-plugin/output.c +++ b/waltham-transmitter/transmitter-plugin/output.c @@ -193,7 +193,7 @@ transmitter_output_repaint(struct weston_output *base, output->renderer->dmafd = api->get_dma_fd_from_view(&output->base, view, &output->renderer->buf_stride); - if(!output->renderer->dmafd) { + if(output->renderer->dmafd < 0) { weston_log("Failed to get dmafd\n"); goto out; } @@ -210,7 +210,7 @@ transmitter_output_repaint(struct weston_output *base, output->renderer->repaint_output(output); output->renderer->dmafd = NULL; transmitter_api->surface_gather_state(txs); - weston_buffer_reference(&view->surface->buffer_ref, NULL); + //weston_buffer_reference(&view->surface->buffer_ref, NULL); break; } } @@ -222,7 +222,18 @@ transmitter_output_repaint(struct weston_output *base, if (!found_output) goto out; +#if 0 weston_compositor_read_presentation_clock(output->base.compositor, &ts); +#else + clock_gettime(CLOCK_MONOTONIC_RAW, &ts); + ts.tv_nsec += 33000000; + if(ts.tv_nsec >= 1000000000) + { + ts.tv_sec++; + ts.tv_nsec -= 1000000000; + } +#endif + weston_output_finish_frame(&output->base, &ts, 0); return 0; diff --git a/waltham-transmitter/transmitter-plugin/transmitter_api.h b/waltham-transmitter/transmitter-plugin/transmitter_api.h index 9f382bf..b067c78 100644 --- a/waltham-transmitter/transmitter-plugin/transmitter_api.h +++ b/waltham-transmitter/transmitter-plugin/transmitter_api.h @@ -270,7 +270,7 @@ struct renderer { void (*repaint_output)(struct weston_output *base); struct GstAppContext *ctx; int32_t dmafd; /* dmafd received from compositor-drm */ - int buf_stride; + int buf_stride; int surface_width; int surface_height; bool recorder_enabled; |