use tdm_output_hwc_ prefix for the frontend symbols.
use output_hwc_ prefix for the backend symbols.
* @return A created window object
*/
tdm_hwc_window *
-tdm_output_create_hwc_window(tdm_output *output, tdm_error *error);
+tdm_output_hwc_create_window(tdm_output *output, tdm_error *error);
/**
* @brief Destroys the given window.
* @return #TDM_ERROR_NONE if success. Otherwise, error value.
*/
tdm_error
-tdm_output_destroy_hwc_window(tdm_output *output, tdm_hwc_window *hwc_window);
+tdm_output_hwc_destroy_window(tdm_output *output, tdm_hwc_window *hwc_window);
/**
* @brief Set the client(relative to the TDM) target buffer
* Will be called before tdm_output_commit() if any of the layers are marked as
* TDM_COMPOSITION_CLIENT or TDM_COMPOSITION_DEVICE_CANDIDATE. If no layers are
* so marked, then it is not necessary to call this function. It is not necessary
- * to call tdm_output_validate() after changing the target through this function.
+ * to call tdm_output_hwc_validate() after changing the target through this function.
* @param[in] output A output object
* @param[in] target The new target buffer
* @param[in] damage The surface damage region
* @return #TDM_ERROR_NONE if success. Otherwise, error value.
*/
tdm_error
-tdm_output_set_client_target_buffer(tdm_output *output, tbm_surface_h target,
+tdm_output_hwc_set_client_target_buffer(tdm_output *output, tbm_surface_h target,
tdm_hwc_region damage);
/**
* @param[in] output A output object
* @param[out] num_types The number of composition type changes required by
* the device; if greater than 0, the client must either set and validate new
- * types, or call tdm_output_accept_changes() to accept the changes returned by
- * tdm_output_get_changed_composition_types(); must be the same as the number of
- * changes returned by tdm_output_get_changed_composition_types (see the
+ * types, or call tdm_output_hwc_accept_changes() to accept the changes returned by
+ * tdm_output_hwc_get_changed_composition_types(); must be the same as the number of
+ * changes returned by tdm_output_hwc_get_changed_composition_types (see the
* declaration of that function for more information); pointer will be non-NULL
* @return #TDM_ERROR_NONE if success. Otherwise, error value.
*/
tdm_error
-tdm_output_validate(tdm_output *output, uint32_t *num_types);
+tdm_output_hwc_validate(tdm_output *output, uint32_t *num_types);
/**
* @brief Set the 'need to validate' handler for the 'output'
*
* @details During backend's work it may need to ask for the revalidation
- * (make client (E20) do tdm_output_validate() again), so a 'hndl' will
+ * (make client (E20) do tdm_output_hwc_validate() again), so a 'hndl' will
* be called as such need happen. Only one handler per output is supported.
*
* @param[in] output The output object a hndl is going to be registered for.
* @return #TDM_ERROR_NONE if success. Otherwise, error value.
*/
tdm_error
-tdm_output_set_need_validate_handler(tdm_output *output,
+tdm_output_hwc_set_need_validate_handler(tdm_output *output,
tdm_output_need_validate_handler hndl);
/**
* @brief Get changed composition types
* @details Retrieves the windows for which the device requires a different
- * composition type than had been set prior to the last call to tdm_output_validate().
+ * composition type than had been set prior to the last call to tdm_output_hwc_validate().
* The client will either update its state with these types and call
- * tdm_output_accept_changes, or will set new types and attempt to validate the
+ * tdm_output_hwc_accept_changes, or will set new types and attempt to validate the
* display again.
* windows and types may be NULL to retrieve the number of elements which
* will be returned. The number of elements returned must be the same as the
- * value returned in num_types from the last call to tdm_output_validate().
+ * value returned in num_types from the last call to tdm_output_hwc_validate().
* @param[in] output A output object
* @param[out] num_elements If windows or types were NULL, the number of layers
* and types which would have been returned; if both were non-NULL, the
* @return #TDM_ERROR_NONE if success. Otherwise, error value.
*/
tdm_error
-tdm_output_get_changed_composition_types(tdm_output *output,uint32_t *num_elements,
+tdm_output_hwc_get_changed_composition_types(tdm_output *output,uint32_t *num_elements,
tdm_hwc_window **hwc_window,
tdm_hwc_window_composition_t *composition_types);
/**
* @brief Accepts the changes required by the device
* @details Accepts the changes required by the device from the previous
- * tdm_output_validate() call (which may be queried using
+ * tdm_output_hwc_validate() call (which may be queried using
* tdm_output_get_chaged_composition_types()) and revalidates the display. This
* function is equivalent to requesting the changed types from
* tdm_output_get_chaged_composition_types(), setting those types on the
- * corresponding windows, and then calling tdm_output_validate again.
+ * corresponding windows, and then calling tdm_output_hwc_validate again.
* After this call it must be valid to present this display. Calling this after
- * tdm_output_validate() returns 0 changes must succeed with TDM_ERROR_NONE, but
+ * tdm_output_hwc_validate() returns 0 changes must succeed with TDM_ERROR_NONE, but
* should have no other effect.
* @param[in] output A output object
* @return #TDM_ERROR_NONE if success. Otherwise, error value.
*/
tdm_error
-tdm_output_accept_changes(tdm_output *output);
+tdm_output_hwc_accept_changes(tdm_output *output);
/**
* @brief Get a target surface queue
* @return A surface queue
*/
tbm_surface_queue_h
-tdm_output_get_target_surface_queue(tdm_output *output, tdm_error *error);
+tdm_output_hwc_get_target_surface_queue(tdm_output *output, tdm_error *error);
/**
* @brief Get the capabilities of a layer object.
/**
* @brief Sets the desired composition type of the given window.
- * @details During tdm_output_validate(), the device may request changes to
+ * @details During tdm_output_hwc_validate(), the device may request changes to
* the composition types of any of the layers as described in the definition
* of tdm_hwc_window_composition_t above.
* @param[in] hwc_window A window object
* @param[out] error #TDM_ERROR_NONE if success. Otherwise, error value.
* @return A created window object
*/
- tdm_hwc_window *(*output_create_hwc_window)(tdm_output *output, tdm_error *error);
+ tdm_hwc_window *(*output_hwc_create_window)(tdm_output *output, tdm_error *error);
/**
* @brief Destroys the given window.
* @param[in] window the pointer of the window to destroy
* @return #TDM_ERROR_NONE if success. Otherwise, error value.
*/
- tdm_error (*output_destroy_hwc_window)(tdm_output *output, tdm_hwc_window *hwc_window);
+ tdm_error (*output_hwc_destroy_window)(tdm_output *output, tdm_hwc_window *hwc_window);
/**
* @brief Set the client(relative to the TDM) target buffer
* Will be called before output_commit() if any of the layers are marked as
* TDM_COMPOSITION_CLIENT or TDM_COMPOSITION_DEVICE_CANDIDATE. If no layers are
* so marked, then it is not necessary to call this function. It is not necessary
- * to call output_validate() after changing the target through this function.
+ * to call output_hwc_validate() after changing the target through this function.
* @param[in] output A output object
* @param[in] target The new target buffer
* @param[in] damage The surface damage region
* @return #TDM_ERROR_NONE if success. Otherwise, error value.
*/
- tdm_error (*output_set_client_target_buffer)(tdm_output *output, tbm_surface_h target,
+ tdm_error (*output_hwc_set_client_target_buffer)(tdm_output *output, tbm_surface_h target,
tdm_hwc_region damage);
/**
* @param[in] output A output object
* @param[out] num_types The number of composition type changes required by
* the device; if greater than 0, the client must either set and validate new
- * types, or call output_accept_changes() to accept the changes returned by
- * output_get_changed_composition_types(); must be the same as the number of
- * changes returned by output_get_changed_composition_types (see the
+ * types, or call output_hwc_accept_changes() to accept the changes returned by
+ * output_hwc_get_changed_composition_types(); must be the same as the number of
+ * changes returned by output_hwc_get_changed_composition_types (see the
* declaration of that function for more information); pointer will be non-NULL
* @return #TDM_ERROR_NONE if success. Otherwise, error value.
*/
- tdm_error (*output_validate)(tdm_output *output, uint32_t *num_types);
+ tdm_error (*output_hwc_validate)(tdm_output *output, uint32_t *num_types);
/**
* @brief Get changed composition types
* @details Retrieves the windows for which the device requires a different
- * composition type than had been set prior to the last call to output_validate().
+ * composition type than had been set prior to the last call to output_hwc_validate().
* The client will either update its state with these types and call
- * output_accept_changes, or will set new types and attempt to validate the
+ * output_hwc_accept_changes, or will set new types and attempt to validate the
* display again.
* layers and types may be NULL to retrieve the number of elements which
* will be returned. The number of elements returned must be the same as the
- * value returned in num_types from the last call to output_validate().
+ * value returned in num_types from the last call to output_hwc_validate().
* @param[in] output A output object
* @param[out] num_elements If windows or types were NULL, the number of layers
* and types which would have been returned; if both were non-NULL, the
* corresponding to an element of windows
* @return #TDM_ERROR_NONE if success. Otherwise, error value.
*/
- tdm_error (*output_get_changed_composition_types)(tdm_output *output,
+ tdm_error (*output_hwc_get_changed_composition_types)(tdm_output *output,
uint32_t *num_elements,
tdm_hwc_window **hwc_window,
tdm_hwc_window_composition_t *composition_types);
/**
* @brief Accepts the changes required by the device
* @details Accepts the changes required by the device from the previous
- * output_validate() call (which may be queried using
+ * output_hwc_validate() call (which may be queried using
* output_get_chaged_composition_types()) and revalidates the display. This
* function is equivalent to requesting the changed types from
* output_get_chaged_composition_types(), setting those types on the
- * corresponding windows, and then calling output_validate again.
+ * corresponding windows, and then calling output_hwc_validate again.
* After this call it must be valid to present this display. Calling this after
- * output_validate() returns 0 changes must succeed with TDM_ERROR_NONE, but
+ * output_hwc_validate() returns 0 changes must succeed with TDM_ERROR_NONE, but
* should have no other effect.
* @param[in] output A output object
* @return #TDM_ERROR_NONE if success. Otherwise, error value.
*/
- tdm_error (*output_accept_changes)(tdm_output *output);
+ tdm_error (*output_hwc_accept_changes)(tdm_output *output);
/**
* @brief Get a target surface queue
* @param[out] error #TDM_ERROR_NONE if success. Otherwise, error value.
* @return A surface queue
*/
- tbm_surface_queue_h (*output_get_target_surface_queue)(tdm_output *output,
+ tbm_surface_queue_h (*output_hwc_get_target_surface_queue)(tdm_output *output,
tdm_error *error);
/**
/**
* @brief Sets the desired composition type of the given window.
- * @details During output_validate(), the device may request changes to
+ * @details During output_hwc_validate(), the device may request changes to
* the composition types of any of the layers as described in the definition
* of tdm_hwc_window_composition_t above.
* @param[in] hwc_window A window object
* @brief Trigger a 'need to validate' event.
* @param[in] output The output the event should be triggered for.
* @note The global display lock has to be locked before the call to this function.
- * @see #tdm_output_set_need_validate_handler
+ * @see #tdm_output_hwc_set_need_validate_handler
*/
tdm_error
tdm_backend_trigger_need_validate_event(tdm_output *output);
*/
TDM_COMPOSITION_CLIENT = 0,
- /* Set by the HWC after tdm_output_validate().
+ /* Set by the HWC after tdm_output_hwc_validate().
*
* If the HWC decided that it doesn't want/can't to continue the composition for
* the window through a hardware overlay or other similar way it'll change
*/
TDM_COMPOSITION_CLIENT_CANDIDATE = 5,
- /** Set by the client before tdm_output_validate().
+ /** Set by the client before tdm_output_hwc_validate().
*
- * Upon tdm_output_validate(), the device may request a change from this type to
+ * Upon tdm_output_hwc_validate(), the device may request a change from this type to
* TDM_COMPOSITION_DEVICE or TDM_COMPOSITION_CLIENT. */
TDM_COMPOSITION_DEVICE_CANDIDATE = 2,
- /** Set by the HWC after tdm_output_validate().
+ /** Set by the HWC after tdm_output_hwc_validate().
*
* The device will handle the composition of this window through a hardware
* overlay or other similar means.
*
- * Upon tdm_output_validate(), the device may request a change from this type to
+ * Upon tdm_output_hwc_validate(), the device may request a change from this type to
* TDM_COMPOSITION_CLIENT or TDM_COMPOSITION_DEVICE_CANDIDATE. */
TDM_COMPOSITION_DEVICE = 1,
* asynchronously through layer_set_cursor_position. If this functionality is not
* supported on a layer that the client sets to TDM_COMPOSITION_CURSOR, the
* device must request that the composition type of that layer is changed to
- * TDM_COMPOSITION_CLIENT upon the next call to tdm_output_validate().
+ * TDM_COMPOSITION_CLIENT upon the next call to tdm_output_hwc_validate().
*
- * Upon tdm_output_validate(), the device may request a change from this type to
+ * Upon tdm_output_hwc_validate(), the device may request a change from this type to
* either TDM_COMPOSITION_DEVICE or TDM_COMPOSITION_CLIENT. Changing to
* TDM_COMPOSITION_DEVICE will prevent the use of layer_set_cursor_position but
* still permit the device to composite the layer. */
/** The device will handle the composition of this layer through a hardware
* overlay or other similar means.
*
- * Upon tdm_output_validate(), the device may request a change from this type to
+ * Upon tdm_output_hwc_validate(), the device may request a change from this type to
* either TDM_COMPOSITION_DEVICE or TDM_COMPOSITION_CLIENT, but it is
* unlikely that content will display correctly in these cases. */
TDM_COMPOSITION_VIDEO = 4,
TDM_RETURN_VAL_IF_FAIL(TDM_MUTEX_IS_LOCKED(), NULL);
- hwc_window_backend = func_output->output_create_hwc_window(
+ hwc_window_backend = func_output->output_hwc_create_window(
private_output->output_backend, &ret);
if (ret != TDM_ERROR_NONE) {
if (error)
private_hwc_window = calloc(1, sizeof(tdm_private_capture));
if (!private_hwc_window) {
TDM_ERR("failed: alloc memory");
- func_output->output_destroy_hwc_window(private_output->output_backend, hwc_window_backend);
+ func_output->output_hwc_destroy_window(private_output->output_backend, hwc_window_backend);
if (error)
*error = TDM_ERROR_OUT_OF_MEMORY;
return NULL;
LIST_DEL(&private_hwc_window->link);
func_output = &private_display->func_output;
- func_output->output_destroy_hwc_window(private_output->output_backend, private_hwc_window->hwc_window_backend);
+ func_output->output_hwc_destroy_window(private_output->output_backend, private_hwc_window->hwc_window_backend);
free(private_hwc_window);
return TDM_ERROR_NONE;
}
EXTERN tdm_hwc_window *
-tdm_output_create_hwc_window(tdm_output *output, tdm_error *error)
+tdm_output_hwc_create_window(tdm_output *output, tdm_error *error)
{
tdm_hwc_window *hwc_window = NULL;
}
EXTERN tdm_error
-tdm_output_destroy_hwc_window(tdm_output *output, tdm_hwc_window *hwc_window)
+tdm_output_hwc_destroy_window(tdm_output *output, tdm_hwc_window *hwc_window)
{
OUTPUT_FUNC_ENTRY();
}
EXTERN tdm_error
-tdm_output_validate(tdm_output *output, uint32_t *num_types)
+tdm_output_hwc_validate(tdm_output *output, uint32_t *num_types)
{
tdm_func_output *func_output = NULL;
func_output = &private_display->func_output;
- if (!func_output->output_validate) {
+ if (!func_output->output_hwc_validate) {
_pthread_mutex_unlock(&private_display->lock);
TDM_ERR("not implemented!!");
return TDM_ERROR_NOT_IMPLEMENTED;
}
- ret = func_output->output_validate(private_output->output_backend, num_types);
+ ret = func_output->output_hwc_validate(private_output->output_backend, num_types);
_pthread_mutex_unlock(&private_display->lock);
}
EXTERN tdm_error
-tdm_output_set_need_validate_handler(tdm_output *output,
+tdm_output_hwc_set_need_validate_handler(tdm_output *output,
tdm_output_need_validate_handler hndl)
{
OUTPUT_FUNC_ENTRY();
}
EXTERN tdm_error
-tdm_output_get_changed_composition_types(tdm_output *output,
+tdm_output_hwc_get_changed_composition_types(tdm_output *output,
uint32_t *num_elements,
tdm_hwc_window **hwc_window,
tdm_hwc_window_composition_t *composition_types)
func_output = &private_display->func_output;
- if (!func_output->output_get_changed_composition_types) {
+ if (!func_output->output_hwc_get_changed_composition_types) {
_pthread_mutex_unlock(&private_display->lock);
TDM_ERR("not implemented!!");
return TDM_ERROR_NOT_IMPLEMENTED;
}
- ret = func_output->output_get_changed_composition_types(private_output->output_backend,
+ ret = func_output->output_hwc_get_changed_composition_types(private_output->output_backend,
num_elements, hwc_window, composition_types);
TDM_RETURN_VAL_IF_FAIL(ret == TDM_ERROR_NONE, ret);
if (private_hwc_window == NULL) {
TDM_ERR("failed! This should never happen!");
- func_output->output_destroy_hwc_window(private_output->output_backend, hwc_window[i]);
+ func_output->output_hwc_destroy_window(private_output->output_backend, hwc_window[i]);
free(hwc_window);
free(composition_types);
num_elements = 0;
}
tdm_error
-tdm_output_accept_changes(tdm_output *output)
+tdm_output_hwc_accept_changes(tdm_output *output)
{
tdm_func_output *func_output = NULL;
func_output = &private_display->func_output;
- if (!func_output->output_validate) {
+ if (!func_output->output_hwc_validate) {
_pthread_mutex_unlock(&private_display->lock);
TDM_ERR("not implemented!!");
return TDM_ERROR_NOT_IMPLEMENTED;
}
- ret = func_output->output_accept_changes(private_output->output_backend);
+ ret = func_output->output_hwc_accept_changes(private_output->output_backend);
_pthread_mutex_unlock(&private_display->lock);
}
tbm_surface_queue_h
-tdm_output_get_target_surface_queue(tdm_output *output, tdm_error *error)
+tdm_output_hwc_get_target_surface_queue(tdm_output *output, tdm_error *error)
{
tdm_func_output *func_output = NULL;
tbm_surface_queue_h queue = NULL;
func_output = &private_display->func_output;
- if (!func_output->output_get_target_surface_queue) {
+ if (!func_output->output_hwc_get_target_surface_queue) {
_pthread_mutex_unlock(&private_display->lock);
TDM_ERR("not implemented!!");
return NULL;
}
- queue = func_output->output_get_target_surface_queue(private_output->output_backend, error);
+ queue = func_output->output_hwc_get_target_surface_queue(private_output->output_backend, error);
_pthread_mutex_unlock(&private_display->lock);
}
EXTERN tdm_error
-tdm_output_set_client_target_buffer(tdm_output *output, tbm_surface_h buffer,
+tdm_output_hwc_set_client_target_buffer(tdm_output *output, tbm_surface_h buffer,
tdm_hwc_region damage)
{
tdm_func_output *func_output = NULL;
func_output = &private_display->func_output;
- if (!func_output->output_set_client_target_buffer) {
+ if (!func_output->output_hwc_set_client_target_buffer) {
_pthread_mutex_unlock(&private_display->lock);
TDM_ERR("not implemented!!");
return TDM_ERROR_NOT_IMPLEMENTED;
if (tdm_dump_enable)
_tdm_target_window_dump_buffer((tdm_private_output *)output, buffer);
- ret = func_output->output_set_client_target_buffer(private_output->output_backend, buffer, damage);
+ ret = func_output->output_hwc_set_client_target_buffer(private_output->output_backend, buffer, damage);
_pthread_mutex_unlock(&private_display->lock);