remove cursor min size 12/251812/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Fri, 15 Jan 2021 05:02:30 +0000 (14:02 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Fri, 15 Jan 2021 07:16:16 +0000 (16:16 +0900)
nexell support all size

Change-Id: Iecde9160146f022ec8ff9ed28210477d86c1e9d7

src/tdm_nexell_hwc.c
src/tdm_nexell_types.h

index 58dc3ac08140621eef62f3a55c39946cef22f38c..58d983f0dee921a08a7798e67bf6d1aecbb62e40 100644 (file)
@@ -65,8 +65,8 @@ _nexell_hwc_cursor_buffer_set(tdm_nexell_hwc_data *hwc_data, tdm_nexell_hwc_wind
        tbm_surface_h cursor_tsurface = NULL;
        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;
+       int img_w, img_h;
+       tbm_format format;
        unsigned int flags = TBM_BO_SCANOUT;
        void *src_ptr = NULL, *dst_ptr = NULL;
        int src_stride;
@@ -79,18 +79,14 @@ _nexell_hwc_cursor_buffer_set(tdm_nexell_hwc_data *hwc_data, tdm_nexell_hwc_wind
 
        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;
@@ -120,10 +116,10 @@ _nexell_hwc_cursor_buffer_set(tdm_nexell_hwc_data *hwc_data, tdm_nexell_hwc_wind
        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;
 
index 9a0f5cd794ba2716ebfc286109861eeda3995509..822cb056d7e723d00adc603cc23bbc2a70701b0c 100644 (file)
 
 #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 NUM_BUFFERS    3
 
 #define NUM_LAYERS     3