~oem-solutions-group/unity-2d/clutter-1.0

« back to all changes in this revision

Viewing changes to clutter/clutter-profile.h

  • Committer: Bazaar Package Importer
  • Author(s): Emilio Pozuelo Monfort
  • Date: 2010-03-21 13:27:56 UTC
  • mto: (2.1.3 experimental)
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20100321132756-nf8yd30yxo3zzwcm
Tags: upstream-1.2.2
ImportĀ upstreamĀ versionĀ 1.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Clutter.
 
3
 *
 
4
 * An OpenGL based 'interactive canvas' library.
 
5
 *
 
6
 * Copyright (C) 2009 Intel Corporation.
 
7
 *
 
8
 * This library is free software; you can redistribute it and/or
 
9
 * modify it under the terms of the GNU Lesser General Public
 
10
 * License as published by the Free Software Foundation; either
 
11
 * version 2 of the License, or (at your option) any later version.
 
12
 *
 
13
 * This library is distributed in the hope that it will be useful,
 
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
16
 * Lesser General Public License for more details.
 
17
 *
 
18
 * You should have received a copy of the GNU Lesser General Public
 
19
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
 
20
 */
 
21
 
 
22
#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
 
23
#error "Only <clutter/clutter.h> can be included directly."
 
24
#endif
 
25
 
 
26
#ifndef _CLUTTER_PROFILE_H_
 
27
#define _CLUTTER_PROFILE_H_
 
28
 
 
29
#include <glib.h>
 
30
 
 
31
G_BEGIN_DECLS
 
32
 
 
33
typedef enum {
 
34
  CLUTTER_PROFILE_PICKING_ONLY    = 1 << 0,
 
35
  CLUTTER_PROFILE_DISABLE_REPORT  = 1 << 1
 
36
} ClutterProfileFlag;
 
37
 
 
38
#ifdef CLUTTER_ENABLE_PROFILE
 
39
 
 
40
#include <uprof.h>
 
41
 
 
42
extern UProfContext *_clutter_uprof_context;
 
43
 
 
44
#define CLUTTER_STATIC_TIMER    UPROF_STATIC_TIMER
 
45
#define CLUTTER_STATIC_COUNTER  UPROF_STATIC_COUNTER
 
46
#define CLUTTER_COUNTER_INC     UPROF_COUNTER_INC
 
47
#define CLUTTER_COUNTER_DEC     UPROF_COUNTER_DEC
 
48
#define CLUTTER_TIMER_START     UPROF_TIMER_START
 
49
#define CLUTTER_TIMER_STOP      UPROF_TIMER_STOP
 
50
 
 
51
void
 
52
_clutter_profile_suspend (void);
 
53
void
 
54
_clutter_profile_resume (void);
 
55
 
 
56
#else /* CLUTTER_ENABLE_PROFILE */
 
57
 
 
58
#define CLUTTER_STATIC_TIMER(A,B,C,D,E) extern void _clutter_dummy_decl (void)
 
59
#define CLUTTER_STATIC_COUNTER(A,B,C,D) extern void _clutter_dummy_decl (void)
 
60
#define CLUTTER_COUNTER_INC(A,B) G_STMT_START{ (void)0; }G_STMT_END
 
61
#define CLUTTER_COUNTER_DEC(A,B) G_STMT_START{ (void)0; }G_STMT_END
 
62
#define CLUTTER_TIMER_START(A,B) G_STMT_START{ (void)0; }G_STMT_END
 
63
#define CLUTTER_TIMER_STOP(A,B) G_STMT_START{ (void)0; }G_STMT_END
 
64
 
 
65
#define _clutter_profile_suspend() G_STMT_START {} G_STMT_END
 
66
#define _clutter_profile_resume() G_STMT_START {} G_STMT_END
 
67
 
 
68
#endif /* CLUTTER_ENABLE_PROFILE */
 
69
 
 
70
extern guint clutter_profile_flags;
 
71
 
 
72
G_END_DECLS
 
73
 
 
74
#endif /* _CLUTTER_PROFILE_H_ */