hwc: modify the some symbol 21/192821/1
authorSooChan Lim <sc1.lim@samsung.com>
Fri, 9 Nov 2018 10:21:35 +0000 (19:21 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Fri, 9 Nov 2018 10:21:35 +0000 (19:21 +0900)
change tdm_hwc_accept_changes to tdm_hwc_accept_validation
add the prefix TDM_HWC_ instead TDM_

Change-Id: I909695e485e1bfab32eb290ce6a8450b301862c4

haltests/src/tc_tdm_hwc.cpp
haltests/src/tc_tdm_hwc_window.cpp
include/tdm.h
include/tdm_backend.h
include/tdm_types.h
src/tdm_hwc.c
src/tdm_hwc_window.c

index 4df9e54..541414f 100644 (file)
@@ -378,12 +378,12 @@ TEST_P(TDMHwc, GetChangedCompositionTypesFailNull)
        }
 }
 
-/* tdm_error tdm_hwc_accept_changes() */
+/* tdm_error tdm_hwc_accept_validation() */
 TEST_P(TDMHwc, AcceptChangesFailNull)
 {
        TDM_UT_SKIP_FLAG(has_outputs);
 
-       error = tdm_hwc_accept_changes(NULL);
+       error = tdm_hwc_accept_validation(NULL);
        ASSERT_NE(TDM_ERROR_NONE, error);
 }
 
@@ -395,10 +395,10 @@ TEST_P(TDMHwc, AcceptChangesFailNoHwc)
        for (int o = 0; o < output_count; o++) {
                hwc = tdm_output_get_hwc(outputs[o], &error);
                if (hwc) {
-                       error = tdm_hwc_accept_changes(hwc);
+                       error = tdm_hwc_accept_validation(hwc);
                        ASSERT_NE(TDM_ERROR_NONE, error);
                } else {
-                       error = tdm_hwc_accept_changes(hwc);
+                       error = tdm_hwc_accept_validation(hwc);
                        ASSERT_NE(TDM_ERROR_NONE, error);
                }
        }
@@ -422,7 +422,7 @@ TEST_P(TDMHwc, AcceptChangesSuccessful)
                        for (int w = 0; w < HWC_WIN_NUM; w++) {
                                hwc_wnds[w] = tdm_hwc_create_window(hwc, &error);
                                ASSERT_EQ(TDM_ERROR_NONE, error);
-                               error = tdm_hwc_window_set_composition_type(hwc_wnds[w], TDM_COMPOSITION_DEVICE);
+                               error = tdm_hwc_window_set_composition_type(hwc_wnds[w], TDM_HWC_WIN_COMPOSITION_DEVICE);
                                ASSERT_EQ(TDM_ERROR_NONE, error);
                        }
 
@@ -437,7 +437,7 @@ TEST_P(TDMHwc, AcceptChangesSuccessful)
                                ASSERT_EQ(TDM_ERROR_NONE, error);
                                ASSERT_EQ(get_num, num_types);
 
-                               error =  tdm_hwc_accept_changes(hwc);
+                               error =  tdm_hwc_accept_validation(hwc);
                                ASSERT_EQ(TDM_ERROR_NONE, error);
 
                                free(composition_types);
@@ -479,7 +479,7 @@ TEST_P(TDMHwc, CommitSuccessful)
                        for (int w = 0; w < HWC_WIN_NUM; w++) {
                                hwc_wnds[w] = tdm_hwc_create_window(hwc, &error);
                                ASSERT_EQ(TDM_ERROR_NONE, error);
-                               error = tdm_hwc_window_set_composition_type(hwc_wnds[w], TDM_COMPOSITION_DEVICE);
+                               error = tdm_hwc_window_set_composition_type(hwc_wnds[w], TDM_HWC_WIN_COMPOSITION_DEVICE);
                                ASSERT_EQ(TDM_ERROR_NONE, error);
                        }
 
@@ -494,7 +494,7 @@ TEST_P(TDMHwc, CommitSuccessful)
                                ASSERT_EQ(TDM_ERROR_NONE, error);
                                ASSERT_EQ(get_num, num_types);
 
-                               error =  tdm_hwc_accept_changes(hwc);
+                               error =  tdm_hwc_accept_validation(hwc);
                                ASSERT_EQ(TDM_ERROR_NONE, error);
 
                                free(composition_types);
index 1e704a7..3f91ace 100644 (file)
@@ -150,7 +150,7 @@ TEST_P(TDMHwcWindow, SetCompositionTypeFailNull)
 
        tdm_error error = TDM_ERROR_NONE;
 
-       error = tdm_hwc_window_set_composition_type(NULL, TDM_COMPOSITION_DEVICE);
+       error = tdm_hwc_window_set_composition_type(NULL, TDM_HWC_WIN_COMPOSITION_DEVICE);
        ASSERT_NE(TDM_ERROR_NONE, error);
 }
 
@@ -167,7 +167,7 @@ TEST_P(TDMHwcWindow, SetCompositionTypeFailInvalieCompositionType)
                if (hwc) {
                        hwc_win = tdm_hwc_create_window(hwc, &error);
                        ASSERT_NE(NULL, hwc_win);
-                       error = tdm_hwc_window_set_composition_type(hwc_win, tdm_hwc_window_composition(TDM_COMPOSITION_NONE - 1));
+                       error = tdm_hwc_window_set_composition_type(hwc_win, tdm_hwc_window_composition(TDM_HWC_WIN_COMPOSITION_NONE - 1));
                        ASSERT_NE(TDM_ERROR_NONE, error);
                        tdm_hwc_window_destroy(hwc_win);
                }
@@ -192,11 +192,11 @@ TEST_P(TDMHwcWindow, SetCompositionTypeSuccessful)
                        }
 
                        for (w = 0; w < HWC_WIN_NUM; w++) {
-                               error = tdm_hwc_window_set_composition_type(hwc_wins[w], TDM_COMPOSITION_DEVICE);
+                               error = tdm_hwc_window_set_composition_type(hwc_wins[w], TDM_HWC_WIN_COMPOSITION_DEVICE);
                                ASSERT_EQ(TDM_ERROR_NONE, error);
-                               error = tdm_hwc_window_set_composition_type(hwc_wins[w], TDM_COMPOSITION_CLIENT);
+                               error = tdm_hwc_window_set_composition_type(hwc_wins[w], TDM_HWC_WIN_COMPOSITION_CLIENT);
                                ASSERT_EQ(TDM_ERROR_NONE, error);
-                               error = tdm_hwc_window_set_composition_type(hwc_wins[w], TDM_COMPOSITION_CURSOR);
+                               error = tdm_hwc_window_set_composition_type(hwc_wins[w], TDM_HWC_WIN_COMPOSITION_CURSOR);
                                ASSERT_EQ(TDM_ERROR_NONE, error);
                        }
 
index 169fd7c..538592b 100644 (file)
@@ -943,7 +943,7 @@ tdm_hwc_get_client_target_buffer_queue(tdm_hwc *hwc, tdm_error *error);
  * @brief Set the client(relative to the TDM) target buffer
  * @details This function lets the backend know the target buffer.
  * The target buffer contains the result of the gl composition with the
- * tdm_hwc_windows which marked as TDM_COMPOSITION_CLIENT.
+ * tdm_hwc_windows which marked as TDM_HWC_WIN_COMPOSITION_CLIENT.
  * @param[in] hwc A output hwc
  * @param[in] target_buffer The new target buffer
  * @param[in] damage The buffer damage region
@@ -979,7 +979,7 @@ tdm_hwc_validate(tdm_hwc *hwc, tdm_hwc_window **composited_wnds, uint32_t num_wn
  * @details Retrieves the windows for which the backend requires a different
  * composition types that had been set prior to the last call to tdm_hwc_validate().
  * The client will either update its state with these types and call
- * tdm_hwc_accept_changes, or will set new types and attempt to validate the
+ * tdm_hwc_accept_validation, or will set new types and attempt to validate the
  * display again. The number of elements returned must be the same as the
  * value returned in num_types from the last call to tdm_hwc_validate().
  * @param[in] hwc A hwc object
@@ -997,15 +997,15 @@ tdm_hwc_get_changed_composition_types(tdm_hwc *hwc, uint32_t *num_elements,
                                                                        tdm_hwc_window_composition *composition_types);
 
 /**
- * @brief Accepts the changes required by the backend
- * @details Accepts the changes required by the backend from the previous
+ * @brief Accepts the validation required by the backend
+ * @details Accepts the validation required by the backend from the previous
  * tdm_hwc_validate() and tdm_hwc_get_chaged_composition_types().
  * @param[in] hwc A hwc object
  * @return #TDM_ERROR_NONE if success. Otherwise, error value.
  * @since 2.0.0
  */
 tdm_error
-tdm_hwc_accept_changes(tdm_hwc *hwc);
+tdm_hwc_accept_validation(tdm_hwc *hwc);
 
 /**
  * @brief Commit changes for a hwc
index 675d9c4..2de78c0 100644 (file)
@@ -836,7 +836,7 @@ typedef struct _tdm_func_hwc {
         * @brief Set the client(relative to the TDM) target buffer
         * @details This function lets the backend know the target buffer.
         * The target buffer contains the result of the gl composition with the
-        * tdm_hwc_windows which marked as TDM_COMPOSITION_CLIENT.
+        * tdm_hwc_windows which marked as TDM_HWC_WIN_COMPOSITION_CLIENT.
         * @param[in] hwc A hwc object
         * @param[in] target_buffer The new target buffer
         * @param[in] damage The buffer damage region
@@ -872,7 +872,7 @@ typedef struct _tdm_func_hwc {
         * @details Retrieves the windows for which the backend requires a different
         * composition types that had been set prior to the last call to tdm_hwc_validate().
         * The client will either update its state with these types and call
-        * tdm_hwc_accept_changes, or will set new types and attempt to validate the
+        * tdm_hwc_accept_validation, or will set new types and attempt to validate the
         * display again. The number of elements returned must be the same as the
         * value returned in num_types from the last call to tdm_hwc_validate().
         * @param[in] hwc A hwc object
@@ -887,14 +887,14 @@ typedef struct _tdm_func_hwc {
                                                                                                   tdm_hwc_window **hwc_window,
                                                                                                   tdm_hwc_window_composition *composition_types);
        /**
-        * @brief Accepts the changes required by the backend
-        * @details Accepts the changes required by the backend from the previous
+        * @brief Accepts the validation required by the backend
+        * @details Accepts the validation required by the backend from the previous
         * tdm_hwc_validate() and tdm_hwc_get_chaged_composition_types().
         * @param[in] hwc A hwc object
         * @return #TDM_ERROR_NONE if success. Otherwise, error value.
         * @since 2.0.0
         */
-       tdm_error (*hwc_accept_changes)(tdm_hwc *hwc);
+       tdm_error (*hwc_accept_validation)(tdm_hwc *hwc);
 
        /**
         * @brief Commit changes for a hwc object
index 24423d3..d9ab984 100644 (file)
@@ -165,19 +165,19 @@ typedef enum {
         *
         * The backend ignores windows of this type.
         */
-       TDM_COMPOSITION_NONE = 0,
+       TDM_HWC_WIN_COMPOSITION_NONE = 0,
 
        /** The compostion type for an window to be compsoited by the client.
         *
         * When the client sets this composition type,
         * the backend MUST NOT modify this composition type into other types.
         *
-        * When the backend changes TDM_COMPOSITION_DEVICE or TDM_COMPOSITION_CURSOR
+        * When the backend changes TDM_HWC_WIN_COMPOSITION_DEVICE or TDM_HWC_WIN_COMPOSITION_CURSOR
         * to this composition type at the time of tdm_hwc_validate and
         * tdm_hwc_get_changed_composition_types,
         * the client has to composite this window with gl or other drawing operations.
         */
-       TDM_COMPOSITION_CLIENT = 1,
+       TDM_HWC_WIN_COMPOSITION_CLIENT = 1,
 
        /** The compostion type for an window to be set to the hw overlay.
         *
@@ -186,40 +186,40 @@ typedef enum {
         * Nomally, the backend leave it if the backend sets the window to the hw overlay.
         * If the backend does not set the window to the hw overlay at the time of
         * tdm_hwc_validate, the backend changes the composition type of the window into
-        * TDM_COMPOSITION_CLIENT.
+        * TDM_HWC_WIN_COMPOSITION_CLIENT.
         */
-       TDM_COMPOSITION_DEVICE = 3,
+       TDM_HWC_WIN_COMPOSITION_DEVICE = 3,
 
        /** The compostion type for an window to be set to the cursor hw overlay.
         *
         * The client sets this composition type to the cursor window before requesting
         * the tdm_hwc_validate.
         * If the backend does not support the cursor hw overlay, the backend can change
-        * the comopsition type into the TDM_COMPOSITION_CLIENT.
+        * the comopsition type into the TDM_HWC_WIN_COMPOSITION_CLIENT.
         */
-       TDM_COMPOSITION_CURSOR = 4,
+       TDM_HWC_WIN_COMPOSITION_CURSOR = 4,
 
        /** The compostion type for an window to be set to the video hw overlay.
         *
         * The client sets this composition type to the video window before requesting
         * the tdm_hwc_validate.
         * If the backend does not support the video hw overlay, the backend can change
-        * the comopsition type into the TDM_COMPOSITION_CLIENT.
+        * the comopsition type into the TDM_HWC_WIN_COMPOSITION_CLIENT.
         * Normally, this VIDEO window displays under the primary hw overlayer of the output.
         */
-       TDM_COMPOSITION_VIDEO = 5,
+       TDM_HWC_WIN_COMPOSITION_VIDEO = 5,
 } tdm_hwc_window_composition;
 
 typedef enum {
-       TDM_CONSTRAINT_NONE = 0,
+       TDM_HWC_WIN_CONSTRAINT_NONE = 0,
        /** If the client needs to render to a specific buffer for compositing
-        *  with TDM_COMPOSITION_DEVICE, the backend needs to set
-        *  TDM_CONSTRAINT_BUFFER_QUEUE to hwc_window until the hwc_window is not
-        *  TDM_COMPOSITION_DEVICE. The client gets the tbm_surface_queue_h through
+        *  with TDM_HWC_WIN_COMPOSITION_DEVICE, the backend needs to set
+        *  TDM_HWC_WIN_CONSTRAINT_BUFFER_QUEUE to hwc_window until the hwc_window is not
+        *  TDM_HWC_WIN_COMPOSITION_DEVICE. The client gets the tbm_surface_queue_h through
         *  the tdm_hwc_window_aquire_buffer_queue. It will render the frames on
         *  the buffers which gets from the tbm_surface_queue_h.
         */
-       TDM_CONSTRAINT_BUFFER_QUEUE = (1 << 0),
+       TDM_HWC_WIN_CONSTRAINT_BUFFER_QUEUE = (1 << 0),
 } tdm_hwc_window_constraint;
 
 /**
index 49d4ca9..013eb34 100644 (file)
@@ -452,7 +452,7 @@ tdm_hwc_get_changed_composition_types(tdm_hwc *hwc, uint32_t *num_elements,
 }
 
 EXTERN tdm_error
-tdm_hwc_accept_changes(tdm_hwc *hwc)
+tdm_hwc_accept_validation(tdm_hwc *hwc)
 {
        tdm_private_module *private_module;
        tdm_func_hwc *func_hwc = NULL;
@@ -472,7 +472,7 @@ tdm_hwc_accept_changes(tdm_hwc *hwc)
                /* LCOV_EXCL_STOP */
        }
 
-       ret = func_hwc->hwc_accept_changes(private_hwc->hwc_backend);
+       ret = func_hwc->hwc_accept_validation(private_hwc->hwc_backend);
 
        _pthread_mutex_unlock(&private_display->lock);
 
index ce04c51..9248ff5 100644 (file)
@@ -260,8 +260,8 @@ tdm_hwc_window_set_composition_type(tdm_hwc_window *hwc_window,
        tdm_func_hwc_window *func_hwc_window = NULL;
 
        HWC_WINDOW_FUNC_ENTRY();
-       TDM_RETURN_VAL_IF_FAIL(composition_type >= TDM_COMPOSITION_NONE, TDM_ERROR_INVALID_PARAMETER);
-       TDM_RETURN_VAL_IF_FAIL(composition_type <= TDM_COMPOSITION_VIDEO, TDM_ERROR_INVALID_PARAMETER);
+       TDM_RETURN_VAL_IF_FAIL(composition_type >= TDM_HWC_WIN_COMPOSITION_NONE, TDM_ERROR_INVALID_PARAMETER);
+       TDM_RETURN_VAL_IF_FAIL(composition_type <= TDM_HWC_WIN_COMPOSITION_VIDEO, TDM_ERROR_INVALID_PARAMETER);
 
        _pthread_mutex_lock(&private_display->lock);