e_output: set available size of cursor 14/99714/4
authorChangyeon Lee <cyeon.lee@samsung.com>
Thu, 17 Nov 2016 09:49:49 +0000 (18:49 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Tue, 29 Nov 2016 12:18:43 +0000 (04:18 -0800)
- if size of cursor less then minmum size,
  e_plane_renderer create hwc buffer with minimum size.

Change-Id: Ia40e7af0a3a3511b9ccd78f62e9388d226ed5e05

src/bin/e_output.c
src/bin/e_output.h

index b43de44453eca86e20a35a9e3dfdff6baa4de16d..10528bd24ba0720767148f2a39678a8f38a79c66 100644 (file)
@@ -223,6 +223,7 @@ e_output_new(E_Comp_Screen *e_comp_screen, int index)
    int i;
    int size = 0;
    tdm_output_type output_type;
+   int min_w, min_h, max_w, max_h, preferred_align;
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, NULL);
 
@@ -241,6 +242,24 @@ e_output_new(E_Comp_Screen *e_comp_screen, int index)
    error = tdm_output_get_output_type(toutput, &output_type);
    if (error != TDM_ERROR_NONE) goto fail;
 
+   error = tdm_output_get_cursor_available_size(toutput, &min_w, &min_h, &max_w, &max_h, &preferred_align);
+   if (error == TDM_ERROR_NONE)
+     {
+        output->cursor_available.min_w = min_w;
+        output->cursor_available.min_h = min_h;
+        output->cursor_available.max_w = min_w;
+        output->cursor_available.max_h = min_h;
+        output->cursor_available.preferred_align = preferred_align;
+     }
+   else
+     {
+        output->cursor_available.min_w = -1;
+        output->cursor_available.min_h = -1;
+        output->cursor_available.max_w = -1;
+        output->cursor_available.max_h = -1;
+        output->cursor_available.preferred_align = -1;
+     }
+
    name = _output_type_to_str(output_type);
    size = strlen(name) + 4;
 
index db8b7d18b3b6e96414d1e1bda6fb2a2a73349393..47decb06d79819e048de87e4a29c520c08148356 100644 (file)
@@ -60,6 +60,12 @@ struct _E_Output
 
    E_Comp_Screen        *e_comp_screen;
    E_OUTPUT_DPMS        dpms;
+
+   struct {
+       int min_w, min_h;
+       int max_w, max_h;
+       int preferred_align;
+   } cursor_available;
 };
 
 EINTERN Eina_Bool         e_output_init(void);