return hwc_window->device_state_available;
}
+static Eina_Bool
+_e_hwc_window_client_transform_device_state_available_get(E_Client *ec)
+{
+ E_Map *map;
+ int x[4], y[4], z[4];
+ int i;
+
+ if (!e_client_transform_core_enable_get(ec))
+ return EINA_TRUE;
+
+ map = e_client_map_get(ec);
+ if (!map) return EINA_TRUE;
+
+ for (i = 0; i < 4; i++)
+ {
+ if (!e_map_point_coord_get(map, i, &x[i], &y[i], &z[i]))
+ return EINA_FALSE;
+ }
+
+ /* check 2D */
+ if ((z[0] != z[1]) || (z[0] != z[2]) || (z[0] != z[3]))
+ return EINA_FALSE;
+
+ /* check rectangle */
+ if ((x[0] != x[3]) || (x[1] != x[2]))
+ return EINA_FALSE;
+
+ if ((y[0] != y[1]) || (y[2] != y[3]))
+ return EINA_FALSE;
+
+ return EINA_TRUE;
+}
+
// if ec has invalid buffer or scaled( transformed ) or forced composite(never_hwc)
EINTERN Eina_Bool
e_hwc_window_device_state_available_update(E_Hwc_Window *hwc_window)
Eina_Bool available = EINA_TRUE;
E_Hwc_Window_Restriction restriction = E_HWC_WINDOW_RESTRICTION_NONE;
E_Desk *desk;
- int count;
EINA_SAFETY_ON_NULL_RETURN_VAL(hwc_window, EINA_FALSE);
goto finish;
}
- if (e_client_transform_core_enable_get(ec))
+ if (!_e_hwc_window_client_transform_device_state_available_get(ec))
{
- /* allow device if ec has only transform of base_output_resolution */
- count = e_client_transform_core_transform_count_get(ec);
- if ((!ec->base_output_resolution.transform) || (count > 1))
- {
- restriction = E_HWC_WINDOW_RESTRICTION_TRANSFORM;
- available = EINA_FALSE;
- goto finish;
- }
+ restriction = E_HWC_WINDOW_RESTRICTION_TRANSFORM;
+ available = EINA_FALSE;
+ goto finish;
}
switch (cdata->buffer_ref.buffer->type)