Loading services/surfaceflinger/DisplayHardware/AidlComposerHal.cpp +20 −5 Original line number Original line Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include "AidlComposerHal.h" #include "AidlComposerHal.h" #include <android-base/file.h> #include <android/binder_ibinder_platform.h> #include <android/binder_ibinder_platform.h> #include <android/binder_manager.h> #include <android/binder_manager.h> #include <log/log.h> #include <log/log.h> Loading Loading @@ -262,13 +263,27 @@ std::vector<Capability> AidlComposer::getCapabilities() { } } std::string AidlComposer::dumpDebugInfo() { std::string AidlComposer::dumpDebugInfo() { std::string info; int pipefds[2]; const auto status = mAidlComposer->dumpDebugInfo(&info); int result = pipe(pipefds); if (!status.isOk()) { if (result < 0) { ALOGE("dumpDebugInfo failed %s", status.getDescription().c_str()); ALOGE("dumpDebugInfo: pipe failed: %s", strerror(errno)); return {}; return {}; } } return info; std::string str; const auto status = mAidlComposer->dump(pipefds[1], /*args*/ nullptr, /*numArgs*/ 0); // Close the write-end of the pipe to make sure that when reading from the // read-end we will get eof instead of blocking forever close(pipefds[1]); if (status == STATUS_OK) { base::ReadFdToString(pipefds[0], &str); } else { ALOGE("dumpDebugInfo: dump failed: %d", status); } close(pipefds[0]); return str; } } void AidlComposer::registerCallback(HWC2::ComposerCallback& callback) { void AidlComposer::registerCallback(HWC2::ComposerCallback& callback) { Loading services/surfaceflinger/SurfaceFlinger.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -5341,7 +5341,7 @@ void SurfaceFlinger::dumpAllLocked(const DumpArgs& args, std::string& result) co colorizer.reset(result); colorizer.reset(result); const bool hwcDisabled = mDebugDisableHWC || mDebugFlashDelay; const bool hwcDisabled = mDebugDisableHWC || mDebugFlashDelay; StringAppendF(&result, " h/w composer %s\n", hwcDisabled ? "disabled" : "enabled"); StringAppendF(&result, " h/w composer %s\n", hwcDisabled ? "disabled" : "enabled"); getHwComposer().dump(result); dumpHwc(result); /* /* * Dump gralloc state * Dump gralloc state Loading Loading
services/surfaceflinger/DisplayHardware/AidlComposerHal.cpp +20 −5 Original line number Original line Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include "AidlComposerHal.h" #include "AidlComposerHal.h" #include <android-base/file.h> #include <android/binder_ibinder_platform.h> #include <android/binder_ibinder_platform.h> #include <android/binder_manager.h> #include <android/binder_manager.h> #include <log/log.h> #include <log/log.h> Loading Loading @@ -262,13 +263,27 @@ std::vector<Capability> AidlComposer::getCapabilities() { } } std::string AidlComposer::dumpDebugInfo() { std::string AidlComposer::dumpDebugInfo() { std::string info; int pipefds[2]; const auto status = mAidlComposer->dumpDebugInfo(&info); int result = pipe(pipefds); if (!status.isOk()) { if (result < 0) { ALOGE("dumpDebugInfo failed %s", status.getDescription().c_str()); ALOGE("dumpDebugInfo: pipe failed: %s", strerror(errno)); return {}; return {}; } } return info; std::string str; const auto status = mAidlComposer->dump(pipefds[1], /*args*/ nullptr, /*numArgs*/ 0); // Close the write-end of the pipe to make sure that when reading from the // read-end we will get eof instead of blocking forever close(pipefds[1]); if (status == STATUS_OK) { base::ReadFdToString(pipefds[0], &str); } else { ALOGE("dumpDebugInfo: dump failed: %d", status); } close(pipefds[0]); return str; } } void AidlComposer::registerCallback(HWC2::ComposerCallback& callback) { void AidlComposer::registerCallback(HWC2::ComposerCallback& callback) { Loading
services/surfaceflinger/SurfaceFlinger.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -5341,7 +5341,7 @@ void SurfaceFlinger::dumpAllLocked(const DumpArgs& args, std::string& result) co colorizer.reset(result); colorizer.reset(result); const bool hwcDisabled = mDebugDisableHWC || mDebugFlashDelay; const bool hwcDisabled = mDebugDisableHWC || mDebugFlashDelay; StringAppendF(&result, " h/w composer %s\n", hwcDisabled ? "disabled" : "enabled"); StringAppendF(&result, " h/w composer %s\n", hwcDisabled ? "disabled" : "enabled"); getHwComposer().dump(result); dumpHwc(result); /* /* * Dump gralloc state * Dump gralloc state Loading