return tbm_surface_get_format(tbm_surf);
}
-static void
+static Eina_Bool
_e_video_hwc_geometry_input_rect_get_with_viewport(E_Surface *surface, Eina_Rectangle *out)
{
struct ds_fbox source_box;
e_surface_buffer_source_box_get(surface, &source_box);
+ if (source_box.width == 0.0 || source_box.height == 0.0)
+ return EINA_FALSE;
out->x = (int)source_box.x;
out->y = (int)source_box.y;
out->h = (int)source_box.height;
VIN("buffer source box(%d %d %d %d)", e_surface_ec_get(surface), out->x, out->y, out->w, out->h);
+
+ return EINA_TRUE;
}
static void
{
E_Surface *surface = e_surface_from_ec(ec);
- _e_video_hwc_geometry_input_rect_get_with_viewport(surface, &out->input_r);
+ if (!_e_video_hwc_geometry_input_rect_get_with_viewport(surface, &out->input_r))
+ {
+ VER("Failed to get input rectangle", ec);
+ return EINA_FALSE;
+ }
+
_e_video_hwc_geometry_output_rect_get(ec, &out->output_r);
out->transform = e_surface_buffer_transform_get(surface);