Allocate buffers locally in systems without SurfaceFlinger
In Brillo systems, we have no applications and configure
SELinux policy statically. In this model, we do not need
a special service to allocate buffers, since any process
that needs buffers can be appropriately marked at build time.
Bug: 26936651
Test: A test program on brilloemulator can allocate buffers for
the camera with this patch.
Change-Id: Ifcdb7a4b878f9a26f4899c7b75a12447dcdb0ac9
diff --git a/libs/gui/Android.mk b/libs/gui/Android.mk
index 8a965dd..abc18db 100644
--- a/libs/gui/Android.mk
+++ b/libs/gui/Android.mk
@@ -91,6 +91,10 @@
LOCAL_CFLAGS += -DDONT_USE_FENCE_SYNC
endif
+ifeq ($(TARGET_BOARD_HAS_NO_SURFACE_FLINGER), true)
+ LOCAL_CFLAGS += -DHAVE_NO_SURFACE_FLINGER
+endif
+
include $(BUILD_SHARED_LIBRARY)
ifeq (,$(ONE_SHOT_MAKEFILE))