[maemo-commits] [maemo-commits] r17087 - in projects/haf/branches/clutter/clutter-shaped-mode: clutter debian
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Mon Jan 12 12:37:11 EET 2009
- Previous message: [maemo-commits] r17086 - projects/haf/branches/clutter
- Next message: [maemo-commits] r17088 - projects/haf/branches
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: kihamala Date: 2009-01-12 12:37:10 +0200 (Mon, 12 Jan 2009) New Revision: 17087 Modified: projects/haf/branches/clutter/clutter-shaped-mode/clutter/clutter-stage.c projects/haf/branches/clutter/clutter-shaped-mode/clutter/clutter-stage.h projects/haf/branches/clutter/clutter-shaped-mode/debian/changelog Log: selective compositing support Modified: projects/haf/branches/clutter/clutter-shaped-mode/clutter/clutter-stage.c =================================================================== --- projects/haf/branches/clutter/clutter-shaped-mode/clutter/clutter-stage.c 2009-01-12 10:34:10 UTC (rev 17086) +++ projects/haf/branches/clutter/clutter-shaped-mode/clutter/clutter-stage.c 2009-01-12 10:37:10 UTC (rev 17087) @@ -87,6 +87,7 @@ ClutterActor *key_focused_actor; guint update_idle; /* repaint idler id */ + int shaped_mode; /* TODO: three states */ /* if this is invalid, everything will be repainted */ ClutterGeometry damaged_area; @@ -211,6 +212,17 @@ } } +/* 0 - no shape + * 1 - shape (non-fullscreen) + * 2 - shape (fullscreen) + */ +void +clutter_stage_set_shaped_mode (ClutterActor *self, int mode) +{ + ClutterStagePrivate *priv = CLUTTER_STAGE (self)->priv; + priv->shaped_mode = mode; +} + static void clutter_stage_paint (ClutterActor *self) { @@ -237,7 +249,7 @@ priv->damaged_area.height>=height) update_area = FALSE; - if (update_area) + if (priv->shaped_mode || update_area) { CLUTTER_NOTE (PAINT, "Rendering ONLY the area x: %d, y: %d, width: %d, height: %d", @@ -251,13 +263,20 @@ CLUTTER_SET_PRIVATE_FLAGS (self, CLUTTER_ACTOR_SYNC_MATRICES); _clutter_stage_maybe_setup_viewport(CLUTTER_STAGE(self)); - /* We hope that clutter_redraw has set up the matrices correctly */ - cogl_clip_set( + if (update_area) + /* We hope that clutter_redraw has set up the matrices correctly */ + cogl_clip_set( CLUTTER_INT_TO_FIXED( priv->damaged_area.x ), CLUTTER_INT_TO_FIXED( priv->damaged_area.y ), CLUTTER_INT_TO_FIXED( priv->damaged_area.width ), CLUTTER_INT_TO_FIXED( priv->damaged_area.height )); + if (priv->shaped_mode) + cogl_clip_set (CLUTTER_INT_TO_FIXED(0), + CLUTTER_INT_TO_FIXED(0), + CLUTTER_INT_TO_FIXED(800), + CLUTTER_INT_TO_FIXED(56)); + cogl_pop_matrix(); } @@ -280,7 +299,7 @@ /* this will take care of painting every child */ CLUTTER_ACTOR_CLASS (clutter_stage_parent_class)->paint (self); - if (update_area) + if (priv->shaped_mode || update_area) { cogl_clip_unset(); } Modified: projects/haf/branches/clutter/clutter-shaped-mode/clutter/clutter-stage.h =================================================================== --- projects/haf/branches/clutter/clutter-shaped-mode/clutter/clutter-stage.h 2009-01-12 10:34:10 UTC (rev 17086) +++ projects/haf/branches/clutter/clutter-shaped-mode/clutter/clutter-stage.h 2009-01-12 10:37:10 UTC (rev 17087) @@ -235,7 +235,10 @@ void clutter_stage_set_damaged_area (ClutterActor *self, ClutterGeometry area); +void clutter_stage_set_shaped_mode (ClutterActor *self, + int mode); + /* Commodity macro */ #define clutter_stage_add(stage,actor) G_STMT_START { \ if (CLUTTER_IS_STAGE ((stage)) && CLUTTER_IS_ACTOR ((actor))) \ Modified: projects/haf/branches/clutter/clutter-shaped-mode/debian/changelog =================================================================== --- projects/haf/branches/clutter/clutter-shaped-mode/debian/changelog 2009-01-12 10:34:10 UTC (rev 17086) +++ projects/haf/branches/clutter/clutter-shaped-mode/debian/changelog 2009-01-12 10:37:10 UTC (rev 17087) @@ -5,6 +5,7 @@ application windows and should avoid some surprises in libmatchbox2 side. * Do not alter XComposite redirections in clutter-x11-texture-pixmap.c, that belongs to the window manager. + * Support for selective compositing (shaped mode). -- Gordon Williams <gordon.williams at collabora.co.uk> Mon, 29 Dec 2008 15:25:59 +0200
- Previous message: [maemo-commits] r17086 - projects/haf/branches/clutter
- Next message: [maemo-commits] r17088 - projects/haf/branches
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]