Revert "virtual (client): Added implementation for setting available format."
[platform/core/uifw/libtdm.git] / client / tdm_client.c
index 9aac858..92b1626 100644 (file)
@@ -97,12 +97,6 @@ typedef struct _tdm_private_client_voutput {
        struct
        {
                int count;
-               tbm_format *formats;
-       } available_formats;
-
-       struct
-       {
-               int count;
                tdm_client_output_mode *modes;
        } available_modes;
 
@@ -1792,9 +1786,6 @@ tdm_client_voutput_destroy(tdm_client_voutput *voutput)
        if (private_voutput->available_modes.modes)
                free(private_voutput->available_modes.modes);
 
-       if (private_voutput->available_formats.formats)
-               free(private_voutput->available_formats.formats);
-
        LIST_FOR_EACH_ENTRY_SAFE(h, hh, &private_voutput->commit_handler_list, link) {
                LIST_DEL(&h->link);
                free(h);
@@ -1835,35 +1826,6 @@ tdm_client_voutput_set_available_modes(tdm_client_voutput *voutput, const tdm_cl
 }
 
 tdm_error
-tdm_client_voutput_set_available_formats(tdm_client_voutput *voutput, const tbm_format *formats, const int count)
-{
-       tdm_private_client_voutput *private_voutput;
-
-       TDM_RETURN_VAL_IF_FAIL(voutput != NULL, TDM_ERROR_INVALID_PARAMETER);
-
-       if ((count > 0) && (formats == NULL))
-               return TDM_ERROR_INVALID_PARAMETER;
-
-       private_voutput = (tdm_private_client_voutput *)voutput;
-
-       if (private_voutput->base.connection == TDM_OUTPUT_CONN_STATUS_CONNECTED)
-               return TDM_ERROR_BAD_REQUEST;
-
-       if (private_voutput->available_formats.formats)
-               free(private_voutput->available_formats.formats);
-
-       private_voutput->available_formats.count = count;
-
-       if (count != 0)
-       {
-               private_voutput->available_formats.formats = calloc(count, sizeof(tbm_format));
-               memcpy(private_voutput->available_formats.formats, formats, sizeof(tbm_format) * count);
-       }
-
-       return TDM_ERROR_NONE;
-}
-
-tdm_error
 tdm_client_voutput_set_physical_size(tdm_client_voutput *voutput, unsigned int mmWidth, unsigned int mmHeight)
 {
        tdm_private_client_voutput *private_voutput;
@@ -2011,23 +1973,6 @@ tdm_client_output_set_mode(tdm_client_output *output, const tdm_client_output_mo
 }
 
 void
-_tdm_client_voutput_send_available_formats(tdm_private_client_voutput *private_voutput)
-{
-       tbm_format *format;
-       struct wl_array array;
-       int i, size;
-
-       size = sizeof(tbm_format);
-       wl_array_init(&array);
-       for (i = 0; i < private_voutput->available_formats.count; i++) {
-               format = wl_array_add(&array, size);
-               *format = private_voutput->available_formats.formats[i];
-       }
-       wl_tdm_voutput_set_available_formats(private_voutput->wl_voutput, &array);
-        wl_array_release(&array);
-}
-
-void
 _tdm_client_voutput_send_available_modes(tdm_private_client_voutput *private_voutput)
 {
        tdm_client_output_mode *modes, *mode;
@@ -2063,7 +2008,6 @@ tdm_client_output_connect(tdm_client_output *output)
        private_output->connection = TDM_OUTPUT_CONN_STATUS_CONNECTED;
 
        _tdm_client_voutput_send_available_modes(private_voutput);
-       _tdm_client_voutput_send_available_formats(private_voutput);
 
        wl_tdm_voutput_set_physical_size(private_voutput->wl_voutput, private_voutput->mmwidth, private_voutput->mmheight);