mirror of
https://github.com/brl/mutter.git
synced 2024-12-01 20:30:41 -05:00
e5e58f8075
Add the ability to add tracing instrumentation to the code. When enabled, trace entries will generate a file with timing information that will be processable by sysprof for generating visualization of traces over time. While enabled by default at compile time, it is possible to disable the expansion of the macros completely by passing --disable-tracing to ./configure. Tracing is so far only actually done if actually enabled on explicitly specified threads. This will be used by Mutter passing the write end of a pipe, where the read end is sent to Sysprof itself via the D-Bus method 'Capture()'. By passing that, we have to detect EPIPE that is sent when Sysprof stops recording. Fortunately, we already ignore the signal at meta_init(), so no need to add a custom signal handler. https://gitlab.gnome.org/GNOME/mutter/merge_requests/197
126 lines
2.1 KiB
Meson
126 lines
2.1 KiB
Meson
cogl_includesubdir = join_paths(pkgname, 'cogl')
|
|
cogl_includedir = join_paths(includedir, cogl_includesubdir)
|
|
cogl_srcdir = meson.current_source_dir()
|
|
|
|
cogl_includepath = include_directories('.', 'cogl')
|
|
|
|
cdata = configuration_data()
|
|
cdata.set('HAVE_COGL_GL', have_gl)
|
|
cdata.set('HAVE_COGL_GLES2', have_gles2)
|
|
cdata.set('HAVE_TRACING', have_profiler)
|
|
cdata.set('ENABLE_UNIT_TESTS', have_cogl_tests)
|
|
|
|
cogl_config_h = configure_file(
|
|
input: 'cogl-config.h.meson',
|
|
output: 'cogl-config.h',
|
|
configuration: cdata)
|
|
|
|
cogl_pkg_deps = [
|
|
glib_dep,
|
|
gobject_dep,
|
|
]
|
|
|
|
cogl_pkg_private_deps = [
|
|
cairo_dep,
|
|
gmodule_no_export_dep,
|
|
gdk_pixbuf_dep,
|
|
#uprof_dep,
|
|
]
|
|
|
|
if have_profiler
|
|
cogl_pkg_private_deps += [
|
|
sysprof_dep,
|
|
]
|
|
endif
|
|
|
|
if have_wayland
|
|
cogl_pkg_deps += [
|
|
wayland_server_dep,
|
|
]
|
|
endif
|
|
|
|
if have_egl
|
|
cogl_pkg_deps += [
|
|
egl_dep,
|
|
]
|
|
endif
|
|
|
|
if have_x11
|
|
cogl_pkg_deps += [
|
|
x11_dep,
|
|
]
|
|
cogl_pkg_private_deps += [
|
|
xext_dep,
|
|
xfixes_dep,
|
|
xdamage_dep,
|
|
xcomposite_dep,
|
|
xrandr_dep,
|
|
]
|
|
endif
|
|
|
|
if have_gl
|
|
cogl_pkg_deps += [
|
|
gl_dep,
|
|
]
|
|
endif
|
|
|
|
if have_gles2
|
|
cogl_pkg_deps += [
|
|
gles2_dep,
|
|
]
|
|
endif
|
|
|
|
cogl_deps = [
|
|
cogl_pkg_deps,
|
|
cogl_pkg_private_deps,
|
|
m_dep,
|
|
]
|
|
|
|
cogl_c_args = [
|
|
'-DCOGL_LOCALEDIR="@0@"'.format(localedir),
|
|
'-DCOGL_COMPILATION',
|
|
]
|
|
|
|
if have_gl
|
|
cogl_c_args += [
|
|
'-DCOGL_GL_LIBNAME="@0@"'.format(gl_libname)
|
|
]
|
|
endif
|
|
|
|
if have_gles2
|
|
cogl_c_args += [
|
|
'-DCOGL_GLES2_LIBNAME="@0@"'.format(gles2_libname)
|
|
]
|
|
endif
|
|
|
|
cogl_debug_c_args = []
|
|
buildtype = get_option('buildtype')
|
|
if get_option('debug')
|
|
cogl_debug_c_args += [
|
|
'-DCOGL_GL_DEBUG',
|
|
'-DCOGL_OBJECT_DEBUG',
|
|
'-DCOGL_ENABLE_DEBUG',
|
|
'-fno-omit-frame-pointer'
|
|
]
|
|
elif buildtype != 'plain'
|
|
cogl_debug_c_args += [
|
|
'-DG_DISABLE_CHECKS',
|
|
'-DG_DISABLE_CAST_CHECKS'
|
|
]
|
|
endif
|
|
supported_cogl_debug_c_args = cc.get_supported_arguments(cogl_debug_c_args)
|
|
cogl_c_args += cogl_debug_c_args
|
|
|
|
if have_cogl_tests
|
|
subdir('test-fixtures')
|
|
endif
|
|
subdir('cogl')
|
|
subdir('cogl-path')
|
|
subdir('cogl-pango')
|
|
if have_gles2
|
|
subdir('cogl-gles2')
|
|
endif
|
|
if have_cogl_tests
|
|
subdir('tests')
|
|
endif
|