} \
while (0)
+#define ROUNDUP(s,c) (((s) + (c-1)) & ~(c-1))
+
typedef struct _E_Hwc_Windows_Pp_Data E_Hwc_Windows_Pp_Data;
typedef struct _E_Hwc_Windows_Buffer_Comp_Info E_Hwc_Windows_Buffer_Comp_Info;
return EINA_TRUE;
}
+static void
+_e_hwc_windows_zoom_pp_aligned_value_get(E_Hwc *hwc, int *aligned_width, int *aligned_height)
+{
+ if (hwc->pp_minw != -1)
+ {
+ if (hwc->pp_minw > *aligned_width)
+ *aligned_width = hwc->pp_minw;
+ }
+
+ if (hwc->pp_minh != -1)
+ {
+ if (hwc->pp_minh > *aligned_height)
+ *aligned_height = hwc->pp_minh;
+ }
+
+ if (hwc->pp_align != -1)
+ *aligned_width = ROUNDUP(*aligned_width, hwc->pp_align);
+
+ if (hwc->pp_align_vertical != -1)
+ *aligned_height = ROUNDUP(*aligned_height, hwc->pp_align_vertical);
+}
+
EINTERN Eina_Bool
e_hwc_windows_zoom_set(E_Hwc *hwc, Eina_Rectangle *rect)
{
ret = tdm_pp_set_done_handler(hwc->tpp, _e_hwc_windows_pp_commit_handler, hwc);
EINA_SAFETY_ON_FALSE_GOTO(ret == TDM_ERROR_NONE, fail);
+
+ tdm_display_get_pp_available_size(e_comp_screen->tdisplay,
+ &hwc->pp_minw, &hwc->pp_minh,
+ &hwc->pp_maxw, &hwc->pp_maxh,
+ &hwc->pp_align);
+ tdm_display_get_pp_preferred_align_vertical(e_comp_screen->tdisplay, &hwc->pp_align_vertical);
}
if (!hwc->pp_tqueue)
{
+ _e_hwc_windows_zoom_pp_aligned_value_get(hwc, &w, &h);
//TODO: Does e20 get the buffer flags from the tdm backend?
hwc->pp_tqueue = tbm_surface_queue_create(3, w, h, TBM_FORMAT_ARGB8888, TBM_BO_SCANOUT);
if (!hwc->pp_tqueue)