Loading cmds/installd/otapreopt_chroot.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -80,8 +80,6 @@ static std::vector<apex::ApexFile> ActivateApexPackages() { // system/apex/apexd/apexd_main.cpp. // // Only scan the APEX directory under /system (within the chroot dir). // Note that this leaves around the loop devices created and used by // libapexd's code, but this is fine, as we expect to reboot soon after. apex::scanPackagesDirAndActivate(apex::kApexPackageSystemDir); return apex::getActivePackages(); } Loading include/android/surface_control.h +10 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ #include <sys/cdefs.h> #include <android/data_space.h> #include <android/hardware_buffer.h> #include <android/hdr_metadata.h> #include <android/native_window.h> Loading Loading @@ -316,6 +317,15 @@ void ASurfaceTransaction_setBufferAlpha(ASurfaceTransaction* transaction, ASurfaceControl* surface_control, float alpha) __INTRODUCED_IN(29); /** * Sets the data space of the surface_control's buffers. * * If no data space is set, the surface control defaults to ADATASPACE_SRGB. */ void ASurfaceTransaction_setBufferDataSpace(ASurfaceTransaction* transaction, ASurfaceControl* surface_control, ADataSpace data_space) __INTRODUCED_IN(29); /* * SMPTE ST 2086 "Mastering Display Color Volume" static metadata * Loading libs/binder/Binder.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -218,7 +218,7 @@ void BBinder::setRequestingSid(bool requestingSid) if (!e) return; // out of memory } e->mRequestingSid = true; e->mRequestingSid = requestingSid; } BBinder::~BBinder() Loading libs/graphicsenv/Android.bp +3 −0 Original line number Diff line number Diff line Loading @@ -17,14 +17,17 @@ cc_library_shared { srcs: [ "GraphicsEnv.cpp", "IGpuService.cpp" ], cflags: ["-Wall", "-Werror"], shared_libs: [ "libbase", "libbinder", "libcutils", "liblog", "libutils", ], export_include_dirs: ["include"], Loading libs/graphicsenv/GraphicsEnv.cpp +42 −5 Original line number Diff line number Diff line Loading @@ -14,8 +14,11 @@ * limitations under the License. */ #define ATRACE_TAG ATRACE_TAG_GRAPHICS //#define LOG_NDEBUG 1 #define LOG_TAG "GraphicsEnv" #include <graphicsenv/GraphicsEnv.h> #include <dlfcn.h> Loading @@ -25,15 +28,16 @@ #include <android-base/properties.h> #include <android-base/strings.h> #include <android/dlext.h> #include <binder/IServiceManager.h> #include <cutils/properties.h> #include <graphicsenv/IGpuService.h> #include <log/log.h> #include <sys/prctl.h> #include <utils/Trace.h> #include <memory> #include <string> #include <dlfcn.h> // TODO(b/37049319) Get this from a header once one exists extern "C" { android_namespace_t* android_get_exported_namespace(const char*); Loading Loading @@ -155,9 +159,16 @@ void GraphicsEnv::setDriverPath(const std::string path) { void GraphicsEnv::setGpuStats(const std::string driverPackageName, const std::string driverVersionName, const uint64_t driverVersionCode, const std::string appPackageName) { ALOGV("setGpuStats: drvPkgName[%s], drvVerName[%s], drvVerCode[%lld], appPkgName[%s]", driverPackageName.c_str(), driverVersionName.c_str(), (long long)driverVersionCode, appPackageName.c_str()); ATRACE_CALL(); ALOGV("setGpuStats:\n" "\tdriverPackageName[%s]\n" "\tdriverVersionName[%s]\n" "\tdriverVersionCode[%llu]\n" "\tappPackageName[%s]\n", driverPackageName.c_str(), driverVersionName.c_str(), (unsigned long long)driverVersionCode, appPackageName.c_str()); mGpuStats = { .driverPackageName = driverPackageName, .driverVersionName = driverVersionName, Loading @@ -166,6 +177,32 @@ void GraphicsEnv::setGpuStats(const std::string driverPackageName, }; } void GraphicsEnv::sendGpuStats() { ATRACE_CALL(); // Do not sendGpuStats for those skipping the GraphicsEnvironment setup if (mGpuStats.appPackageName.empty()) return; ALOGV("sendGpuStats:\n" "\tdriverPackageName[%s]\n" "\tdriverVersionName[%s]\n" "\tdriverVersionCode[%llu]\n" "\tappPackageName[%s]\n", mGpuStats.driverPackageName.c_str(), mGpuStats.driverVersionName.c_str(), (unsigned long long)mGpuStats.driverVersionCode, mGpuStats.appPackageName.c_str()); const sp<IBinder> binder = defaultServiceManager()->checkService(String16("gpu")); if (!binder) { ALOGE("Failed to get gpu service for [%s]", mGpuStats.appPackageName.c_str()); return; } interface_cast<IGpuService>(binder)->setGpuStats(mGpuStats.driverPackageName, mGpuStats.driverVersionName, mGpuStats.driverVersionCode, mGpuStats.appPackageName); } void* GraphicsEnv::loadLibrary(std::string name) { const android_dlextinfo dlextinfo = { .flags = ANDROID_DLEXT_USE_NAMESPACE, Loading Loading
cmds/installd/otapreopt_chroot.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -80,8 +80,6 @@ static std::vector<apex::ApexFile> ActivateApexPackages() { // system/apex/apexd/apexd_main.cpp. // // Only scan the APEX directory under /system (within the chroot dir). // Note that this leaves around the loop devices created and used by // libapexd's code, but this is fine, as we expect to reboot soon after. apex::scanPackagesDirAndActivate(apex::kApexPackageSystemDir); return apex::getActivePackages(); } Loading
include/android/surface_control.h +10 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ #include <sys/cdefs.h> #include <android/data_space.h> #include <android/hardware_buffer.h> #include <android/hdr_metadata.h> #include <android/native_window.h> Loading Loading @@ -316,6 +317,15 @@ void ASurfaceTransaction_setBufferAlpha(ASurfaceTransaction* transaction, ASurfaceControl* surface_control, float alpha) __INTRODUCED_IN(29); /** * Sets the data space of the surface_control's buffers. * * If no data space is set, the surface control defaults to ADATASPACE_SRGB. */ void ASurfaceTransaction_setBufferDataSpace(ASurfaceTransaction* transaction, ASurfaceControl* surface_control, ADataSpace data_space) __INTRODUCED_IN(29); /* * SMPTE ST 2086 "Mastering Display Color Volume" static metadata * Loading
libs/binder/Binder.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -218,7 +218,7 @@ void BBinder::setRequestingSid(bool requestingSid) if (!e) return; // out of memory } e->mRequestingSid = true; e->mRequestingSid = requestingSid; } BBinder::~BBinder() Loading
libs/graphicsenv/Android.bp +3 −0 Original line number Diff line number Diff line Loading @@ -17,14 +17,17 @@ cc_library_shared { srcs: [ "GraphicsEnv.cpp", "IGpuService.cpp" ], cflags: ["-Wall", "-Werror"], shared_libs: [ "libbase", "libbinder", "libcutils", "liblog", "libutils", ], export_include_dirs: ["include"], Loading
libs/graphicsenv/GraphicsEnv.cpp +42 −5 Original line number Diff line number Diff line Loading @@ -14,8 +14,11 @@ * limitations under the License. */ #define ATRACE_TAG ATRACE_TAG_GRAPHICS //#define LOG_NDEBUG 1 #define LOG_TAG "GraphicsEnv" #include <graphicsenv/GraphicsEnv.h> #include <dlfcn.h> Loading @@ -25,15 +28,16 @@ #include <android-base/properties.h> #include <android-base/strings.h> #include <android/dlext.h> #include <binder/IServiceManager.h> #include <cutils/properties.h> #include <graphicsenv/IGpuService.h> #include <log/log.h> #include <sys/prctl.h> #include <utils/Trace.h> #include <memory> #include <string> #include <dlfcn.h> // TODO(b/37049319) Get this from a header once one exists extern "C" { android_namespace_t* android_get_exported_namespace(const char*); Loading Loading @@ -155,9 +159,16 @@ void GraphicsEnv::setDriverPath(const std::string path) { void GraphicsEnv::setGpuStats(const std::string driverPackageName, const std::string driverVersionName, const uint64_t driverVersionCode, const std::string appPackageName) { ALOGV("setGpuStats: drvPkgName[%s], drvVerName[%s], drvVerCode[%lld], appPkgName[%s]", driverPackageName.c_str(), driverVersionName.c_str(), (long long)driverVersionCode, appPackageName.c_str()); ATRACE_CALL(); ALOGV("setGpuStats:\n" "\tdriverPackageName[%s]\n" "\tdriverVersionName[%s]\n" "\tdriverVersionCode[%llu]\n" "\tappPackageName[%s]\n", driverPackageName.c_str(), driverVersionName.c_str(), (unsigned long long)driverVersionCode, appPackageName.c_str()); mGpuStats = { .driverPackageName = driverPackageName, .driverVersionName = driverVersionName, Loading @@ -166,6 +177,32 @@ void GraphicsEnv::setGpuStats(const std::string driverPackageName, }; } void GraphicsEnv::sendGpuStats() { ATRACE_CALL(); // Do not sendGpuStats for those skipping the GraphicsEnvironment setup if (mGpuStats.appPackageName.empty()) return; ALOGV("sendGpuStats:\n" "\tdriverPackageName[%s]\n" "\tdriverVersionName[%s]\n" "\tdriverVersionCode[%llu]\n" "\tappPackageName[%s]\n", mGpuStats.driverPackageName.c_str(), mGpuStats.driverVersionName.c_str(), (unsigned long long)mGpuStats.driverVersionCode, mGpuStats.appPackageName.c_str()); const sp<IBinder> binder = defaultServiceManager()->checkService(String16("gpu")); if (!binder) { ALOGE("Failed to get gpu service for [%s]", mGpuStats.appPackageName.c_str()); return; } interface_cast<IGpuService>(binder)->setGpuStats(mGpuStats.driverPackageName, mGpuStats.driverVersionName, mGpuStats.driverVersionCode, mGpuStats.appPackageName); } void* GraphicsEnv::loadLibrary(std::string name) { const android_dlextinfo dlextinfo = { .flags = ANDROID_DLEXT_USE_NAMESPACE, Loading