[maemo-commits] [maemo-commits] r17334 - in projects/haf/trunk/clutter: clutter debian
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Fri Jan 30 11:39:33 EET 2009
- Previous message: [maemo-commits] r17332 - in projects/haf/trunk/hildon-thumbnail: . debian
- Next message: [maemo-commits] r17335 - in projects/haf/trunk/dbus-glib/debian: . patches
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: gw
Date: 2009-01-30 11:39:31 +0200 (Fri, 30 Jan 2009)
New Revision: 17334
Modified:
projects/haf/trunk/clutter/clutter/clutter-main.c
projects/haf/trunk/clutter/clutter/clutter-private.h
projects/haf/trunk/clutter/clutter/clutter-timeline.c
projects/haf/trunk/clutter/debian/changelog
Log:
Pierre-Luc Beaudoin's patch to disable frame skipping to allow easier
profiling of clutter.
Modified: projects/haf/trunk/clutter/clutter/clutter-main.c
===================================================================
--- projects/haf/trunk/clutter/clutter/clutter-main.c 2009-01-30 09:36:50 UTC (rev 17333)
+++ projects/haf/trunk/clutter/clutter/clutter-main.c 2009-01-30 09:39:31 UTC (rev 17334)
@@ -65,6 +65,7 @@
static gboolean clutter_fatal_warnings = FALSE;
static guint clutter_default_fps = 60;
+static gboolean clutter_disable_skip_frames = FALSE;
static guint clutter_main_loop_level = 0;
static GSList *main_loops = NULL;
@@ -1176,6 +1177,8 @@
"Show the amount of time each frame took to render", NULL },
{ "clutter-default-fps", 0, 0, G_OPTION_ARG_INT, &clutter_default_fps,
"Default frame rate", "FPS" },
+ { "clutter-disable-skip-frames", 0, 0, G_OPTION_ARG_NONE, &clutter_disable_skip_frames,
+ "Disable skipping frames", NULL },
{ "g-fatal-warnings", 0, 0, G_OPTION_ARG_NONE, &clutter_fatal_warnings,
"Make all warnings fatal", NULL },
#ifdef CLUTTER_ENABLE_DEBUG
@@ -1243,6 +1246,12 @@
clutter_default_fps = CLAMP (default_fps, 1, 1000);
}
+ env_string = g_getenv ("CLUTTER_DISABLE_SKIP_FRAMES");
+ if (env_string)
+ {
+ clutter_disable_skip_frames = TRUE;
+ }
+
if (CLUTTER_BACKEND_GET_CLASS (backend)->pre_parse)
return CLUTTER_BACKEND_GET_CLASS (backend)->pre_parse (backend, error);
@@ -1278,6 +1287,7 @@
}
clutter_context->frame_rate = clutter_default_fps;
+ clutter_context->disable_skip_frames = clutter_disable_skip_frames;
clutter_context->options_parsed = TRUE;
/*
Modified: projects/haf/trunk/clutter/clutter/clutter-private.h
===================================================================
--- projects/haf/trunk/clutter/clutter/clutter-private.h 2009-01-30 09:36:50 UTC (rev 17333)
+++ projects/haf/trunk/clutter/clutter/clutter-private.h 2009-01-30 09:39:31 UTC (rev 17334)
@@ -108,6 +108,7 @@
* and actors
*/
guint frame_rate; /* Default FPS */
+ gboolean disable_skip_frames;/* Should timeline not skip frames */
ClutterActor *pointer_grab_actor; /* The actor having the pointer grab
* (or NULL if there is no pointer grab
Modified: projects/haf/trunk/clutter/clutter/clutter-timeline.c
===================================================================
--- projects/haf/trunk/clutter/clutter/clutter-timeline.c 2009-01-30 09:36:50 UTC (rev 17333)
+++ projects/haf/trunk/clutter/clutter/clutter-timeline.c 2009-01-30 09:39:31 UTC (rev 17334)
@@ -583,8 +583,10 @@
GTimeVal timeval;
guint n_frames;
gulong msecs;
+ ClutterMainContext *context;
priv = timeline->priv;
+ context = clutter_context_get_default ();
g_object_ref (timeline);
@@ -608,11 +610,19 @@
msecs = (timeval.tv_sec - priv->prev_frame_timeval.tv_sec) * 1000;
msecs += (timeval.tv_usec - priv->prev_frame_timeval.tv_usec) / 1000;
priv->msecs_delta = msecs;
- n_frames = msecs / (1000 / priv->fps);
- if (n_frames == 0)
- n_frames = 1;
+ if (context->disable_skip_frames == FALSE)
+ {
+ n_frames = msecs / (1000 / priv->fps);
+ if (n_frames == 0)
+ n_frames = 1;
- priv->skipped_frames = n_frames - 1;
+ priv->skipped_frames = n_frames - 1;
+ }
+ else
+ {
+ n_frames = 1;
+ priv->skipped_frames = 0;
+ }
if (priv->skipped_frames)
CLUTTER_TIMESTAMP (SCHEDULER,
Modified: projects/haf/trunk/clutter/debian/changelog
===================================================================
--- projects/haf/trunk/clutter/debian/changelog 2009-01-30 09:36:50 UTC (rev 17333)
+++ projects/haf/trunk/clutter/debian/changelog 2009-01-30 09:39:31 UTC (rev 17334)
@@ -7,6 +7,8 @@
* Modified GLES cogl-texture to skip allocation and copying to an
intermediate bitmap if row strides match properly. Also use glTexImage2D
if not copying a sub-area, but the whole image.
+ * Pierre-Luc Beaudoin's patch to disable frame skipping to allow easier
+ profiling of clutter.
-- Gordon Williams <gordon.williams at collabora.co.uk> Mon, 29 Jan 2009 16:06:23 +0000
- Previous message: [maemo-commits] r17332 - in projects/haf/trunk/hildon-thumbnail: . debian
- Next message: [maemo-commits] r17335 - in projects/haf/trunk/dbus-glib/debian: . patches
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
