diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2017-06-11 07:31:39 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2017-06-11 07:31:39 +0000 |
commit | b7e3302b640c32a948aaeffc42a3989b35b9dc66 (patch) | |
tree | 095e2d6c09f59a37afa35f9097d9e89ea36dbd84 | |
parent | e5684d749ef140dc3b8321c028e51cf3b94fe411 (diff) | |
parent | 0cff5950f532ef4116a4e5559d54eecaf4743e49 (diff) | |
download | goldfish-opengl-b7e3302b640c32a948aaeffc42a3989b35b9dc66.tar.gz |
release-request-46bf7ca6-57e7-44b8-8edc-ea8830c1cb3b-for-git_oc-mr1-release-4090244 snap-temp-L07700000073092334
Change-Id: I38a43fdc724e203106c125474ff4fc5cff69a005
-rw-r--r-- | Android.mk | 2 | ||||
-rw-r--r-- | common.mk | 4 | ||||
-rw-r--r-- | system/OpenglSystemCommon/Android.mk | 7 | ||||
-rw-r--r-- | system/egl/Android.mk | 7 | ||||
-rw-r--r-- | system/egl/goldfish_sync.h | 4 | ||||
-rw-r--r-- | system/gralloc/gralloc.cpp | 7 |
6 files changed, 25 insertions, 6 deletions
@@ -28,7 +28,7 @@ ifeq (O, $(PLATFORM_VERSION_CODENAME)) EMUGL_COMMON_CFLAGS += -DGOLDFISH_HIDL_GRALLOC endif -ifeq ($(PLATFORM_VERSION_CODENAME.PPR1),P) +ifdef IS_AT_LEAST_OPD1 EMUGL_COMMON_CFLAGS += -DEMULATOR_OPENGL_POST_O=1 endif @@ -106,8 +106,8 @@ EMUGL_EXPORT_TYPES := \ STATIC_LIBRARIES \ ADDITIONAL_DEPENDENCIES -ifeq ($(PLATFORM_VERSION_CODENAME.PPR1),P) -EMUGL_EXPORT_TYPES += HEADER_LIBRARIES +ifdef IS_AT_LEAST_OPD1 +EMUGL_EXPORT_TYPES += HEADER_LIBRARIES endif # Initialize a module in our database diff --git a/system/OpenglSystemCommon/Android.mk b/system/OpenglSystemCommon/Android.mk index 007b5039..93051195 100644 --- a/system/OpenglSystemCommon/Android.mk +++ b/system/OpenglSystemCommon/Android.mk @@ -11,12 +11,17 @@ LOCAL_SRC_FILES := \ QemuPipeStream.cpp \ ThreadInfo.cpp -ifeq ($(PLATFORM_VERSION_CODENAME.PPR1),P) +ifdef IS_AT_LEAST_OPD1 LOCAL_HEADER_LIBRARIES += libnativebase_headers $(call emugl-export,HEADER_LIBRARIES,libnativebase_headers) endif +ifdef IS_AT_LEAST_OPD1 +LOCAL_HEADER_LIBRARIES += libhardware_headers +$(call emugl-export,HEADER_LIBRARIES,libhardware_headers) +endif + $(call emugl-export,C_INCLUDES,$(LOCAL_PATH) bionic/libc/private) $(call emugl-end-module) diff --git a/system/egl/Android.mk b/system/egl/Android.mk index 476cf948..2d7a5595 100644 --- a/system/egl/Android.mk +++ b/system/egl/Android.mk @@ -13,12 +13,17 @@ LOCAL_SRC_FILES := \ egl.cpp \ ClientAPIExts.cpp -ifeq ($(PLATFORM_VERSION_CODENAME.PPR1),P) +ifdef IS_AT_LEAST_OPD1 LOCAL_SHARED_LIBRARIES += libdl libnativewindow else LOCAL_SHARED_LIBRARIES += libdl endif +ifdef IS_AT_LEAST_OPD1 +LOCAL_SHARED_LIBRARIES += libui +LOCAL_HEADER_LIBRARIES += libnativebase_headers +endif + # Used to access the Bionic private OpenGL TLS slot LOCAL_C_INCLUDES += bionic/libc/private diff --git a/system/egl/goldfish_sync.h b/system/egl/goldfish_sync.h index 4667a776..6b30fe5b 100644 --- a/system/egl/goldfish_sync.h +++ b/system/egl/goldfish_sync.h @@ -18,6 +18,10 @@ #include <linux/ioctl.h> #include <linux/types.h> #include <sys/cdefs.h> +#ifdef EMULATOR_OPENGL_POST_O +#include <sys/ioctl.h> +#include <sys/unistd.h> +#endif #include <fcntl.h> // Make it conflict with ioctls that are not likely to be used diff --git a/system/gralloc/gralloc.cpp b/system/gralloc/gralloc.cpp index 0b6785e7..ae0a3243 100644 --- a/system/gralloc/gralloc.cpp +++ b/system/gralloc/gralloc.cpp @@ -27,6 +27,7 @@ #include "HostConnection.h" #include "ProcessPipe.h" #include "glUtils.h" +#include <utils/CallStack.h> #include <cutils/log.h> #include <cutils/properties.h> @@ -604,7 +605,11 @@ static int gralloc_alloc(alloc_device_t* dev, } } - if (sw_read || sw_write || hw_cam_write || hw_vid_enc_read) { + // API26 always expect at least one file descriptor is associated with + // one color buffer + // BUG: 37719038 + if (PLATFORM_SDK_VERSION >= 26 || + sw_read || sw_write || hw_cam_write || hw_vid_enc_read) { // keep space for image on guest memory if SW access is needed // or if the camera is doing writing if (yuv_format) { |