mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
clutter/stage-view: Add getter for getting the offscreen blit transform
This will be used to invert the transform in the nested mode, making it possible to test offscreen texture based transform using the nested backend. https://bugzilla.gnome.org/show_bug.cgi?id=779745
This commit is contained in:
parent
615587cd06
commit
c5dc0f4a2e
@ -179,16 +179,24 @@ clutter_stage_view_set_dirty_projection (ClutterStageView *view,
|
||||
priv->dirty_projection = dirty;
|
||||
}
|
||||
|
||||
void
|
||||
clutter_stage_view_get_offscreen_transformation_matrix (ClutterStageView *view,
|
||||
CoglMatrix *matrix)
|
||||
{
|
||||
ClutterStageViewClass *view_class = CLUTTER_STAGE_VIEW_GET_CLASS (view);
|
||||
|
||||
view_class->get_offscreen_transformation_matrix (view, matrix);
|
||||
}
|
||||
|
||||
void
|
||||
clutter_stage_view_transform_to_onscreen (ClutterStageView *view,
|
||||
gfloat *x,
|
||||
gfloat *y)
|
||||
{
|
||||
ClutterStageViewClass *view_class = CLUTTER_STAGE_VIEW_GET_CLASS (view);
|
||||
gfloat z = 0, w = 1;
|
||||
CoglMatrix matrix;
|
||||
|
||||
view_class->get_offscreen_transformation_matrix (view, &matrix);
|
||||
clutter_stage_view_get_offscreen_transformation_matrix (view, &matrix);
|
||||
cogl_matrix_get_inverse (&matrix, &matrix);
|
||||
cogl_matrix_transform_point (&matrix, x, y, &z, &w);
|
||||
}
|
||||
|
@ -70,4 +70,8 @@ gboolean clutter_stage_view_is_dirty_projection (ClutterStageView *view);
|
||||
void clutter_stage_view_set_dirty_projection (ClutterStageView *view,
|
||||
gboolean dirty);
|
||||
|
||||
CLUTTER_AVAILABLE_IN_MUTTER
|
||||
void clutter_stage_view_get_offscreen_transformation_matrix (ClutterStageView *view,
|
||||
CoglMatrix *matrix);
|
||||
|
||||
#endif /* __CLUTTER_STAGE_VIEW_H__ */
|
||||
|
Loading…
Reference in New Issue
Block a user