@ -266,7 +266,7 @@ weston_surface_set_color(struct weston_surface *surface,
static void
surface_to_global_float ( struct weston_surface * surface ,
int32_t sx , int32_ t sy , GLfloat * x , GLfloat * y )
GLfloat sx , GLfloa t sy , GLfloat * x , GLfloat * y )
{
if ( surface - > transform . enabled ) {
struct weston_vector v = { { sx , sy , 0.0f , 1.0f } } ;
@ -436,13 +436,28 @@ weston_surface_update_transform(struct weston_surface *surface)
WL_EXPORT void
weston_surface_to_global_float ( struct weston_surface * surface ,
int32_t sx , int32_ t sy , GLfloat * x , GLfloat * y )
GLfloat sx , GLfloa t sy , GLfloat * x , GLfloat * y )
{
weston_surface_update_transform ( surface ) ;
surface_to_global_float ( surface , sx , sy , x , y ) ;
}
WL_EXPORT void
weston_surface_to_global_fixed ( struct weston_surface * surface ,
wl_fixed_t sx , wl_fixed_t sy ,
wl_fixed_t * x , wl_fixed_t * y )
{
GLfloat xf , yf ;
weston_surface_to_global_float ( surface ,
wl_fixed_to_double ( sx ) ,
wl_fixed_to_double ( sy ) ,
& xf , & yf ) ;
* x = wl_fixed_from_double ( xf ) ;
* y = wl_fixed_from_double ( yf ) ;
}
WL_EXPORT void
weston_surface_to_global ( struct weston_surface * surface ,
int32_t sx , int32_t sy , int32_t * x , int32_t * y )
@ -456,7 +471,7 @@ weston_surface_to_global(struct weston_surface *surface,
static void
surface_from_global_float ( struct weston_surface * surface ,
int32_t x , int32_ t y , GLfloat * sx , GLfloat * sy )
GLfloat x , GLfloa t y , GLfloat * sx , GLfloat * sy )
{
if ( surface - > transform . enabled ) {
struct weston_vector v = { { x , y , 0.0f , 1.0f } } ;
@ -480,6 +495,23 @@ surface_from_global_float(struct weston_surface *surface,
}
}
WL_EXPORT void
weston_surface_from_global_fixed ( struct weston_surface * surface ,
wl_fixed_t x , wl_fixed_t y ,
wl_fixed_t * sx , wl_fixed_t * sy )
{
GLfloat sxf , syf ;
weston_surface_update_transform ( surface ) ;
surface_from_global_float ( surface ,
wl_fixed_to_double ( x ) ,
wl_fixed_to_double ( y ) ,
& sxf , & syf ) ;
* sx = wl_fixed_from_double ( sxf ) ;
* sy = wl_fixed_from_double ( syf ) ;
}
WL_EXPORT void
weston_surface_from_global ( struct weston_surface * surface ,
int32_t x , int32_t y , int32_t * sx , int32_t * sy )