Skip to content

Commit

Permalink
[dummy_compositor] Implement dummy compositor D-Bus service. JB#46723
Browse files Browse the repository at this point in the history
Performing seamless compositor hand off (such as switching from early
boot unlock ui to regular lipstick ui) might not be possible if the
compositors have non-compatible dependencies - like whether some android
services are running or not.

A dummy compositor service - that implements D-Bus interface expected
by mce, but does not even attempt to control display hw - can be used
to insert a stop gap within compositor to compositor hand off sequence
where relevant services can then be started/stopped as required.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
  • Loading branch information
spiiroin committed Aug 8, 2019
1 parent 3755f08 commit d26a075
Show file tree
Hide file tree
Showing 4 changed files with 952 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .depend
Expand Up @@ -774,6 +774,7 @@ modules/fingerprint.o:\
modules/fingerprint.c\
builtin-gconf.h\
datapipe.h\
evdev.h\
mce-dbus.h\
mce-lib.h\
mce-log.h\
Expand All @@ -784,6 +785,7 @@ modules/fingerprint.pic.o:\
modules/fingerprint.c\
builtin-gconf.h\
datapipe.h\
evdev.h\
mce-dbus.h\
mce-lib.h\
mce-log.h\
Expand Down Expand Up @@ -1354,6 +1356,16 @@ tools/evdev_trace.pic.o:\
mce-log.h\
tools/fileusers.h\

tools/dummy_compositor.o:\
tools/dummy_compositor.c\
builtin-gconf.h\
mce-dbus.h\

tools/dummy_compositor.pic.o:\
tools/dummy_compositor.c\
builtin-gconf.h\
mce-dbus.h\

tools/fileusers.o:\
tools/fileusers.c\
mce-log.h\
Expand Down
9 changes: 8 additions & 1 deletion Makefile
Expand Up @@ -177,6 +177,7 @@ MODULES += $(MODULE_DIR)/packagekit.so
# Tools to build
TOOLS += $(TOOLDIR)/mcetool
TOOLS += $(TOOLDIR)/evdev_trace
TOOLS += $(TOOLDIR)/dummy_compositor

# Unit tests to build
UTESTS += $(UTESTDIR)/ut_display_conf
Expand Down Expand Up @@ -373,6 +374,7 @@ $(MODULE_DIR)/%.so : $(MODULE_DIR)/%.pic.o
TOOLS_PKG_NAMES += gobject-2.0
TOOLS_PKG_NAMES += glib-2.0
TOOLS_PKG_NAMES += dbus-1
TOOLS_PKG_NAMES += dbus-glib-1

TOOLS_PKG_CFLAGS := $(shell $(PKG_CONFIG) --cflags $(TOOLS_PKG_NAMES))
TOOLS_PKG_LDLIBS := $(shell $(PKG_CONFIG) --libs $(TOOLS_PKG_NAMES))
Expand All @@ -388,6 +390,10 @@ $(TOOLDIR)/evdev_trace : CFLAGS += $(TOOLS_CFLAGS)
$(TOOLDIR)/evdev_trace : LDLIBS += $(TOOLS_LDLIBS)
$(TOOLDIR)/evdev_trace : $(TOOLDIR)/evdev_trace.o evdev.o $(TOOLDIR)/fileusers.o

$(TOOLDIR)/dummy_compositor : CFLAGS += $(TOOLS_CFLAGS)
$(TOOLDIR)/dummy_compositor : LDLIBS += $(TOOLS_LDLIBS)
$(TOOLDIR)/dummy_compositor : $(TOOLDIR)/dummy_compositor.o

# ----------------------------------------------------------------------------
# UNIT TESTS
# ----------------------------------------------------------------------------
Expand Down Expand Up @@ -624,6 +630,7 @@ NORMALIZE_USES_SPC =\
tklock.c\
tklock.h\
tools/evdev_trace.c\
tools/dummy_compositor.c\
tools/mcetool.c\
tools/fileusers.c\
tools/fileusers.h\
Expand Down Expand Up @@ -680,7 +687,7 @@ endif
.SUFFIXES: .q .p

%.q : %.c ; $(CC) -o $@ -E $< $(CPPFLAGS) $(MCE_CFLAGS)
%.p : %.q ; cproto -s < $< | sed -e 's/_Bool/bool/g' | prettyproto.py
%.p : %.q ; cproto -s < $< | sed -e 's/_Bool/bool/g' | prettyproto.py | tee $@

clean::
$(RM) -f *.[qp] modules/*.[qp] tools/*.[qp]
Expand Down
1 change: 1 addition & 0 deletions rpm/mce.spec
Expand Up @@ -97,6 +97,7 @@ systemctl daemon-reload || :
%license COPYING debian/copyright
# binaries
%{_sbindir}/%{name}
%{_sbindir}/dummy_compositor
%dir %{_libdir}/%{name}
%dir %{_libdir}/%{name}/modules
%{_libdir}/%{name}/modules/*.so
Expand Down

0 comments on commit d26a075

Please sign in to comment.