mutter/cogl/Makefile.am
Neil Roberts 067a520f26 cogl: Support retained paths
This adds three new API calls:

  CoglHandle cogl_path_get()
  void cogl_path_set(CoglHandle path)
  CoglHandle cogl_path_copy(CoglHandle path)

All of the fields relating to the path have been moved from the Cogl
context to a new CoglPath handle type. The cogl context now just
contains a CoglPath handle. All of the existing path commands
manipulate the data in the current path handle. cogl_path_new now just
creates a new path handle and unrefs the old one.

The path handle can be stored for later with cogl_path_get. The path
can then be copied with cogl_path_copy. Internally it implements
copy-on-write semantics with an extra optimisation that it will only
copy the data if the new path is modified, but not if the original
path is modified. It can do this because the only way to modify a path
is by appending to it so the copied path is able to store its own path
length and only render the nodes up to that length. For this to work
the copied path also needs to keep its own copies of the path extents
because the parent path may change these by adding nodes.

The clip stack now uses the cogl_path_copy mechanism to store paths in
the stack instead of directly copying the data. This should save some
memory and processing time.
2010-04-08 19:53:38 +01:00

198 lines
5.7 KiB
Makefile

include $(top_srcdir)/build/autotools/Makefile.am.silent
NULL =
SUBDIRS = driver
BUILT_SOURCES =
EXTRA_DIST =
CLEANFILES =
DISTCLEANFILES =
# pkg-config ==================================================================
pc_files = \
cogl-$(COGL_DRIVER)-$(CLUTTER_API_VERSION).pc \
cogl-$(CLUTTER_API_VERSION).pc
cogl-$(CLUTTER_API_VERSION).pc: cogl.pc
$(QUIET_GEN)cp -f $< $(@F)
cogl-$(COGL_DRIVER)-$(CLUTTER_API_VERSION).pc: cogl.pc
$(QUIET_GEN)cp -f $< $(@F)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = $(pc_files)
EXTRA_DIST += cogl.pc.in
CLEANFILES += $(pc_files)
INCLUDES = \
-I$(top_srcdir) \
-I$(top_srcdir)/clutter/cogl \
-I$(srcdir)/winsys \
-I$(srcdir)/driver/$(COGL_DRIVER) \
-I$(top_builddir)/clutter/cogl \
$(NULL)
AM_CPPFLAGS = \
-DG_DISABLE_SINGLE_INCLUDES \
-DG_DISABLE_DEPRECATED \
-DG_LOG_DOMAIN=\"Cogl-$(COGL_WINSYS)\" \
-DCLUTTER_COMPILATION \
$(COGL_DEBUG_CFLAGS) \
$(CLUTTER_DEBUG_CFLAGS) \
$(NULL)
AM_CFLAGS = $(CLUTTER_CFLAGS) $(MAINTAINER_CFLAGS)
cogl-defines.h: $(top_builddir)/clutter/cogl/cogl/driver/gl/cogl-defines.h $(top_builddir)/clutter/cogl/cogl/driver/gles/cogl-defines.h
$(QUIET_GEN)cp -f $(top_builddir)/clutter/cogl/cogl/driver/$(COGL_DRIVER)/cogl-defines.h $(@F)
BUILT_SOURCES += cogl-defines.h
DISTCLEANFILES += cogl-defines.h
# public headers
cogl_public_h = \
$(srcdir)/cogl-bitmap.h \
$(srcdir)/cogl-buffer.h \
$(srcdir)/cogl-color.h \
$(srcdir)/cogl-debug.h \
$(srcdir)/cogl-fixed.h \
$(srcdir)/cogl-material.h \
$(srcdir)/cogl-matrix.h \
$(srcdir)/cogl-offscreen.h \
$(srcdir)/cogl-primitives.h \
$(srcdir)/cogl-path.h \
$(srcdir)/cogl-pixel-buffer.h \
$(srcdir)/cogl-shader.h \
$(srcdir)/cogl-texture.h \
$(srcdir)/cogl-types.h \
$(srcdir)/cogl-vertex-buffer.h \
$(srcdir)/cogl.h \
$(NULL)
# windowing system; all sources have to be distributed, but we'll
# compile just the one we need
cogl_winsys_sources = \
$(srcdir)/winsys/cogl-eglnative.c \
$(srcdir)/winsys/cogl-eglx.c \
$(srcdir)/winsys/cogl-glx.c \
$(srcdir)/winsys/cogl-osx.c \
$(srcdir)/winsys/cogl-sdl.c \
$(srcdir)/winsys/cogl-win32.c \
$(NULL)
cogl_sources_c = \
$(srcdir)/winsys/cogl-winsys.h \
$(srcdir)/winsys/cogl-@COGL_WINSYS@.c \
$(srcdir)/cogl-handle.h \
$(srcdir)/cogl-context.h \
$(srcdir)/cogl-context.c \
$(srcdir)/cogl-internal.h \
$(srcdir)/cogl.c \
$(srcdir)/cogl-util.h \
$(srcdir)/cogl-util.c \
$(srcdir)/cogl-bitmap-private.h \
$(srcdir)/cogl-bitmap.c \
$(srcdir)/cogl-bitmap-fallback.c \
$(srcdir)/cogl-primitives.h \
$(srcdir)/cogl-primitives.c \
$(srcdir)/cogl-path-private.h \
$(srcdir)/cogl-path.h \
$(srcdir)/cogl-path.c \
$(srcdir)/cogl-bitmap-pixbuf.c \
$(srcdir)/cogl-clip-stack.h \
$(srcdir)/cogl-clip-stack.c \
$(srcdir)/cogl-feature-private.h \
$(srcdir)/cogl-feature-private.c \
$(srcdir)/cogl-fixed.c \
$(srcdir)/cogl-color.c \
$(srcdir)/cogl-buffer-private.h \
$(srcdir)/cogl-buffer.c \
$(srcdir)/cogl-pixel-buffer-private.h \
$(srcdir)/cogl-pixel-buffer.c \
$(srcdir)/cogl-vertex-buffer-private.h \
$(srcdir)/cogl-vertex-buffer.c \
$(srcdir)/cogl-matrix.c \
$(srcdir)/cogl-matrix-private.h \
$(srcdir)/cogl-matrix-stack.c \
$(srcdir)/cogl-matrix-stack.h \
$(srcdir)/cogl-material.c \
$(srcdir)/cogl-material-private.h \
$(srcdir)/cogl-blend-string.c \
$(srcdir)/cogl-blend-string.h \
$(srcdir)/cogl-debug.c \
$(srcdir)/cogl-sub-texture-private.h \
$(srcdir)/cogl-texture-private.h \
$(srcdir)/cogl-texture-2d-private.h \
$(srcdir)/cogl-texture-2d-sliced-private.h \
$(srcdir)/cogl-texture-driver.h \
$(srcdir)/cogl-sub-texture.c \
$(srcdir)/cogl-texture.c \
$(srcdir)/cogl-texture-2d.c \
$(srcdir)/cogl-texture-2d-sliced.c \
$(srcdir)/cogl-atlas.h \
$(srcdir)/cogl-atlas.c \
$(srcdir)/cogl-atlas-texture-private.h \
$(srcdir)/cogl-atlas-texture.c \
$(srcdir)/cogl-spans.h \
$(srcdir)/cogl-spans.c \
$(srcdir)/cogl-journal-private.h \
$(srcdir)/cogl-journal.c \
$(srcdir)/cogl-framebuffer-private.h \
$(srcdir)/cogl-framebuffer.c \
$(srcdir)/cogl-matrix-mesa.h \
$(srcdir)/cogl-matrix-mesa.c \
$(srcdir)/cogl-profile.h \
$(srcdir)/cogl-profile.c \
$(NULL)
# glib-mkenums rules
glib_enum_h = cogl-enum-types.h
glib_enum_c = cogl-enum-types.c
glib_enum_headers = $(cogl_public_h)
include $(top_srcdir)/build/autotools/Makefile.am.enums
noinst_LTLIBRARIES = libclutter-cogl.la
libclutter_cogl_la_LIBADD = -lm $(CLUTTER_LIBS) $(top_builddir)/clutter/cogl/cogl/driver/$(COGL_DRIVER)/libclutter-cogl-driver.la
libclutter_cogl_la_SOURCES = $(BUILT_SOURCES) $(cogl_sources_c)
EXTRA_DIST += $(cogl_winsys_sources)
EXTRA_DIST += stb_image.c
# COGL installed headers
cogl_headers = \
$(cogl_public_h) \
$(srcdir)/cogl-deprecated.h \
cogl-defines.h \
cogl-enum-types.h \
$(NULL)
coglincludedir = $(includedir)/clutter-@CLUTTER_API_VERSION@/cogl
coglinclude_HEADERS = $(cogl_headers)
if HAVE_INTROSPECTION
Cogl-@CLUTTER_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libclutter-cogl.la
$(QUIET_GEN)$(INTROSPECTION_SCANNER) -v \
--namespace Cogl --nsversion=@CLUTTER_API_VERSION@ \
$(INCLUDES) \
$(AM_CPPFLAGS) \
--c-include='cogl/cogl.h' \
--include=GL-1.0 \
--include=GObject-2.0 \
--library=libclutter-cogl.la \
--libtool="$(top_builddir)/libtool" \
--pkg gobject-2.0 \
--output $@ \
$(cogl_headers)
BUILT_GIRSOURCES = Cogl-@CLUTTER_API_VERSION@.gir
girdir = $(datadir)/gir-1.0
gir_DATA = $(BUILT_GIRSOURCES)
CLEANFILES += $(BUILT_GIRSOURCES)
endif