}
}
-/* 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);
}
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);
}
}
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);
}
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);
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);
}
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);
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);
}
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);
}
}
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);
}
* @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
* @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
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
* @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
* @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
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
*
* 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.
*
* 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;
/**
}
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;
/* 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);
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);