ecore-drm2: Add API function to retrieve output user data

With the rework of Ecore_Evas drm engine, we need to get the
ecore_evas itself in the pageflip callback so we have to reassign
output->user_data to the ecore_evas which we can then use to retrieve
via this function

This is needed as the pageflip callback will pass us the output on
which the pageflip completed.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2018-02-20 10:33:51 -05:00
parent 72b192c012
commit ccf064f5ae
2 changed files with 19 additions and 0 deletions

View File

@ -792,6 +792,18 @@ EAPI Eina_Bool ecore_drm2_output_rotation_set(Ecore_Drm2_Output *output, int rot
*/
EAPI void ecore_drm2_output_user_data_set(Ecore_Drm2_Output *o, void *data);
/**
* Get the user data for a given output
*
* @param output The output to get user data for
*
* @return The user data associated with given output
*
* @ingroup Ecore_Drm2_Output_Group
* @since 1.21
*/
EAPI void *ecore_drm2_output_user_data_get(Ecore_Drm2_Output *output);
/**
* Get the subpixel state of the output
* @param output the output

View File

@ -1456,6 +1456,13 @@ ecore_drm2_output_user_data_set(Ecore_Drm2_Output *o, void *data)
o->user_data = data;
}
EAPI void *
ecore_drm2_output_user_data_get(Ecore_Drm2_Output *output)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(output, NULL);
return output->user_data;
}
EAPI void
ecore_drm2_output_gamma_set(Ecore_Drm2_Output *output, uint16_t size, uint16_t *red, uint16_t *green, uint16_t *blue)
{