summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVeeresh Kadasani <external.vkadasani@jp.adit-jv.com>2019-11-12 15:44:19 +0900
committerVeeresh Kadasani <external.vkadasani@jp.adit-jv.com>2019-11-14 01:59:20 +0000
commitaa7115087d914a2438ca026a44deb9a4882f8760 (patch)
tree5ef536abf080e1f526552f348214b8447713a913
parentbc48a58ff0f557a3bc7ed8ff9d58c86a6c632743 (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>
-rw-r--r--waltham-transmitter/transmitter-plugin/output.c30
-rw-r--r--waltham-transmitter/transmitter-plugin/plugin.c2
2 files changed, 23 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)
{
diff --git a/waltham-transmitter/transmitter-plugin/plugin.c b/waltham-transmitter/transmitter-plugin/plugin.c
index 65ebdf6..d372c65 100644
--- a/waltham-transmitter/transmitter-plugin/plugin.c
+++ b/waltham-transmitter/transmitter-plugin/plugin.c
@@ -260,6 +260,7 @@ transmitter_surface_set_ivi_id(struct weston_transmitter_surface *txs)
txs->wthp_ivi_surface = wthp_ivi_application_surface_create
(dpy->application, ivi_surf->id_surface, txs->wthp_surf);
+ wth_connection_flush(remote->display->connection);
weston_log("surface ID %d\n", ivi_surf->id_surface);
if(!txs->wthp_ivi_surface){
weston_log("Failed to create txs->ivi_surf\n");
@@ -325,6 +326,7 @@ transmitter_surface_push_to_remote(struct weston_surface *ws,
if (!txs->wthp_surf) {
weston_log("txs->wthp_surf is NULL\n");
txs->wthp_surf = wthp_compositor_create_surface(remote->display->compositor);
+ wth_connection_flush(remote->display->connection);
transmitter_surface_set_ivi_id(txs);
}