diff options
author | Veeresh Kadasani <external.vkadasani@jp.adit-jv.com> | 2019-11-12 15:44:19 +0900 |
---|---|---|
committer | Veeresh Kadasani <external.vkadasani@jp.adit-jv.com> | 2019-11-14 01:59:20 +0000 |
commit | aa7115087d914a2438ca026a44deb9a4882f8760 (patch) | |
tree | 5ef536abf080e1f526552f348214b8447713a913 /waltham-transmitter/transmitter-plugin/output.c | |
parent | bc48a58ff0f557a3bc7ed8ff9d58c86a6c632743 (diff) |
output:fix repaint func not to skip first buffer
Bug-AGL: SPEC-2946
transmitter skipped the first buffer and was not pushed
to remote side.
Change-Id: I242a4623b180e0115cffc2e9b0935697530bfc1c
Signed-off-by: Veeresh Kadasani <external.vkadasani@jp.adit-jv.com>
Diffstat (limited to 'waltham-transmitter/transmitter-plugin/output.c')
-rw-r--r-- | waltham-transmitter/transmitter-plugin/output.c | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/waltham-transmitter/transmitter-plugin/output.c b/waltham-transmitter/transmitter-plugin/output.c index 0676655..853889b 100644 --- a/waltham-transmitter/transmitter-plugin/output.c +++ b/waltham-transmitter/transmitter-plugin/output.c @@ -196,7 +196,7 @@ transmitter_output_repaint(struct weston_output *base, wl_list_for_each_reverse(view, &compositor->view_list, link) { bool found_surface = false; - if (view->output == &output->base) { + if (view->output == &output->base && (view->surface->width >= 64 && view->surface->height >= 64)) { found_output = true; wl_list_for_each(txs, &remote->surface_list, link) { if (txs->surface == view->surface) { @@ -228,9 +228,24 @@ transmitter_output_repaint(struct weston_output *base, break; } } - if (!found_surface) - transmitter_api->surface_push_to_remote(view->surface, + if (!found_surface){ + txs = transmitter_api->surface_push_to_remote(view->surface, remote, NULL); + output->renderer->dmafd = + api->get_dma_fd_from_view(&output->base, view, &output->renderer->buf_stride); + if (output->renderer->dmafd < 0) { + weston_log("Failed to get dmafd\n"); + goto out; + } + output->renderer->surface_width = view->surface->width; + output->renderer->surface_height = view->surface->height; + + output->renderer->repaint_output(output); + output->renderer->dmafd = NULL; + transmitter_api->surface_gather_state(txs); + weston_buffer_reference(&view->surface->buffer_ref, NULL); + break; + } } } if (!found_output) @@ -256,16 +271,13 @@ transmitter_assign_planes(struct weston_output *base,void *repaint_data) { struct weston_view *view; wl_list_for_each_reverse(view, &compositor->view_list, link) { - if (view->output == &output->base) { - wl_list_for_each(txs, &remote->surface_list, link) { - if (txs->surface == view->surface) - view->surface->keep_buffer = true; - - } + if (view->output == &output->base && (view->surface->width >= 64 && view->surface->height >= 64)) { + view->surface->keep_buffer = true; } } } + static int transmitter_output_enable(struct weston_output *base) { |