[clutter/wip/garnacho/egl-emulated-screen-rotation: 1/6] stage-window: Add transform_to_view() method



commit e98f7b758a23ecce9483a77f758195ebb7af635a
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Feb 10 14:18:42 2016 +0100

    stage-window: Add transform_to_view() method
    
    This will be used when rendering the stage on subviews.
    Coordinates as set on actors must be modified by the matrix
    set by the view.

 clutter/clutter-stage-window.c |   13 +++++++++++++
 clutter/clutter-stage-window.h |    6 ++++++
 2 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/clutter/clutter-stage-window.c b/clutter/clutter-stage-window.c
index 450d264..b0b10e0 100644
--- a/clutter/clutter-stage-window.c
+++ b/clutter/clutter-stage-window.c
@@ -360,3 +360,16 @@ _clutter_stage_window_get_scale_factor (ClutterStageWindow *window)
 
   return 1;
 }
+
+void
+clutter_stage_window_transform_to_view (ClutterStageWindow *window,
+                                        CoglMatrix         *matrix)
+{
+  ClutterStageWindowIface *iface;
+
+  g_return_if_fail (CLUTTER_IS_STAGE_WINDOW (window));
+
+  iface = CLUTTER_STAGE_WINDOW_GET_IFACE (window);
+  if (iface->transform_to_view != NULL)
+    iface->transform_to_view (window, matrix);
+}
diff --git a/clutter/clutter-stage-window.h b/clutter/clutter-stage-window.h
index fa89825..d7884a3 100644
--- a/clutter/clutter-stage-window.h
+++ b/clutter/clutter-stage-window.h
@@ -88,6 +88,9 @@ struct _ClutterStageWindowIface
   void              (* set_scale_factor)        (ClutterStageWindow *stage_window,
                                                  int                 factor);
   int               (* get_scale_factor)        (ClutterStageWindow *stage_window);
+
+  void              (* transform_to_view)       (ClutterStageWindow *stage_window,
+                                                 CoglMatrix         *matrix);
 };
 
 GType _clutter_stage_window_get_type (void) G_GNUC_CONST;
@@ -145,6 +148,9 @@ void              _clutter_stage_window_set_scale_factor        (ClutterStageWin
                                                                  int                 factor);
 int               _clutter_stage_window_get_scale_factor        (ClutterStageWindow *window);
 
+void              clutter_stage_window_transform_to_view        (ClutterStageWindow *window,
+                                                                 CoglMatrix         *matrix);
+
 G_END_DECLS
 
 #endif /* __CLUTTER_STAGE_WINDOW_H__ */


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