struct _E_Hwc_Windows_Buffer_Comp_Info
{
E_Presentation_Time_Container presentation_container;
+ Eina_Bool skip;
};
static Eina_Bool ehws_trace = EINA_FALSE;
tdm_region fb_damage;
Eina_List *rendered_windows = NULL;
E_Hwc_Window_Queue_Buffer *queue_buffer = NULL;
+ E_Hwc_Windows_Buffer_Comp_Info *buffer_comp_info;
uint32_t n_thw = 0;
const Eina_List *l;
int i;
tsurface = queue_buffer->tsurface;
EINA_SAFETY_ON_NULL_RETURN_VAL(tsurface, EINA_FALSE);
+ buffer_comp_info = _e_hwc_windows_buffer_comp_info_get(tsurface);
+ if ((buffer_comp_info) && (buffer_comp_info->skip))
+ {
+ e_hwc_window_presentation_time_feedback_take(hwc_window,
+ &buffer_comp_info->presentation_container);
+ e_hwc_window_queue_buffer_release(hwc_window->queue, queue_buffer);
+ return EINA_FALSE;
+ }
+
if (hwc_window->buffer.tsurface &&
hwc_window->buffer.tsurface != hwc_window->display.buffer.tsurface)
{
tbm_surface_h tsurface, tbm_surface_queue_trace trace, void *data)
{
E_Hwc_Window_Target *target_hwc_window = (E_Hwc_Window_Target *)data;
+ E_Hwc_Windows_Buffer_Comp_Info *buffer_comp_info;
/* gets called as evas_renderer dequeues a new buffer from the queue */
if (trace == TBM_SURFACE_QUEUE_TRACE_DEQUEUE)
target_hwc_window->rendering_tsurfaces =
eina_list_remove(target_hwc_window->rendering_tsurfaces, tsurface);
+
+ buffer_comp_info = _e_hwc_windows_buffer_comp_info_get(tsurface);
+ if (buffer_comp_info)
+ buffer_comp_info->skip = EINA_FALSE;
}
}
return transition;
}
+static Eina_Bool
+_e_hwc_windows_present_sync_check(E_Hwc *hwc)
+{
+ E_Hwc_Window_Target *target_hwc_window;
+
+ if (!hwc->present_sync) return EINA_FALSE;
+
+ target_hwc_window = hwc->target_hwc_window;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(target_hwc_window, EINA_FALSE);
+
+ 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))
+ return EINA_TRUE;
+ }
+
+ hwc->present_sync = EINA_FALSE;
+
+ return EINA_FALSE;
+}
+
static Eina_Bool
_e_hwc_windows_validated_changes_update(E_Hwc *hwc, uint32_t num_changes)
{
goto re_evaluate;
}
+ if (_e_hwc_windows_present_sync_check(hwc))
+ {
+ EHWSTRACE(" Not accpet display sync.", NULL, hwc);
+ goto re_evaluate;
+ }
+
if (e_hwc_norender_get(hwc) > 0)
{
EHWSTRACE(" Not accpet validation NoRender get.", NULL, hwc);
return EINA_TRUE;
}
+
+EINTERN Eina_Bool
+e_hwc_windows_present_sync(E_Hwc *hwc)
+{
+ E_Hwc_Window_Target *target_hwc_window;
+ E_Hwc_Windows_Buffer_Comp_Info *buffer_comp_info;
+ tbm_surface_h tsurface;
+ Eina_List *l;
+
+ EINA_SAFETY_ON_NULL_RETURN_VAL(hwc, EINA_FALSE);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(hwc->hwc_policy == E_HWC_POLICY_WINDOWS, EINA_FALSE);
+
+ target_hwc_window = hwc->target_hwc_window;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(target_hwc_window, EINA_FALSE);
+
+ hwc->present_sync = EINA_TRUE;
+
+ EINA_LIST_FOREACH(target_hwc_window->rendering_tsurfaces, l, tsurface)
+ {
+ buffer_comp_info = _e_hwc_windows_buffer_comp_info_get(tsurface);
+ if (!buffer_comp_info) continue;
+
+ buffer_comp_info->skip = EINA_TRUE;
+ }
+
+ e_hwc_window_queue_clear(((E_Hwc_Window *)target_hwc_window)->queue);
+
+ EHWSINF("Present sync", NULL, hwc);
+
+ return EINA_TRUE;
+}