[clutter/wip/garnacho/egl-emulated-screen-rotation: 2/6] stage-window: Add get_hw_geometry() method
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/wip/garnacho/egl-emulated-screen-rotation: 2/6] stage-window: Add get_hw_geometry() method
- Date: Wed, 10 Feb 2016 14:17:36 +0000 (UTC)
commit 3b660eb489b3056fd209529a6e886de8cb46c847
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Feb 10 14:21:16 2016 +0100
stage-window: Add get_hw_geometry() method
This is an alternative to _clutter_stage_window_get_geometry(), that
will return the geometry as seen by the stage. get_hw_geometry() will
return the geometry as seen by the lower layers (eg. on rotated outputs
we still need to allocate primary planes that fit the crcts).
clutter/clutter-stage-window.c | 12 ++++++++++++
clutter/clutter-stage-window.h | 4 ++++
2 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/clutter/clutter-stage-window.c b/clutter/clutter-stage-window.c
index b0b10e0..b50be6b 100644
--- a/clutter/clutter-stage-window.c
+++ b/clutter/clutter-stage-window.c
@@ -373,3 +373,15 @@ clutter_stage_window_transform_to_view (ClutterStageWindow *window,
if (iface->transform_to_view != NULL)
iface->transform_to_view (window, matrix);
}
+
+void
+clutter_stage_window_get_hw_geometry (ClutterStageWindow *window,
+ cairo_rectangle_int_t *geometry)
+{
+ ClutterStageWindowIface *iface = CLUTTER_STAGE_WINDOW_GET_IFACE (window);
+
+ if (iface->get_hw_geometry)
+ CLUTTER_STAGE_WINDOW_GET_IFACE (window)->get_hw_geometry (window, geometry);
+ else
+ _clutter_stage_window_get_geometry (window, geometry);
+}
diff --git a/clutter/clutter-stage-window.h b/clutter/clutter-stage-window.h
index d7884a3..f648469 100644
--- a/clutter/clutter-stage-window.h
+++ b/clutter/clutter-stage-window.h
@@ -91,6 +91,8 @@ struct _ClutterStageWindowIface
void (* transform_to_view) (ClutterStageWindow *stage_window,
CoglMatrix *matrix);
+ void (* get_hw_geometry) (ClutterStageWindow *stage_window,
+ cairo_rectangle_int_t *geometry);
};
GType _clutter_stage_window_get_type (void) G_GNUC_CONST;
@@ -150,6 +152,8 @@ int _clutter_stage_window_get_scale_factor (ClutterStageWin
void clutter_stage_window_transform_to_view (ClutterStageWindow *window,
CoglMatrix *matrix);
+void clutter_stage_window_get_hw_geometry (ClutterStageWindow *window,
+ cairo_rectangle_int_t *geometry);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]