From 5e6bffdf7fb4006a37e2e8394ce2b68f4a6b04cf Mon Sep 17 00:00:00 2001 From: Changyeon Lee Date: Wed, 28 Apr 2021 21:51:41 +0900 Subject: [PATCH] e_hwc_window: Add E_Hwc_Window_Update_Data for managing update infomation current : tdm_hwc_window commit : latest tdm_hwc_commit display : display done Change-Id: Iac86c8fe5cc84bc45fa98bb66c2057127e8eaa01 --- src/bin/e_hwc_window.c | 66 ++++++++++++------------- src/bin/e_hwc_window.h | 27 +++++----- src/bin/e_hwc_window_queue.c | 8 +-- src/bin/e_hwc_windows.c | 115 ++++++++++++++++++++++--------------------- src/bin/e_output.c | 32 ++++++------ src/bin/e_plane.c | 2 +- 6 files changed, 124 insertions(+), 126 deletions(-) diff --git a/src/bin/e_hwc_window.c b/src/bin/e_hwc_window.c index 5da1b8c..61c09a6 100644 --- a/src/bin/e_hwc_window.c +++ b/src/bin/e_hwc_window.c @@ -635,10 +635,10 @@ done: hwc_window->queue_destroy_listener.notify = NULL; } - if (hwc_window->buffer.queue_destroy_listener.notify) + if (hwc_window->current.buffer.queue_destroy_listener.notify) { - wl_list_remove(&hwc_window->buffer.queue_destroy_listener.link); - hwc_window->buffer.queue_destroy_listener.notify = NULL; + wl_list_remove(&hwc_window->current.buffer.queue_destroy_listener.link); + hwc_window->current.buffer.queue_destroy_listener.notify = NULL; } if (hwc_window->display.buffer.queue_destroy_listener.notify) @@ -663,10 +663,10 @@ _e_hwc_window_commit_data_acquire_device(E_Hwc_Window *hwc_window) commit_data = E_NEW(E_Hwc_Window_Commit_Data, 1); EINA_SAFETY_ON_NULL_RETURN_VAL(commit_data, NULL); - memcpy(&commit_data->info, &hwc_window->info, sizeof(tdm_hwc_window_info)); + memcpy(&commit_data->info, &hwc_window->current.info, sizeof(tdm_hwc_window_info)); - e_hwc_window_buffer_set(&commit_data->buffer, hwc_window->buffer.tsurface, - hwc_window->buffer.queue, hwc_window->buffer.transform); + e_hwc_window_buffer_set(&commit_data->buffer, hwc_window->current.buffer.tsurface, + hwc_window->current.buffer.queue, hwc_window->current.buffer.transform); tbm_surface_internal_ref(commit_data->buffer.tsurface); @@ -1114,7 +1114,7 @@ _e_hwc_window_info_get(E_Hwc_Window *hwc_window, tdm_hwc_window_info *hwc_win_in output = hwc->output; EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE); - tsurface = hwc_window->buffer.tsurface; + tsurface = hwc_window->current.buffer.tsurface; if (!tsurface) return EINA_TRUE; tbm_surface_get_info(tsurface, &surf_info); @@ -1180,7 +1180,7 @@ _e_hwc_window_target_info_get(E_Hwc_Window *hwc_window, tdm_hwc_window_info *hwc if (!e_hwc_window_is_target(hwc_window)) return EINA_FALSE; - tsurface = hwc_window->buffer.tsurface; + tsurface = hwc_window->current.buffer.tsurface; if (!tsurface) return EINA_TRUE; tbm_surface_get_info(tsurface, &surf_info); @@ -1286,27 +1286,27 @@ e_hwc_window_info_update(E_Hwc_Window *hwc_window) } } - if (memcmp(&hwc_window->info, &hwc_win_info, sizeof(tdm_hwc_window_info))) + if (memcmp(&hwc_window->current.info, &hwc_win_info, sizeof(tdm_hwc_window_info))) { tdm_error error; - memcpy(&hwc_window->info, &hwc_win_info, sizeof(tdm_hwc_window_info)); + memcpy(&hwc_window->current.info, &hwc_win_info, sizeof(tdm_hwc_window_info)); if (!e_hwc_window_is_target(hwc_window)) { - error = tdm_hwc_window_set_info(hwc_window->thwc_window, &hwc_window->info); + error = tdm_hwc_window_set_info(hwc_window->thwc_window, &hwc_window->current.info); EINA_SAFETY_ON_TRUE_RETURN_VAL(error != TDM_ERROR_NONE, EINA_FALSE); } EHWTRACE("INF src(%dx%d+%d+%d size:%dx%d fmt:%c%c%c%c) dst(%dx%d+%d+%d) trans(%d)", hwc_window->ec, hwc_window->hwc, hwc_window, - hwc_window->info.src_config.pos.w, hwc_window->info.src_config.pos.h, - hwc_window->info.src_config.pos.x, hwc_window->info.src_config.pos.y, - hwc_window->info.src_config.size.h, hwc_window->info.src_config.size.v, - EHW_FOURCC_STR(hwc_window->info.src_config.format), - hwc_window->info.dst_pos.w, hwc_window->info.dst_pos.h, - hwc_window->info.dst_pos.x, hwc_window->info.dst_pos.y, - hwc_window->info.transform); + hwc_window->current.info.src_config.pos.w, hwc_window->current.info.src_config.pos.h, + hwc_window->current.info.src_config.pos.x, hwc_window->current.info.src_config.pos.y, + hwc_window->current.info.src_config.size.h, hwc_window->current.info.src_config.size.v, + EHW_FOURCC_STR(hwc_window->current.info.src_config.format), + hwc_window->current.info.dst_pos.w, hwc_window->current.info.dst_pos.h, + hwc_window->current.info.dst_pos.x, hwc_window->current.info.dst_pos.y, + hwc_window->current.info.transform); return EINA_TRUE; } @@ -1378,28 +1378,28 @@ e_hwc_window_buffer_fetch(E_Hwc_Window *hwc_window) if ((hwc_window->is_deleted) || (!ec) || e_object_is_del(E_OBJECT(ec))) { tsurface = NULL; - if (!hwc_window->buffer.tsurface) return EINA_FALSE; + if (!hwc_window->current.buffer.tsurface) return EINA_FALSE; } /* for video we set buffer in the video module */ else if (e_hwc_window_is_video(hwc_window)) { tsurface = e_client_video_tbm_surface_get(hwc_window->ec); - if (tsurface == hwc_window->buffer.tsurface) return EINA_FALSE; + if (tsurface == hwc_window->current.buffer.tsurface) return EINA_FALSE; } else { /* acquire the surface */ tsurface = _e_hwc_window_client_surface_acquire(hwc_window); - if (tsurface == hwc_window->buffer.tsurface) return EINA_FALSE; + if (tsurface == hwc_window->current.buffer.tsurface) return EINA_FALSE; } - if ((hwc_window->buffer.tsurface) && (hwc_window->buffer.queue) && - (!e_hwc_window_display_or_commit_buffer_check(hwc_window, hwc_window->buffer.tsurface))) + if ((hwc_window->current.buffer.tsurface) && (hwc_window->current.buffer.queue) && + (!e_hwc_window_display_or_commit_buffer_check(hwc_window, hwc_window->current.buffer.tsurface))) { - queue_buffer = e_hwc_window_queue_buffer_find(hwc_window->buffer.queue, hwc_window->buffer.tsurface); + queue_buffer = e_hwc_window_queue_buffer_find(hwc_window->current.buffer.queue, hwc_window->current.buffer.tsurface); if (queue_buffer) - e_hwc_window_queue_buffer_release(hwc_window->buffer.queue, queue_buffer); + e_hwc_window_queue_buffer_release(hwc_window->current.buffer.queue, queue_buffer); } if (tsurface && hwc_window->queue) @@ -1435,13 +1435,13 @@ e_hwc_window_buffer_fetch(E_Hwc_Window *hwc_window) if (tsurface) { comp_buffer = _e_hwc_window_comp_wl_buffer_get(hwc_window); - e_hwc_window_buffer_set(&hwc_window->buffer, tsurface, hwc_window->queue, + e_hwc_window_buffer_set(&hwc_window->current.buffer, tsurface, hwc_window->queue, comp_buffer ? comp_buffer->transform : 0); } else - e_hwc_window_buffer_set(&hwc_window->buffer, NULL, NULL, 0); + e_hwc_window_buffer_set(&hwc_window->current.buffer, NULL, NULL, 0); - error = tdm_hwc_window_set_buffer(thwc_window, hwc_window->buffer.tsurface); + error = tdm_hwc_window_set_buffer(thwc_window, hwc_window->current.buffer.tsurface); EINA_SAFETY_ON_TRUE_RETURN_VAL(error != TDM_ERROR_NONE, EINA_FALSE); if ((ec) && (ec->explicit_sync_surface) && (e_hwc_windows_fence_enabled_get(hwc))) @@ -1481,22 +1481,22 @@ e_hwc_window_commit_data_acquire(E_Hwc_Window *hwc_window) { if (!hwc_window->cursor.buffer) return NULL; if ((hwc_window->cursor.buffer == hwc_window->commit.buffer_ref.buffer) && - (!memcmp(&hwc_window->info, &hwc_window->commit.info, sizeof(tdm_hwc_window_info)))) + (!memcmp(&hwc_window->current.info, &hwc_window->commit.info, sizeof(tdm_hwc_window_info)))) return NULL; commit_data = E_NEW(E_Hwc_Window_Commit_Data, 1); EINA_SAFETY_ON_NULL_RETURN_VAL(commit_data, EINA_FALSE); - memcpy(&commit_data->info, &hwc_window->info, sizeof(tdm_hwc_window_info)); + memcpy(&commit_data->info, &hwc_window->current.info, sizeof(tdm_hwc_window_info)); e_comp_wl_buffer_reference(&commit_data->buffer_ref, _e_hwc_window_comp_wl_buffer_get(hwc_window)); } else if ((hwc_window->accepted_state == E_HWC_WINDOW_STATE_DEVICE) || (hwc_window->accepted_state == E_HWC_WINDOW_STATE_VIDEO)) { - if (!hwc_window->buffer.tsurface) return EINA_FALSE; - if ((hwc_window->buffer.tsurface == hwc_window->commit.buffer.tsurface) && - (!memcmp(&hwc_window->info, &hwc_window->commit.info, sizeof(tdm_hwc_window_info)))) + if (!hwc_window->current.buffer.tsurface) return EINA_FALSE; + if ((hwc_window->current.buffer.tsurface == hwc_window->commit.buffer.tsurface) && + (!memcmp(&hwc_window->current.info, &hwc_window->commit.info, sizeof(tdm_hwc_window_info)))) return NULL; commit_data = _e_hwc_window_commit_data_acquire_device(hwc_window); diff --git a/src/bin/e_hwc_window.h b/src/bin/e_hwc_window.h index ee94b5f..1fc9bef 100644 --- a/src/bin/e_hwc_window.h +++ b/src/bin/e_hwc_window.h @@ -5,6 +5,7 @@ typedef struct _E_Hwc_Window_Target E_Hwc_Window_Target; typedef struct _E_Hwc_Window_Buffer E_Hwc_Window_Buffer; typedef struct _E_Hwc_Window_Commit_Data E_Hwc_Window_Commit_Data; typedef struct _E_Hwc_Window_Hook E_Hwc_Window_Hook; +typedef struct _E_Hwc_Window_Update_Data E_Hwc_Window_Update_Data; typedef void (*E_Hwc_Window_Hook_Cb) (void *data, E_Hwc_Window *hwc_window); #else @@ -74,6 +75,14 @@ struct _E_Hwc_Window_Buffer int transform; }; +struct _E_Hwc_Window_Update_Data +{ + E_Comp_Wl_Buffer_Ref buffer_ref; + E_Hwc_Window_Buffer buffer; + tdm_hwc_window_info info; + E_Hwc_Window *hwc_window; +}; + struct _E_Hwc_Window { E_Object e_obj_inherit; @@ -98,27 +107,15 @@ struct _E_Hwc_Window E_Hwc_Window_Transition transition; int transition_failures; - E_Hwc_Window_Buffer buffer; + E_Hwc_Window_Update_Data current; - tdm_hwc_window_info info; Eina_List *prop_list; + E_Hwc_Window_Update_Data commit; Eina_List *commit_data_list; - struct - { - E_Comp_Wl_Buffer_Ref buffer_ref; - E_Hwc_Window_Buffer buffer; - tdm_hwc_window_info info; - } commit; - /* current display information */ - struct - { - E_Comp_Wl_Buffer_Ref buffer_ref; - E_Hwc_Window_Buffer buffer; - tdm_hwc_window_info info; - } display; + E_Hwc_Window_Update_Data display; struct { diff --git a/src/bin/e_hwc_window_queue.c b/src/bin/e_hwc_window_queue.c index 2f0218a..2cb1062 100644 --- a/src/bin/e_hwc_window_queue.c +++ b/src/bin/e_hwc_window_queue.c @@ -1172,8 +1172,8 @@ _e_hwc_window_queue_cb_accepted_state_set(void *data, E_Hwc_Window *hwc_window) if (queue->state == E_HWC_WINDOW_QUEUE_STATE_SET_WAITING_BUFFER) { if (!queue->user) return; - if (!queue->user->buffer.tsurface) return; - if (!e_hwc_window_queue_buffer_find(queue, queue->user->buffer.tsurface)) + if (!queue->user->current.buffer.tsurface) return; + if (!e_hwc_window_queue_buffer_find(queue, queue->user->current.buffer.tsurface)) return; } else @@ -1197,9 +1197,9 @@ _e_hwc_window_queue_cb_accepted_state_set(void *data, E_Hwc_Window *hwc_window) if (e_hwc_window_is_target(hwc_window)) return; /* if buffer of queue is commited, hwc_window should be set by Device Type */ - if (!hwc_window->buffer.tsurface) return; + if (!hwc_window->current.buffer.tsurface) return; - if (e_hwc_window_queue_buffer_find(queue, hwc_window->buffer.tsurface)) + if (e_hwc_window_queue_buffer_find(queue, hwc_window->current.buffer.tsurface)) e_hwc_window_constraints_reset(hwc_window); } } diff --git a/src/bin/e_hwc_windows.c b/src/bin/e_hwc_windows.c index 2999c5a..666d32b 100644 --- a/src/bin/e_hwc_windows.c +++ b/src/bin/e_hwc_windows.c @@ -238,9 +238,9 @@ _e_hwc_windows_presentation_feedback_take(E_Hwc_Window *hwc_window) { E_Hwc_Windows_Buffer_Comp_Info *buffer_comp_info; - if (!hwc_window->buffer.tsurface) return; + if (!hwc_window->current.buffer.tsurface) return; - buffer_comp_info = _e_hwc_windows_buffer_comp_info_get(hwc_window->buffer.tsurface); + buffer_comp_info = _e_hwc_windows_buffer_comp_info_get(hwc_window->current.buffer.tsurface); if (!buffer_comp_info) return; container = &buffer_comp_info->presentation_container; @@ -511,22 +511,23 @@ _e_hwc_windows_target_window_buffer_skip(E_Hwc *hwc) CLEAR(fb_damage); - if (hwc_window->buffer.tsurface && - hwc_window->buffer.tsurface != hwc_window->display.buffer.tsurface) + if (hwc_window->current.buffer.tsurface && + hwc_window->current.buffer.tsurface != hwc_window->display.buffer.tsurface) { - buffer_comp_info = _e_hwc_windows_buffer_comp_info_get(hwc_window->buffer.tsurface); + buffer_comp_info = _e_hwc_windows_buffer_comp_info_get(hwc_window->current.buffer.tsurface); if (buffer_comp_info) e_hwc_window_presentation_time_feedback_take(hwc_window, &buffer_comp_info->presentation_container); - if (hwc_window->buffer.queue) + if (hwc_window->current.buffer.queue) { - queue_buffer = e_hwc_window_queue_buffer_find(hwc_window->buffer.queue, hwc_window->buffer.tsurface); + queue_buffer = e_hwc_window_queue_buffer_find(hwc_window->current.buffer.queue, + hwc_window->current.buffer.tsurface); if (queue_buffer) - e_hwc_window_queue_buffer_release(hwc_window->buffer.queue, queue_buffer); + e_hwc_window_queue_buffer_release(hwc_window->current.buffer.queue, queue_buffer); } - e_hwc_window_buffer_set(&hwc_window->buffer, hwc_window->display.buffer.tsurface, + e_hwc_window_buffer_set(&hwc_window->current.buffer, hwc_window->display.buffer.tsurface, hwc_window->display.buffer.queue, hwc_window->display.buffer.transform); tdm_hwc_set_client_target_buffer(thwc, hwc_window->display.buffer.tsurface, fb_damage); @@ -599,21 +600,21 @@ _e_hwc_windows_target_buffer_fetch(E_Hwc *hwc) return EINA_FALSE; } - if ((hwc_window->buffer.tsurface) && - (!e_hwc_window_display_or_commit_buffer_check(hwc_window, hwc_window->buffer.tsurface))) + if ((hwc_window->current.buffer.tsurface) && + (!e_hwc_window_display_or_commit_buffer_check(hwc_window, hwc_window->current.buffer.tsurface))) { - queue_buffer = e_hwc_window_queue_buffer_find(hwc_window->buffer.queue, hwc_window->buffer.tsurface); + queue_buffer = e_hwc_window_queue_buffer_find(hwc_window->current.buffer.queue, hwc_window->current.buffer.tsurface); if (queue_buffer) - e_hwc_window_queue_buffer_release(hwc_window->buffer.queue, queue_buffer); + e_hwc_window_queue_buffer_release(hwc_window->current.buffer.queue, queue_buffer); } - e_hwc_window_buffer_set(&hwc_window->buffer, tsurface, queue, 0); + e_hwc_window_buffer_set(&hwc_window->current.buffer, tsurface, queue, 0); e_hwc_window_info_update(hwc_window); /* the damage isn't supported by hwc extension yet */ CLEAR(fb_damage); - tdm_hwc_set_client_target_buffer(thwc, hwc_window->buffer.tsurface, fb_damage); + tdm_hwc_set_client_target_buffer(thwc, hwc_window->current.buffer.tsurface, fb_damage); if ((target_hwc_window->end_render_sync) && (e_hwc_windows_fence_enabled_get(hwc))) { int fence = e_egl_sync_fence_fd_dup(target_hwc_window->end_render_sync); @@ -626,26 +627,26 @@ _e_hwc_windows_target_buffer_fetch(E_Hwc *hwc) if (ehws_trace) { - rendered_windows = _e_hwc_windows_target_window_rendered_windows_get(hwc_window->buffer.tsurface); + rendered_windows = _e_hwc_windows_target_window_rendered_windows_get(hwc_window->current.buffer.tsurface); n_thw = eina_list_count(rendered_windows); if (n_thw) { EHWSTRACE("FET {%s} ts:%p state:%s has hwc_windows to render below.", - NULL, hwc, "@TARGET WINDOW@", hwc_window->buffer.tsurface, + NULL, hwc, "@TARGET WINDOW@", hwc_window->current.buffer.tsurface, e_hwc_window_state_string_get(hwc_window->state)); i = 0; EINA_LIST_FOREACH(rendered_windows, l, hw) { EHWSTRACE(" (%d) ehw:%p ts:%p -- {%25s}, state:%s, zpos:%d, deleted:%s", - hwc_window->ec, hwc, i++, hw, hw->buffer.tsurface, e_hwc_window_name_get(hw), + hwc_window->ec, hwc, i++, hw, hw->current.buffer.tsurface, e_hwc_window_name_get(hw), e_hwc_window_state_string_get(hw->state), hwc_window->zpos, (hwc_window->is_deleted ? "yes" : "no")); } } else EHWSTRACE("FET {%s} ts:%p state:%s has no hwc_windows to render.", - NULL, hwc, "@TARGET WINDOW@", hwc_window->buffer.tsurface, + NULL, hwc, "@TARGET WINDOW@", hwc_window->current.buffer.tsurface, e_hwc_window_state_string_get(hwc_window->state)); } } @@ -653,25 +654,25 @@ _e_hwc_windows_target_buffer_fetch(E_Hwc *hwc) { e_hwc_window_queue_clear(queue); - if (!hwc_window->buffer.tsurface) return EINA_FALSE; + if (!hwc_window->current.buffer.tsurface) return EINA_FALSE; - if (!e_hwc_window_display_or_commit_buffer_check(hwc_window, hwc_window->buffer.tsurface)) + if (!e_hwc_window_display_or_commit_buffer_check(hwc_window, hwc_window->current.buffer.tsurface)) { - queue_buffer = e_hwc_window_queue_buffer_find(hwc_window->buffer.queue, hwc_window->buffer.tsurface); + queue_buffer = e_hwc_window_queue_buffer_find(hwc_window->current.buffer.queue, hwc_window->current.buffer.tsurface); if (queue_buffer) { E_Hwc_Windows_Buffer_Comp_Info *buffer_comp_info; - buffer_comp_info = _e_hwc_windows_buffer_comp_info_get(hwc_window->buffer.tsurface); + buffer_comp_info = _e_hwc_windows_buffer_comp_info_get(hwc_window->current.buffer.tsurface); if (buffer_comp_info) e_hwc_window_presentation_time_feedback_take(hwc_window, &buffer_comp_info->presentation_container); - e_hwc_window_queue_buffer_release(hwc_window->buffer.queue, queue_buffer); + e_hwc_window_queue_buffer_release(hwc_window->current.buffer.queue, queue_buffer); } } - e_hwc_window_buffer_set(&hwc_window->buffer, NULL, NULL, 0); + e_hwc_window_buffer_set(&hwc_window->current.buffer, NULL, NULL, 0); e_hwc_window_info_update(hwc_window); CLEAR(fb_damage); @@ -722,7 +723,7 @@ _e_hwc_windows_target_window_rendered_window_has_no(E_Hwc *hwc, E_Hwc_Window *hw target_window = (E_Hwc_Window *)target_hwc_window; if (e_hwc_window_state_get(target_window) != E_HWC_WINDOW_STATE_DEVICE) return EINA_FALSE; - target_tsurface = target_hwc_window->hwc_window.buffer.tsurface; + target_tsurface = target_hwc_window->hwc_window.current.buffer.tsurface; if (!target_tsurface) return EINA_FALSE; if (all_target) @@ -765,7 +766,7 @@ _e_hwc_windows_target_window_rendered_window_has(E_Hwc *hwc, E_Hwc_Window *hwc_w target_window = (E_Hwc_Window *)target_hwc_window; if (e_hwc_window_state_get(target_window) != E_HWC_WINDOW_STATE_DEVICE) return EINA_FALSE; - target_tsurface = target_hwc_window->hwc_window.buffer.tsurface; + target_tsurface = target_hwc_window->hwc_window.current.buffer.tsurface; if (!target_tsurface) return EINA_FALSE; if (all_target) @@ -1793,7 +1794,7 @@ _e_hwc_windows_status_print(E_Hwc *hwc, Eina_Bool with_target) { EHWSTRACE(" ehw:%p ts:%p -- {%25s}, state:%s, zpos:%d, deleted:%s restrict:%s", hwc_window->ec, hwc, hwc_window, - hwc_window->buffer.tsurface, e_hwc_window_name_get(hwc_window), + hwc_window->current.buffer.tsurface, e_hwc_window_name_get(hwc_window), e_hwc_window_state_string_get(hwc_window->state), hwc_window->zpos, hwc_window->is_deleted ? "yes" : "no", e_hwc_window_restriction_string_get(hwc_window)); @@ -1876,7 +1877,7 @@ _e_hwc_windows_transition_check(E_Hwc *hwc) continue; if ((((E_Hwc_Window *)target_hwc_window)->display.buffer.tsurface) == - (((E_Hwc_Window *)target_hwc_window)->buffer.tsurface)) + (((E_Hwc_Window *)target_hwc_window)->current.buffer.tsurface)) transition = EINA_TRUE; else target_window_changed = EINA_TRUE; @@ -2019,7 +2020,7 @@ _e_hwc_windows_present_sync_check(E_Hwc *hwc) if (hwc->hwc_mode != E_HWC_MODE_FULL) { if ((((E_Hwc_Window *)target_hwc_window)->display.buffer.tsurface) == - (((E_Hwc_Window *)target_hwc_window)->buffer.tsurface)) + (((E_Hwc_Window *)target_hwc_window)->current.buffer.tsurface)) return EINA_TRUE; } @@ -2369,8 +2370,8 @@ _e_hwc_windows_pp_hwc_window_update(E_Hwc *hwc) if (!hwc_window) goto clear; - if ((tbm_surface_get_width(hwc_window->buffer.tsurface)) != w || - (tbm_surface_get_height(hwc_window->buffer.tsurface)) != h) + if ((tbm_surface_get_width(hwc_window->current.buffer.tsurface)) != w || + (tbm_surface_get_height(hwc_window->current.buffer.tsurface)) != h) goto clear; if (!hwc_window->device_state_available) @@ -2703,7 +2704,7 @@ _e_hwc_windows_presentation_evaluation_check(E_Hwc *hwc) queue = ((E_Hwc_Window *)target_hwc_window)->queue; EINA_SAFETY_ON_NULL_RETURN_VAL(queue, EINA_FALSE); - src_tsurface = hwc->presentation_hwc_window->buffer.tsurface; + src_tsurface = hwc->presentation_hwc_window->current.buffer.tsurface; if (!src_tsurface) return EINA_TRUE; /* dequeue buffer */ @@ -2815,7 +2816,7 @@ _e_hwc_windows_evaluate(E_Hwc *hwc, E_Output_Display_Mode display_mode) if (hwc_mode == E_HWC_MODE_FULL) { - if (((E_Hwc_Window *)hwc->target_hwc_window)->buffer.tsurface) + if (((E_Hwc_Window *)hwc->target_hwc_window)->current.buffer.tsurface) _e_hwc_windows_target_buffer_fetch(hwc); } @@ -2847,7 +2848,7 @@ _e_hwc_windows_target_buffer_prepared(E_Hwc *hwc) hwc_window = (E_Hwc_Window *)hwc->target_hwc_window; EINA_SAFETY_ON_NULL_RETURN_VAL(hwc->target_hwc_window, EINA_FALSE); - if (!hwc_window->buffer.tsurface) return EINA_FALSE; + if (!hwc_window->current.buffer.tsurface) return EINA_FALSE; return EINA_TRUE; } @@ -2885,11 +2886,11 @@ _e_hwc_windows_pp_buffer_update(E_Hwc *hwc) } else { - if (hwc_window->buffer.tsurface == hwc->pp_buffer.tsurface) + if (hwc_window->current.buffer.tsurface == hwc->pp_buffer.tsurface) return EINA_FALSE; e_hwc_window_buffer_set(&hwc->pp_buffer, - hwc_window->buffer.tsurface, hwc_window->buffer.queue, 0); + hwc_window->current.buffer.tsurface, hwc_window->current.buffer.queue, 0); if (!e_hwc_window_is_target(hwc_window)) e_comp_wl_buffer_reference(&hwc->pp_buffer_ref, _e_hwc_windows_comp_wl_buffer_get(hwc_window)); @@ -2918,10 +2919,10 @@ _e_hwc_windows_mirror_changes_update(E_Hwc *hwc) src_target_hwc_window = mirror_src_hwc->target_hwc_window; EINA_SAFETY_ON_NULL_RETURN_VAL(src_target_hwc_window, EINA_FALSE); - target_tsurface = target_hwc_window->hwc_window.buffer.tsurface; - src_target_tsurface = src_target_hwc_window->hwc_window.buffer.tsurface; + target_tsurface = target_hwc_window->hwc_window.current.buffer.tsurface; + src_target_tsurface = src_target_hwc_window->hwc_window.current.buffer.tsurface; - if (!src_target_hwc_window->hwc_window.buffer.tsurface) return EINA_FALSE; + if (!src_target_hwc_window->hwc_window.current.buffer.tsurface) return EINA_FALSE; if (hwc->mirror_src_tsurface == src_target_tsurface) return EINA_FALSE; queue = ((E_Hwc_Window *)target_hwc_window)->queue; @@ -2983,7 +2984,7 @@ _e_hwc_windows_presentation_changes_update(E_Hwc *hwc) if (hwc->pp_set) { - tsurface = hwc->presentation_hwc_window->buffer.tsurface; + tsurface = hwc->presentation_hwc_window->current.buffer.tsurface; src_rect.x = 0; src_rect.y = 0; @@ -3677,7 +3678,7 @@ e_hwc_windows_rendered_window_add(E_Hwc_Window *hwc_window) e_hwc_window_ref(hwc_window); EHWSTRACE(" add ehw:%p ts:%p to the render_list -- {%25s}.", ec, hwc, hwc_window, - hwc_window->buffer.tsurface, e_hwc_window_name_get(hwc_window)); + hwc_window->current.buffer.tsurface, e_hwc_window_name_get(hwc_window)); } EINTERN Eina_Bool @@ -3850,12 +3851,12 @@ _e_hwc_windows_window_debug_info_get(Eldbus_Message_Iter *iter, E_Hwc_Wins_Debug vis_skip = EINA_TRUE; } - if (hwc_window->info.src_config.format) - snprintf(fmt_str, sizeof(fmt_str), "%c%c%c%c", FOURCC_STR(hwc_window->info.src_config.format)); + if (hwc_window->current.info.src_config.format) + snprintf(fmt_str, sizeof(fmt_str), "%c%c%c%c", FOURCC_STR(hwc_window->current.info.src_config.format)); else snprintf(fmt_str, sizeof(fmt_str), " "); - if (hwc_window->info.transform > TDM_TRANSFORM_270) + if (hwc_window->current.buffer.transform > TDM_TRANSFORM_270) flip = 'F'; snprintf(info_str, sizeof(info_str), @@ -3869,20 +3870,20 @@ _e_hwc_windows_window_debug_info_get(Eldbus_Message_Iter *iter, E_Hwc_Wins_Debug e_hwc_window_state_string_get(hwc_window->accepted_state), hwc_window->accepted_state ? "A" : "D", e_hwc_window_transition_string_get(hwc_window->transition), - (uintptr_t)hwc_window->buffer.tsurface, - hwc_window->info.src_config.size.h, - hwc_window->info.src_config.size.v, - hwc_window->info.src_config.pos.w, - hwc_window->info.src_config.pos.h, - hwc_window->info.src_config.pos.x, - hwc_window->info.src_config.pos.y, + (uintptr_t)hwc_window->current.buffer.tsurface, + hwc_window->current.info.src_config.size.h, + hwc_window->current.info.src_config.size.v, + hwc_window->current.info.src_config.pos.w, + hwc_window->current.info.src_config.pos.h, + hwc_window->current.info.src_config.pos.x, + hwc_window->current.info.src_config.pos.y, fmt_str, - hwc_window->info.dst_pos.w, - hwc_window->info.dst_pos.h, - hwc_window->info.dst_pos.x, - hwc_window->info.dst_pos.y, + hwc_window->current.info.dst_pos.w, + hwc_window->current.info.dst_pos.h, + hwc_window->current.info.dst_pos.x, + hwc_window->current.info.dst_pos.y, flip, - (hwc_window->info.transform < 4) ? hwc_window->info.transform * 90 : (hwc_window->info.transform - 4) * 90, + (hwc_window->current.buffer.transform < 4) ? hwc_window->current.buffer.transform * 90 : (hwc_window->current.buffer.transform - 4) * 90, (uintptr_t)hwc_window->display.buffer.tsurface, (uintptr_t)hwc_window->queue, vis_skip ? "TRUE" : "FALSE", diff --git a/src/bin/e_output.c b/src/bin/e_output.c index da3a076..552a5c8 100644 --- a/src/bin/e_output.c +++ b/src/bin/e_output.c @@ -1870,28 +1870,28 @@ _e_output_capture_src_crop_get_hwc_window(E_Output *output, E_Hwc_Window *hwc_wi out_rect.w = mode->hdisplay; out_rect.h = mode->vdisplay; - dst_rect.x = hwc_window->info.dst_pos.x; - dst_rect.y = hwc_window->info.dst_pos.y; - dst_rect.w = hwc_window->info.dst_pos.w; - dst_rect.h = hwc_window->info.dst_pos.h; + dst_rect.x = hwc_window->current.info.dst_pos.x; + dst_rect.y = hwc_window->current.info.dst_pos.y; + dst_rect.w = hwc_window->current.info.dst_pos.w; + dst_rect.h = hwc_window->current.info.dst_pos.h; _e_output_capture_showing_rect_get(&out_rect, &dst_rect, showing_rect); - fit->x = hwc_window->info.src_config.pos.x; - fit->y = hwc_window->info.src_config.pos.y; + fit->x = hwc_window->current.info.src_config.pos.x; + fit->y = hwc_window->current.info.src_config.pos.y; - if (hwc_window->info.transform % 2 == 0) + if (hwc_window->current.info.transform % 2 == 0) { - ratio_x = (float)hwc_window->info.src_config.pos.w / dst_rect.w; - ratio_y = (float)hwc_window->info.src_config.pos.h / dst_rect.h; + ratio_x = (float)hwc_window->current.info.src_config.pos.w / dst_rect.w; + ratio_y = (float)hwc_window->current.info.src_config.pos.h / dst_rect.h; fit->w = showing_rect->w * ratio_x; fit->h = showing_rect->h * ratio_y; } else { - ratio_x = (float)hwc_window->info.src_config.pos.w / dst_rect.h; - ratio_y = (float)hwc_window->info.src_config.pos.h / dst_rect.w; + ratio_x = (float)hwc_window->current.info.src_config.pos.w / dst_rect.h; + ratio_y = (float)hwc_window->current.info.src_config.pos.h / dst_rect.w; fit->w = showing_rect->h * ratio_x; fit->h = showing_rect->w * ratio_y; @@ -1910,7 +1910,7 @@ _e_output_capture_dst_crop_get_hwc_window(E_Output *output, E_Hwc_Window *hwc_wi dst_crop->w = 0; dst_crop->h = 0; - if (hwc_window->info.src_config.pos.w == w && hwc_window->info.src_config.pos.h == h && + if (hwc_window->current.info.src_config.pos.w == w && hwc_window->current.info.src_config.pos.h == h && pos->x == 0 && pos->y == 0 && pos->w == tmp->width && pos->h == tmp->height) { dst_crop->x = pos->x; @@ -1920,10 +1920,10 @@ _e_output_capture_dst_crop_get_hwc_window(E_Output *output, E_Hwc_Window *hwc_wi } else if ((w == pos->w) && (h == pos->h) && (showing_pos->w == pos->w) && (showing_pos->h == pos->h)) { - dst_crop->x = hwc_window->info.dst_pos.x + pos->x; - dst_crop->y = hwc_window->info.dst_pos.y + pos->y; - dst_crop->w = hwc_window->info.dst_pos.w; - dst_crop->h = hwc_window->info.dst_pos.h; + dst_crop->x = hwc_window->current.info.dst_pos.x + pos->x; + dst_crop->y = hwc_window->current.info.dst_pos.y + pos->y; + dst_crop->w = hwc_window->current.info.dst_pos.w; + dst_crop->h = hwc_window->current.info.dst_pos.h; } else if (rotate == 0) { diff --git a/src/bin/e_plane.c b/src/bin/e_plane.c index 95af676..cb75496 100644 --- a/src/bin/e_plane.c +++ b/src/bin/e_plane.c @@ -635,7 +635,7 @@ _e_plane_external_surface_acquire(E_Plane *plane) } else { - tsurface = plane->output_primary->hwc->target_hwc_window->hwc_window.buffer.tsurface; + tsurface = plane->output_primary->hwc->target_hwc_window->hwc_window.current.buffer.tsurface; EINA_SAFETY_ON_NULL_RETURN_VAL(tsurface, NULL); } } -- 2.7.4