static E_Hwc_Window *
_e_hwc_windows_pp_get_hwc_window_for_zoom(E_Hwc *hwc)
{
- const Eina_List *l;
- E_Hwc_Window *hwc_window = NULL;
+ E_Hwc_Window_Target *target_hwc_window = NULL;
E_Hwc_Window *hwc_window_for_zoom = NULL;
- int num = 0;
int w, h;
e_output_size_get(hwc->output, &w, &h);
}
else
{
- EINA_LIST_FOREACH(hwc->hwc_windows, l, hwc_window)
- {
- if (!e_hwc_window_is_on_hw_overlay(hwc_window)) continue;
-
- hwc_window_for_zoom = hwc_window;
- num++;
- }
+ target_hwc_window = hwc->target_hwc_window;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(target_hwc_window, NULL);
- if (num != 1) return NULL;
+ hwc_window_for_zoom = (E_Hwc_Window *)target_hwc_window;
if (!hwc_window_for_zoom->buffer.tsurface) return NULL;
- if (tbm_surface_get_width(hwc_window_for_zoom->buffer.tsurface) != w ||
- tbm_surface_get_height(hwc_window_for_zoom->buffer.tsurface) != h)
- return NULL;
}
return hwc_window_for_zoom;