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)
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);
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);
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);
}
}
- 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;
}
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)
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)))
{
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);
{
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;
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);
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);
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));
}
}
{
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);
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)
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)
{
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));
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;
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;
}
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)
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 */
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);
}
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;
}
}
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));
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;
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;
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
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),
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",