forked from 12to11/12to11

* subcompositor.c (ViewInsert, ViewInsertAfter) (ViewInsertBefore): Update bounds for child, not parent view. * tests/Imakefile (SRCS1, OBJS1): Build imgview first. (SRCS6, OBJS6): Add subcompositor tests. (PROGRAMS): Add subsurface_test. (subsurface_test): New program target. * tests/run_tests.sh (standard_tests): Add subsurface_test. * tests/svnignore.txt: Add subsurface_test. * tests/test_harness.c (swizzle_png_row_premultiply): New function. (load_png_image): Premultiply images w/ alpha channel. * tests/test_harness.h: Include more headers.
55 lines
2.4 KiB
Text
55 lines
2.4 KiB
Text
#include "../12to11.conf"
|
|
|
|
12TO11ROOT = ..
|
|
DEPLIBS = $(DEPXLIB)
|
|
LOCAL_LIBRARIES = $(WAYLAND_CLIENT) $(XLIB) $(PNG)
|
|
COMMONOBJS = test_harness.o
|
|
COMMONSRCS = test_harness.c
|
|
HEADER = test_harness.h
|
|
EXTRA_DEFINES := -D_GNU_SOURCE -U_BSD_SOURCE -U_SVID_SOURCE
|
|
|
|
#define ScannerTarget(name) @@\
|
|
name.h: $(12TO11ROOT)/name.xml @@\
|
|
$(WAYLAND_SCANNER) client-header $< $@ @@\
|
|
@@\
|
|
name.c: $(12TO11ROOT)/name.xml name.h @@\
|
|
$(WAYLAND_SCANNER) private-code $< $@ @@\
|
|
@@\
|
|
COMMONOBJS := $(COMMONOBJS) name.o @@\
|
|
COMMONSRCS := $(COMMONSRCS) name.c @@\
|
|
HEADER := $(HEADER) name.h @@\
|
|
|
|
ScannerTarget(12to11-test)
|
|
ScannerTarget(viewporter)
|
|
|
|
/* Not actually a test. */
|
|
SRCS1 = $(COMMONSRCS) imgview.c
|
|
OBJS1 = $(COMMONSRCS) imgview.o
|
|
SRCS2 = $(COMMONSRCS) simple_test.c
|
|
OBJS2 = $(COMMONOBJS) simple_test.o
|
|
SRCS3 = $(COMMONSRCS) damage_test.c
|
|
OBJS3 = $(COMMONOBJS) damage_test.o
|
|
SRCS4 = $(COMMONSRCS) transform_test.c
|
|
OBJS4 = $(COMMONSRCS) transform_test.o
|
|
SRCS5 = $(COMMONSRCS) viewporter_test.c
|
|
OBJS5 = $(COMMONSRCS) viewporter_test.o
|
|
SRCS6 = $(COMMONSRCS) subsurface_test.c
|
|
OBJS6 = $(COMMONSRCS) subsurface_test.o
|
|
PROGRAMS = imgview simple_test damage_test transform_test viewporter_test subsurface_test
|
|
|
|
/* Make all objects depend on HEADER. */
|
|
$(OBJS1): $(HEADER)
|
|
|
|
/* And depend on all sources and headers. */
|
|
depend:: $(HEADER) $(SRCS1)
|
|
|
|
NormalProgramTarget(imgview,$(OBJS1),NullParameter,$(LOCAL_LIBRARIES),NullParameter)
|
|
NormalProgramTarget(simple_test,$(OBJS2),NullParameter,$(LOCAL_LIBRARIES),NullParameter)
|
|
NormalProgramTarget(damage_test,$(OBJS3),NullParameter,$(LOCAL_LIBRARIES),NullParameter)
|
|
NormalProgramTarget(transform_test,$(OBJS4),NullParameter,$(LOCAL_LIBRARIES),NullParameter)
|
|
NormalProgramTarget(viewporter_test,$(OBJS5),NullParameter,$(LOCAL_LIBRARIES),NullParameter)
|
|
NormalProgramTarget(subsurface_test,$(OBJS6),NullParameter,$(LOCAL_LIBRARIES),NullParameter)
|
|
DependTarget3($(SRCS1),$(SRCS2),$(SRCS3))
|
|
DependTarget3($(SRCS4),$(SRCS5),$(SRCS6))
|
|
|
|
all:: $(PROGRAMS)
|