Currently, COGL depends on defining debug symbols by manually
modifying the source code. When it's done, it will forcefully
print stuff to the console.
Since COGL has also a pretty, runtime selectable debugging API
we might as well switch everything to it.
In order for this to happen, configure needs a new:
--enable-cogl-debug
command line switch; this will enable COGL debugging, the
CoglHandle debugging and will also turn on the error checking
for each GL operation.
The default setting for the COGL debug defines is off, since
it slows down the GL operations; enabling it for a particular
debug build is trivial, though.
This update fixes a few issues:
- the use of shave with mingw32 bash on windows,
- fix the unmangling of libtool names
- fix build on solaris
- add an --enable/disable-shave configure option (while still
defaulting to enabled)
COGL should ship its own pkg-config file, obviously still pointing
to Clutter's compiler flags and linking options, for COGL-specific
variables that might be queried at configure time.
For instance, it's easier (and less verbose) to do:
PKG_CHECK_EXISTS([cogl-gl-1.0],
[has_gl_backend=yes],
[has_gl_backend=no])
Than doing:
AC_MSG_CHECKING([for GL support in COGL])
cogl_backend=`$PKG_CONFIG --variable=cogl clutter-0.9`
if test x$cogl_backend = xgl; then
has_gl_backend=yes
AC_MSG_RESULT([found])
else
has_gl_backend=no
AC_MSG_RESULT([not found])
fi
If X11 comes with pkg-config files (like it should) we should not add
those dependencies to the generic BACKEND_PC_FILES variable: that
variable is meant only for backend-specific dependencies handled by
pkg-config -- and Clutter supports non-X11 backends as well.
The X11_PC_FILES variable will only contain X11-related dependencies,
and will be set as part of BACKEND_PC_FILES only inside the GLX and
EGLX backends sections.
Clutter is able to show debug messages written using the CLUTTER_NOTE()
macro at runtime, either by using an environment variable:
CLUTTER_DEBUG=...
or by using a command line switch:
--clutter-debug=...
--clutter-no-debug=...
Both are parsed during the initialization process by using the
GOption API.
COGL would benefit from having the same support.
In order to do this, we need a cogl_get_option_group() function in
COGL that sets up a GOptionGroup for COGL and adds a pre-parse hook
that will check the COGL_DEBUG environment variable. The OptionGroup
will also install two command line switches:
--cogl-debug
--cogl-no-debug
With the same semantics of the Clutter ones.
During Clutter initialization, the COGL option group will be attached
to the GOptionContext used to parse the command line options passed
to a Clutter application.
Every debug message written using:
COGL_NOTE (SECTION, "message format", arguments);
Will then be printed only if SECTION was enabled at runtime.
This whole machinery, like the equivalent one in Clutter, depends on
a compile time switch, COGL_ENABLE_DEBUG, which is enabled at the same
time as CLUTTER_ENABLE_DEBUG. Having two different symbols allows
greater granularity.
configure.ac: Check for gobject-introspection
build/introspection.m4: Include the file that defines the
GOBJECT_CHECK_INTROSPECTION m4 macro in case we want to disable
the introspection data generation.
clutter/json/Makefile.am: Build the .gir for "ClutterJson"
(json-glib as part of the Clutter library)
clutter/Makefile.am: Build the .gir for clutter, compile the
Clutter and ClutterJson girs into typelibs, and install them.
Also move GCC_FLAGS from $(INCLUDES) to $(AM_CFLAGS) since it includes
non-preprocessor flag like -Wall.
See also:
http://bugzilla.openedhand.com/show_bug.cgi?id=1450
Based on a patch by: Owen W. Taylor <otaylor@fishsoup.net>
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
The new stable release of gtk-doc provides the --name-space
option for the mkdb utility. This option allows to specify a
namespace for the symbols that will get stripped, so that we
don't get a symbols index containing only "C".
From the homepage (http://dolt.freedesktop.org): Dolt provides a drop-in
replacement for libtool that significantly decreases compile times on
the platforms it supports.
Bug #1453 - Asynchronous texture loading can starve cpu.
Add a mutex that is held in the loader threads during the image
decoding. We were spawning and starting a thread for each asynchronously
loaded texture. This can cause cpu / memory starvation when many pixbuf
loaders allocate their temporary memory at the same time.
Also added -fno-strict-aliasing to MAINTAINER_CFLAGS in configure.ac
to avoid incorrect warnings caused by the static mutex code.
Clutter depends on various libraries, some of them backend-specific
like the X11 libraries.
Whenever possible, we should add those requirements to the pkg-config
file. For this reason, we have a variable inside the configure.ac
template file which should be filled with the backend-specific modules
we check for during configure time, and then added to the standard
list of dependencies that we write inside the clutter.pc file.
The maintainer compiler flags we use trigger warnings and errors
in the autogenerated code that gtk-doc creates to scan the header
and source files. Since we cannot control that, and we must run
a distcheck with both --enable-gtk-doc and --enable-maintainer-flags
turned on, we need to use less-strict compiler flags when inside
the doc/reference subdirectories.
The way to do this is to split the maintainer compiler flags into
their own Makefile variable, called MAINTAINER_CFLAGS. The we
can use $(MAINTAINER_CFLAGS) in the INCLUDES or _CFLAGS sections
of each part of the source directories we wish to check with the
anal retentiveness suited for maintainers.
Clutter has a set of command line options that are added to every
application by means of clutter_init() or by obtaining the Clutter
GOptionGroup and using g_option_context_parse(). Thus, every Clutter
application will automatically have an --help command line switch
showing the list of options and their description.
At the moment, Clutter does not enable localization of the help,
thus making it less than useful on non-English locales.
This patch enables the machinery to create a localization file and
load it when initializing Clutter, by means of the GLib macros and
locale.h API we already use.
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Cairo has been an indirect dependency for Clutter since 0.8, through
the PangoCairo API.
Now we explicitly depend on Cairo in order to merge the clutter-cairo
API into Clutter core.
* tests/tools/Makefile.am: Optionally build the
libdisable-npots.la library depending on whether libdl was
detected in the configure script. A helper script is also
generated to setup the LD_PRELOAD.
* tests/conform/Makefile.am: There are now two versions of the
test-report and full-report rules. test-report-normal is the same
as before and test-report-disable-npots runs the tests with the
disable-npots wrapper script. The full-report rule runs both of
them and displays two separate HTML files. The test-report rule
just runs the normal version as before.
* configure.ac: Add a test for libdl
* tests/tools/disable-npots.sh.in: New file. Template for the
helper script
* tests/tools/disable-npots.c: New file
framework
* configure.ac:
* tests/*:
The tests have been reorganised into different categories: conformance,
interactive and micro benchmarks.
- conformance tests can be run as part of automated tests
- interactive tests are basically all the existing tests
- micro benchmarks focus on a single performance metric
I converted the timeline tests to conformance tests and also added some
tests from Neil Roberts and Ebassi.
Note: currently only the conformance tests use the glib test APIs,
though the micro benchmarks should too.
The other change is to make the unit tests link into monolithic binaries
which makes the build time for unit tests considerably faster. To deal
with the extra complexity this adds to debugging individual tests I
have added some sugar to the makefiles so all the tests can be run
directly via a symlink and when an individual test is run this way,
then a note is printed to the terminal explaining exactly how that test
may be debugged using GDB.
There is a convenience make rule: 'make test-report', that will run all
the conformance tests and hopefully even open the results in your web
browser. It skips some of the slower timeline tests, but you can run
those using 'make full-report'
Bug 1047 - API documentation from release tarball is not
installed by "make install"
* configure.ac:
* Makefile.am: Make the recursion into the documentation
directory depend on on whether we explicitly enable it or
if we are not inside an SVN checkout.
Bug 997 - automatic updates not working for named TFP pixmaps,
at least in x11
* clutter/glx/clutter-glx-texture-pixmap.c:
* clutter/glx/clutter-glx-texture-pixmap.h:
* clutter/x11/clutter-backend-x11.c:
* clutter/x11/clutter-x11-texture-pixmap.c:
* clutter/x11/clutter-x11-texture-pixmap.h:
* clutter/x11/clutter-x11.h:
* configure.ac:
* tests/test-pixmap.c:
Rework Andy Wingos patch a little adding more safety for now also
handling redirect Windows (as well as pixmaps)
* configure.ac: Detect the GL headers in flavour=fruity
* clutter/fruity/clutter-stage-fruity.c: Update the Fruity
backend to
use the new size negotiation API.
* autogen.sh: Check for, and run glib-gettextize.
* configure.ac: Set up the localization support.
* clutter/clutter-main.c: Do not define the GETTEXT_PACKAGE,
but use the one from the configure script.
* po/POTFILES.in: Template for the translatable files.
Bug#959 - Multiple minor improvements
* configure.ac: pick up GDKPIXBUF_PREFIX from gdk-pixbuf-2.0
module, not pango
* clutter/clutter-keysyms-table.h: cosmetic fix for ifdef guard
name in the comment (leftover from earlier commit)
* tests/test-textures.c: don't depend on GdkPixbuf as we're not
using any actual features from it, just plain pixel buffer
manipulation
* clutter/clutter-timeline.c
* clutter/clutter-timeline.h (clutter_timeline_list_markers): Use
gsize* to return number of items, not guint*
* tests/test-paint-wrapper.c: use correct type (guint*) in call
to clutter_actor_get_size()
* tests/test-depth.c (janus_group): properly take height2 into
account when calculating needed height for the rectangle
* tests/test-cogl-tex-getset.c: use rowstride, not width*4, when
calculating pixel offsets
* tests/test-cogl-tex-getset.c: Don't assume/force RGBA format,
also support ARGB format (needed with quartz imageloader.)
Bug #930 - add support for quartz imagebackend
* clutter/cogl/common/cogl-bitmap-pixbuf.c
(_cogl_bitmap_from_file): When USE_QUARTZ is defined implement
using Core Graphics.
* configure.ac: support --with-imagebackend=quartz and print
which imagebackend is selected. Make quartz default on OSX
* configure.ac: Clean up a bit the X11 and X extensions
checks with PKG_CHECK_EXISTS(). Since we are filling up the
X11_CFLAGS and X11_LIBS variables ourselves there is no
point in polluting the Makefiles with unused variables.
* clutter/Makefile.am: Remove the pkg-config variable
evaluation and use the values retrieved from the configure
script.
Bug #919 - Replacement pango renderer (Neil Roberts)
* clutter/clutter-backend.h:
* clutter/clutter-backend.c:
(clutter_backend_set_font_options),
(clutter_backend_get_font_options): Add the ability to set
the cairo_font_options_t* for the backend at construction
time, so that backend implementations can have their own
options.
* clutter/clutter-color.c: Include pango/pango-attributes.h
for the pango_color_parse() function.
* clutter/clutter-label.c:
(clutter_label_ensure_layout),
(clutter_label_init), (clutter_label_set_text),
(clutter_label_set_font_name), (clutter_label_set_ellipsize),
(clutter_label_set_use_markup): Ensure that the cache is
always primed when the Label changes; this makes sure that
the cache is rebuilt outside the paint run, which should
make the painting perform better especially on embedded
devices.
* clutter/clutter-entry.c:
(clutter_entry_ensure_layout),
(clutter_entry_init), (clutter_entry_set_text),
(clutter_entry_set_font_name): Ditto as above.
* clutter/clutter-private.h:
* clutter/clutter-main.[ch]: Create the font-map inside the
main context; add two new functions:
clutter_clear_glyph_cache()
clutter_set_use_mipmapped_text()
that control the glyphs cache.
* clutter/pango/Makefile.am:
* clutter/pango/pangoclutter-fontmap.c:
* clutter/pango/pangoclutter-private.h:
* clutter/pango/pangoclutter-render.c:
* clutter/pango/pangoclutter.h: Rewrite the Pango renderer
using a PangoCairo context and saving the glyphs inside a
more efficient cache.
* configure.ac: Depend on pangocairo instead of pangoft2.
* clutter/eglx/clutter-stage-egl.h:
* clutter/eglx/clutter-egl-headers.h:
* clutter/eglx/clutter-backend-egl.h:
* clutter/eglx/Makefile.am: Include the GLES and EGL headers via
clutter-egl-headers.h so that the right version can be used
depending on whether the GLES 2 wrapper is being used.
* configure.ac: Added an automake conditional for whether the GLES
2 wrapper should be used.
* clutter/eglx/clutter-stage-egl.c (clutter_stage_egl_realize):
Remove the call to glGetIntegerv to get the max texture size. It
was being called before the GL context was bound so it didn't work
anyway and it was causing trouble for the GLES 2 simulator.
* clutter/cogl/gles/stringify.sh: Shell script to convert the
shaders into a C string.
* clutter/cogl/gles/cogl-gles2-wrapper.h:
* clutter/cogl/gles/cogl-gles2-wrapper.c: Wrappers for most of the
missing GL functions in GLES 2.
* clutter/cogl/gles/cogl-fixed-fragment-shader.glsl:
* clutter/cogl/gles/cogl-fixed-vertex-shader.glsl: New shaders for
GLES 2
* clutter/cogl/gles/cogl-defines.h.in: Use the @CLUTTER_GL_HEADER@
macro instead of always using the GLES 1 header.
* clutter/cogl/gles/cogl-context.h (CoglContext): Include a field
for the state of the GLES 2 wrapper.
* clutter/cogl/gles/cogl-texture.c:
* clutter/cogl/gles/cogl-primitives.c:
* clutter/cogl/gles/cogl.c: Use wrapped versions of the GL
functions where neccessary.
* clutter/cogl/gles/Makefile.am: Add sources for the GLES 2
wrapper and an extra build step to put the GLSL files into a C
string whenever the files change.
builds.
* configure.ac: No longer check for GLee
* clutter/cogl/gl/cogl-defines.h.in: Don't bother including GLee.h
* build/mingw/mingw-cross-compile.sh: No longer downloads libGLee
but downloads the Mesa library instead and installs the headers
from that. Fixed the libpng version.
* clutter/x11/clutter-x11-texture-pixmap.c:
* configure.ac:
* tests/Makefile.am:
Remove the XComposite dep from Clutter itself, just use
in test-pixmap (if available)