[mutter] clutter/stage-view: Add getter for getting the offscreen blit transform



commit c5dc0f4a2eaf5214406eb647b80898c6eba7c719
Author: Jonas Ådahl <jadahl gmail com>
Date:   Tue Mar 7 18:02:52 2017 +0800

    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

 clutter/clutter/clutter-stage-view.c |   12 ++++++++++--
 clutter/clutter/clutter-stage-view.h |    4 ++++
 2 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/clutter/clutter/clutter-stage-view.c b/clutter/clutter/clutter-stage-view.c
index 2b89bb2..e399278 100644
--- a/clutter/clutter/clutter-stage-view.c
+++ b/clutter/clutter/clutter-stage-view.c
@@ -180,15 +180,23 @@ clutter_stage_view_set_dirty_projection (ClutterStageView *view,
 }
 
 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);
 }
diff --git a/clutter/clutter/clutter-stage-view.h b/clutter/clutter/clutter-stage-view.h
index e820e96..3eb8da4 100644
--- a/clutter/clutter/clutter-stage-view.h
+++ b/clutter/clutter/clutter-stage-view.h
@@ -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__ */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]