analysis: ClutterMain
• Remove unused variables. • Do not pre-initialize ClutterActor's GType; pre-emptive optimizations like these are more black magic than real optimization.
This commit is contained in:
parent
66920ea540
commit
bea1a0a6a2
@ -263,13 +263,11 @@ _clutter_stage_maybe_setup_viewport (ClutterStage *stage)
|
|||||||
void
|
void
|
||||||
_clutter_do_redraw (ClutterStage *stage)
|
_clutter_do_redraw (ClutterStage *stage)
|
||||||
{
|
{
|
||||||
ClutterMainContext *ctx;
|
|
||||||
ClutterMasterClock *master_clock;
|
|
||||||
static GTimer *timer = NULL;
|
static GTimer *timer = NULL;
|
||||||
static guint timer_n_frames = 0;
|
static guint timer_n_frames = 0;
|
||||||
|
ClutterMainContext *ctx;
|
||||||
|
|
||||||
ctx = _clutter_context_get_default ();
|
ctx = _clutter_context_get_default ();
|
||||||
master_clock = _clutter_master_clock_get_default ();
|
|
||||||
|
|
||||||
/* Before we can paint, we have to be sure we have the latest layout */
|
/* Before we can paint, we have to be sure we have the latest layout */
|
||||||
_clutter_stage_maybe_relayout (CLUTTER_ACTOR (stage));
|
_clutter_stage_maybe_relayout (CLUTTER_ACTOR (stage));
|
||||||
@ -2447,15 +2445,13 @@ _clutter_process_event_details (ClutterActor *stage,
|
|||||||
void
|
void
|
||||||
_clutter_process_event (ClutterEvent *event)
|
_clutter_process_event (ClutterEvent *event)
|
||||||
{
|
{
|
||||||
ClutterMainContext *context;
|
ClutterMainContext *context;
|
||||||
ClutterBackend *backend;
|
ClutterActor *stage;
|
||||||
ClutterActor *stage;
|
|
||||||
|
|
||||||
context = _clutter_context_get_default ();
|
context = _clutter_context_get_default ();
|
||||||
backend = context->backend;
|
|
||||||
stage = CLUTTER_ACTOR(event->any.stage);
|
|
||||||
|
|
||||||
if (!stage)
|
stage = CLUTTER_ACTOR (event->any.stage);
|
||||||
|
if (stage == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CLUTTER_TIMESTAMP (EVENT, "Event received");
|
CLUTTER_TIMESTAMP (EVENT, "Event received");
|
||||||
@ -2498,8 +2494,6 @@ clutter_base_init (void)
|
|||||||
|
|
||||||
if (!initialised)
|
if (!initialised)
|
||||||
{
|
{
|
||||||
GType foo; /* Quiet gcc */
|
|
||||||
|
|
||||||
initialised = TRUE;
|
initialised = TRUE;
|
||||||
|
|
||||||
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
|
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
|
||||||
@ -2507,9 +2501,6 @@ clutter_base_init (void)
|
|||||||
|
|
||||||
/* initialise GLib type system */
|
/* initialise GLib type system */
|
||||||
g_type_init ();
|
g_type_init ();
|
||||||
|
|
||||||
/* CLUTTER_TYPE_ACTOR */
|
|
||||||
foo = clutter_actor_get_type ();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user