int mm_evas_renderer_set_geometry(MMHandleType handle, int mode);
int mm_evas_renderer_get_geometry(MMHandleType handle, int *mode);
/* set and get coordinate and resolution value for the destination */
-/* it would be better not to call set_geometry for DISP_GEO_METHOD_CUSTOM_ROI */
+/* DISP_GEO_METHOD_CUSTOM_ROI should be set before */
int mm_evas_renderer_set_roi_area(MMHandleType handle, int x, int y, int w, int h);
int mm_evas_renderer_get_roi_area(MMHandleType handle, int *x, int *y, int *w, int *h);
/* set and get flip value */
goto ERROR;
}
- LOGD("src size(%d), dst size(%d)", src_info.size, dst_info.size);
+ if (src_info.size != dst_info.size) {
+ LOGE("src size(%d), dst size(%d)!!!", src_info.size, dst_info.size);
+ if (tbm_surface_unmap(src_tbm_surf))
+ LOGW("[src] unmap is failed");
+ if (tbm_surface_unmap(flush_buffer->tbm_surf))
+ LOGW("[dst] unmap is failed");
+ goto ERROR;
+ }
/* copy buffer */
switch (src_info.format) {
return MM_ERROR_RESOURCE_NOT_INITIALIZED;
}
if (!w || !h) {
- LOGW("invalid resolution");
+ LOGE("invalid resolution");
+ return MM_ERROR_INVALID_ARGUMENT;
+ }
+ if (evas_info->display_geometry_method != DISP_GEO_METHOD_CUSTOM_ROI) {
+ LOGE("invalid mode");
return MM_ERROR_INVALID_ARGUMENT;
}
- /* display mode is set to DISP_GEO_METHOD_CUSTOM_ROI internally */
- if (evas_info->display_geometry_method != DISP_GEO_METHOD_CUSTOM_ROI)
+ if (evas_info->dst_roi.x != x || evas_info->dst_roi.y != y
+ || evas_info->dst_roi.w != w || evas_info->dst_roi.h != h) {
evas_info->update_needed = TRUE;
- evas_info->display_geometry_method = DISP_GEO_METHOD_CUSTOM_ROI;
- evas_info->dst_roi.x = x;
- evas_info->dst_roi.y = y;
- evas_info->dst_roi.w = w;
- evas_info->dst_roi.h = h;
+ evas_info->dst_roi.x = x;
+ evas_info->dst_roi.y = y;
+ evas_info->dst_roi.w = w;
+ evas_info->dst_roi.h = h;
+ }
/* pipe_write could be needed because ratio can be changed on pause state */
if (evas_info->epipe) {
return MM_ERROR_RESOURCE_NOT_INITIALIZED;
}
if (evas_info->display_geometry_method != DISP_GEO_METHOD_CUSTOM_ROI) {
- LOGW("invalid mode");
+ LOGE("invalid mode");
return MM_ERROR_INVALID_ARGUMENT;
}