mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 20:32:16 +00:00
5334547c00
This updates Cogland example compositor to use the stable Wayland 1.0 API. • When the client attaches a new buffer to a surface it is now added to a struct contaning pending the state instead of immediately switching to the new buffer. This state is then flushed when the surface is committed. • The frame callbacks are now queued in a pending list and only added to the compositor's main list when the surface is committed. Both lists are now a wl_list instead of a GQueue because it makes it easier to remove the callback without knowing which list it is in. • When the buffer is destroyed for a surface the resource for the buffer is now sent a release event. • It now flushes the clients in the prepare for the for the Wayland event GSource. This is part of the multi-threaded API in this Wayland patch: http://cgit.freedesktop.org/wayland/wayland/commit/?id=53d24713a31d59 • Implements a dummy wl_region interface. The only interfaces that actually use regions (the opaque and input regions) are ignored but we need the interface to create a resource. • Most the of the SHM interface is now implemented directly in libwayland-server except that it still needs to copy the data to the subregion of the texture when the damage region is committed. • The callback list for when a resource is destroyed has been unified into a generic wl_signal implementation so the signature for the functions has been changed. http://cgit.freedesktop.org/wayland/wayland/commit/?h=6802eaa68af9022 • The wl_buffer struct no longer has a user_data parameter so we can't attach our own CoglandBuffer data to it. Instead the CoglandSurface now just keeps track of the wl_buffer directly. • The Cogland example is now unconditionally built instead of checking the Wayland version number in the configure script. It looks like this check was broken anyway because it was checking the version of the gbm package rather than a Wayland package. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 4cbbc0f8e3de1fd44dee08b487f1c3f97dda8ede) Conflicts: examples/Makefile.am examples/cogland.c
108 lines
2.5 KiB
Makefile
108 lines
2.5 KiB
Makefile
include $(top_srcdir)/build/autotools/Makefile.am.silent
|
|
|
|
AM_CPPFLAGS = \
|
|
-I$(top_srcdir)
|
|
|
|
if !USE_GLIB
|
|
AM_CPPFLAGS += -I$(top_builddir)/deps/glib
|
|
endif
|
|
|
|
AM_CFLAGS = \
|
|
$(COGL_DEP_CFLAGS) \
|
|
$(COGL_EXTRA_CFLAGS) \
|
|
-DCOGL_ENABLE_EXPERIMENTAL_2_0_API
|
|
|
|
if INSTALL_EXAMPLES
|
|
AM_CFLAGS += -DCOGL_EXAMPLES_DATA=\""$(pkgdatadir)/examples-data/"\"
|
|
else
|
|
AM_CFLAGS += -DCOGL_EXAMPLES_DATA=\""$(abs_top_srcdir)/examples/"\"
|
|
endif
|
|
|
|
common_ldadd = \
|
|
$(COGL_DEP_LIBS) \
|
|
$(top_builddir)/cogl/libcogl.la
|
|
|
|
if !USE_GLIB
|
|
common_ldadd += $(top_builddir)/deps/glib/libglib.la
|
|
endif
|
|
|
|
programs = cogl-info
|
|
|
|
cogl_info_SOURCES = cogl-info.c
|
|
cogl_info_LDADD = $(common_ldadd)
|
|
|
|
if USE_GLIB
|
|
programs += cogl-hello cogl-msaa cogl-gles2-context
|
|
examples_datadir = $(pkgdatadir)/examples-data
|
|
examples_data_DATA =
|
|
|
|
cogl_hello_SOURCES = cogl-hello.c
|
|
cogl_hello_LDADD = $(common_ldadd)
|
|
cogl_msaa_SOURCES = cogl-msaa.c
|
|
cogl_msaa_LDADD = $(common_ldadd)
|
|
|
|
if BUILD_COGL_PANGO
|
|
programs += cogl-crate
|
|
cogl_crate_SOURCES = cogl-crate.c
|
|
cogl_crate_LDADD = $(common_ldadd) $(COGL_PANGO_DEP_LIBS) $(top_builddir)/cogl-pango/libcogl-pango.la
|
|
cogl_crate_CFLAGS = $(AM_CFLAGS) $(COGL_PANGO_DEP_CFLAGS)
|
|
examples_data_DATA += crate.jpg
|
|
endif
|
|
|
|
if X11_TESTS
|
|
programs += cogl-x11-foreign cogl-x11-tfp
|
|
cogl_x11_foreign_SOURCES = cogl-x11-foreign.c
|
|
cogl_x11_foreign_LDADD = $(common_ldadd)
|
|
cogl_x11_tfp_SOURCES = cogl-x11-tfp.c
|
|
cogl_x11_tfp_LDADD = $(common_ldadd)
|
|
endif
|
|
|
|
if SUPPORT_WAYLAND_EGL_SERVER
|
|
# Note: Cogland currently only builds for Wayland 0.85
|
|
programs += cogland
|
|
cogland_SOURCES = cogland.c
|
|
cogland_LDADD = $(common_ldadd)
|
|
endif
|
|
|
|
cogl_gles2_context_SOURCES = cogl-gles2-context.c
|
|
cogl_gles2_context_LDADD = $(common_ldadd)
|
|
|
|
if BUILD_COGL_GLES2
|
|
programs += cogl-gles2-gears
|
|
cogl_gles2_gears_SOURCES = cogl-gles2-gears.c
|
|
cogl_gles2_gears_CFLAGS = -I$(top_srcdir)/cogl-gles2 $(AM_CFLAGS)
|
|
cogl_gles2_gears_LDADD = $(common_ldadd) $(top_builddir)/cogl-gles2/libcogl-gles2.la
|
|
endif
|
|
|
|
endif #USE_GLIB
|
|
|
|
if SUPPORT_SDL
|
|
programs += cogl-sdl-hello
|
|
cogl_sdl_hello_SOURCES = cogl-sdl-hello.c
|
|
cogl_sdl_hello_LDADD = $(common_ldadd)
|
|
endif
|
|
|
|
if SUPPORT_SDL2
|
|
programs += cogl-sdl2-hello
|
|
cogl_sdl2_hello_SOURCES = cogl-sdl2-hello.c
|
|
cogl_sdl2_hello_LDADD = $(common_ldadd)
|
|
endif
|
|
|
|
|
|
if INSTALL_EXAMPLES
|
|
bin_PROGRAMS = $(programs)
|
|
else
|
|
noinst_PROGRAMS = $(programs)
|
|
endif
|
|
|
|
EXTRA_DIST = \
|
|
crate.jpg \
|
|
android/hello/AndroidManifest.xml \
|
|
android/hello/jni/Application.mk \
|
|
android/hello/jni/Android.mk \
|
|
android/hello/jni/main.c \
|
|
android/hello/res/values/strings.xml \
|
|
android/hello/.gitignore \
|
|
android/hello/build.xml
|
|
|