[clutter/wip/garnacho/egl-emulated-screen-rotation: 3/6] stage: Use clutter_stage_window_get_hw_geometry()
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/wip/garnacho/egl-emulated-screen-rotation: 3/6] stage: Use clutter_stage_window_get_hw_geometry()
- Date: Wed, 10 Feb 2016 14:17:41 +0000 (UTC)
commit 1f7449bab55627f698dc9d1501c4f784dffedcb4
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Feb 10 14:31:20 2016 +0100
stage: Use clutter_stage_window_get_hw_geometry()
There's places where we need to honor the lowlevel buffer geometry
rather than the stage one (which may not mach in the case of rotated
outputs).
clutter/clutter-stage.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/clutter/clutter-stage.c b/clutter/clutter-stage.c
index 2c67ca3..770ba8d 100644
--- a/clutter/clutter-stage.c
+++ b/clutter/clutter-stage.c
@@ -480,13 +480,13 @@ clutter_stage_allocate (ClutterActor *self,
if (CLUTTER_NEARBYINT (old_width) != CLUTTER_NEARBYINT (new_width) ||
CLUTTER_NEARBYINT (old_height) != CLUTTER_NEARBYINT (new_height))
{
- int real_width = CLUTTER_NEARBYINT (new_width);
- int real_height = CLUTTER_NEARBYINT (new_height);
+ cairo_rectangle_int_t fb_size;
+ clutter_stage_window_get_hw_geometry (priv->impl, &fb_size);
_clutter_stage_set_viewport (CLUTTER_STAGE (self),
0, 0,
- real_width,
- real_height);
+ fb_size.width,
+ fb_size.height);
/* Note: we don't assume that set_viewport will queue a full redraw
* since it may bail-out early if something preemptively set the
@@ -638,7 +638,7 @@ _clutter_stage_do_paint (ClutterStage *stage,
if (priv->impl == NULL)
return;
- _clutter_stage_window_get_geometry (priv->impl, &geom);
+ clutter_stage_window_get_hw_geometry (priv->impl, &geom);
window_scale = _clutter_stage_window_get_scale_factor (priv->impl);
viewport[0] = priv->viewport[0] * window_scale;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]