Merge changes I05c45303,I25b71570,I56ebc0ee into nyc-dev
* changes:
vulkan: fix vkGet*ProcAddr for un-enabled extensions
vulkan: do not query non-enabled WSI functions
vulkan: pass hal_extensions to InitDriverTable
diff --git a/cmds/dumpstate/utils.cpp b/cmds/dumpstate/utils.cpp
index da4b5ad..f1a1ed6 100644
--- a/cmds/dumpstate/utils.cpp
+++ b/cmds/dumpstate/utils.cpp
@@ -51,10 +51,14 @@
static const int64_t NANOS_PER_SEC = 1000000000;
/* list of native processes to include in the native dumps */
+// This matches the /proc/pid/exe link instead of /proc/pid/cmdline.
static const char* native_processes_to_dump[] = {
"/system/bin/audioserver",
"/system/bin/cameraserver",
"/system/bin/drmserver",
+ "/system/bin/mediacodec", // media.codec
+ "/system/bin/mediadrmserver",
+ "/system/bin/mediaextractor", // media.extractor
"/system/bin/mediaserver",
"/system/bin/sdcard",
"/system/bin/surfaceflinger",
diff --git a/data/etc/car_core_hardware.xml b/data/etc/car_core_hardware.xml
index 8ed8460..ab89ef5 100644
--- a/data/etc/car_core_hardware.xml
+++ b/data/etc/car_core_hardware.xml
@@ -24,15 +24,11 @@
-->
<permissions>
<feature name="android.hardware.audio.output" />
- <feature name="android.hardware.camera" />
<feature name="android.hardware.location" />
<feature name="android.hardware.location.network" />
- <feature name="android.hardware.sensor.compass" />
- <feature name="android.hardware.sensor.accelerometer" />
<feature name="android.hardware.bluetooth" />
<feature name="android.hardware.touchscreen" />
<feature name="android.hardware.microphone" />
- <feature name="android.hardware.screen.landscape" />
<!-- Feature to specify if the device is a car -->
<feature name="android.hardware.type.automotive" />
diff --git a/opengl/include/EGL/eglext.h b/opengl/include/EGL/eglext.h
index b1f51f7..bef5f02 100644
--- a/opengl/include/EGL/eglext.h
+++ b/opengl/include/EGL/eglext.h
@@ -616,6 +616,10 @@
#define EGL_FRONT_BUFFER_AUTO_REFRESH_ANDROID 0x314C
#endif
+#ifndef EGL_KHR_mutable_render_buffer
+#define EGL_KHR_mutable_render_buffer 1
+#define EGL_MUTABLE_RENDER_BUFFER_BIT_KHR 0x1000
+#endif
#ifdef __cplusplus
}
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp
index b997574..613b63b 100644
--- a/opengl/libs/EGL/eglApi.cpp
+++ b/opengl/libs/EGL/eglApi.cpp
@@ -115,6 +115,7 @@
"EGL_KHR_partial_update " // strongly recommended
"EGL_EXT_buffer_age " // strongly recommended with partial_update
"EGL_KHR_create_context_no_error "
+ "EGL_KHR_mutable_render_buffer "
;
// extensions not exposed to applications but used by the ANDROID system
diff --git a/services/surfaceflinger/DisplayHardware/HWC2.cpp b/services/surfaceflinger/DisplayHardware/HWC2.cpp
index 5c78c68..f7678e4 100644
--- a/services/surfaceflinger/DisplayHardware/HWC2.cpp
+++ b/services/surfaceflinger/DisplayHardware/HWC2.cpp
@@ -30,6 +30,7 @@
#include <android/configuration.h>
+#include <algorithm>
#include <inttypes.h>
extern "C" {
@@ -303,6 +304,12 @@
mHwcDevice->getCapabilities(mHwcDevice, &numCapabilities, asInt);
}
+bool Device::hasCapability(HWC2::Capability capability) const
+{
+ return std::find(mCapabilities.cbegin(), mCapabilities.cend(),
+ capability) != mCapabilities.cend();
+}
+
void Device::loadFunctionPointers()
{
// For all of these early returns, we log an error message inside
@@ -378,8 +385,10 @@
mSetLayerDisplayFrame)) return;
if (!loadFunctionPointer(FunctionDescriptor::SetLayerPlaneAlpha,
mSetLayerPlaneAlpha)) return;
- if (!loadFunctionPointer(FunctionDescriptor::SetLayerSidebandStream,
- mSetLayerSidebandStream)) return;
+ if (hasCapability(Capability::SidebandStream)) {
+ if (!loadFunctionPointer(FunctionDescriptor::SetLayerSidebandStream,
+ mSetLayerSidebandStream)) return;
+ }
if (!loadFunctionPointer(FunctionDescriptor::SetLayerSourceCrop,
mSetLayerSourceCrop)) return;
if (!loadFunctionPointer(FunctionDescriptor::SetLayerTransform,
@@ -973,6 +982,11 @@
Error Layer::setSidebandStream(const native_handle_t* stream)
{
+ if (!mDevice.hasCapability(Capability::SidebandStream)) {
+ ALOGE("Attempted to call setSidebandStream without checking that the "
+ "device supports sideband streams");
+ return Error::Unsupported;
+ }
int32_t intError = mDevice.mSetLayerSidebandStream(mDevice.mHwcDevice,
mDisplayId, mId, stream);
return static_cast<Error>(intError);
diff --git a/services/surfaceflinger/DisplayHardware/HWC2.h b/services/surfaceflinger/DisplayHardware/HWC2.h
index 7d33a0a..967add0 100644
--- a/services/surfaceflinger/DisplayHardware/HWC2.h
+++ b/services/surfaceflinger/DisplayHardware/HWC2.h
@@ -89,6 +89,8 @@
// as connected
std::shared_ptr<Display> getDisplayById(hwc2_display_t id);
+ bool hasCapability(HWC2::Capability capability) const;
+
private:
// Initialization methods