tbm_surface_info_s tsurface_info;
tbm_surface_error_e ret = TBM_SURFACE_ERROR_NONE;
int img_w, img_h, new_w, new_h;
- tbm_format new_format;
+ tbm_format format;
unsigned int flags = TBM_BO_SCANOUT;
void *src_ptr = NULL, *dst_ptr = NULL;
int src_stride;
img_w = hwc_window_data->cursor_img.width;
img_h = hwc_window_data->cursor_img.height;
- new_format = hwc_window_data->info.src_config.format;
-
- /* cursor restriction to set the cursor layer */
- new_w = (CURSOR_MIN_W > img_w) ? CURSOR_MIN_W : img_w;
- new_h = (CURSOR_MIN_H > img_h) ? CURSOR_MIN_H : img_h;
+ format = hwc_window_data->info.src_config.format;
if (hwc_data->cursor_tsurface) {
tbm_surface_internal_unref(hwc_data->cursor_tsurface);
hwc_data->cursor_tsurface = NULL;
}
- cursor_tsurface = tbm_surface_internal_create_with_flags(new_w, new_h, new_format, flags);
+ cursor_tsurface = tbm_surface_internal_create_with_flags(img_w, img_h, format, flags);
RETURN_VAL_IF_FAIL(cursor_tsurface, 0);
hwc_data->cursor_tsurface = cursor_tsurface;
hwc_window_data->cursor_img_surface = 1;
/* fix the dst_pos info of the cursor window */
- hwc_window_data->info.src_config.pos.w = new_w;
- hwc_window_data->info.src_config.pos.h = new_h;
- hwc_window_data->info.dst_pos.w = new_w;
- hwc_window_data->info.dst_pos.h = new_h;
+ hwc_window_data->info.src_config.pos.w = img_w;
+ hwc_window_data->info.src_config.pos.h = img_h;
+ hwc_window_data->info.dst_pos.w = img_w;
+ hwc_window_data->info.dst_pos.h = img_h;
hwc_window_data->cursor_img_refresh = 0;
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
-#define CURSOR_MIN_W 192
-#define CURSOR_MIN_H 192
-#define CURSOR_MAX_W 192
-#define CURSOR_MAX_H 192
-
#define RETURN_VAL_IF_FAIL(cond, val) {\
if (!(cond)) {\
TDM_ERR("'%s' failed", #cond);\