Loading cmds/atrace/atrace.cpp +0 −81 Original line number Diff line number Diff line Loading @@ -571,81 +571,6 @@ static bool setPrintTgidEnableIfPresent(bool enable) return true; } // Poke all the binder-enabled processes in the system to get them to re-read // their system properties. static bool pokeBinderServices() { sp<IServiceManager> sm = defaultServiceManager(); Vector<String16> services = sm->listServices(); for (size_t i = 0; i < services.size(); i++) { sp<IBinder> obj = sm->checkService(services[i]); if (obj != nullptr) { Parcel data; if (obj->transact(IBinder::SYSPROPS_TRANSACTION, data, nullptr, 0) != OK) { if (false) { // XXX: For some reason this fails on tablets trying to // poke the "phone" service. It's not clear whether some // are expected to fail. String8 svc(services[i]); fprintf(stderr, "error poking binder service %s\n", svc.string()); return false; } } } } return true; } // Poke all the HAL processes in the system to get them to re-read // their system properties. static void pokeHalServices() { using ::android::hidl::base::V1_0::IBase; using ::android::hidl::manager::V1_0::IServiceManager; using ::android::hardware::hidl_string; using ::android::hardware::Return; sp<IServiceManager> sm = ::android::hardware::defaultServiceManager(); if (sm == nullptr) { fprintf(stderr, "failed to get IServiceManager to poke hal services\n"); return; } auto listRet = sm->list([&](const auto &interfaces) { for (size_t i = 0; i < interfaces.size(); i++) { string fqInstanceName = interfaces[i]; string::size_type n = fqInstanceName.find('/'); if (n == std::string::npos || interfaces[i].size() == n+1) continue; hidl_string fqInterfaceName = fqInstanceName.substr(0, n); hidl_string instanceName = fqInstanceName.substr(n+1, std::string::npos); Return<sp<IBase>> interfaceRet = sm->get(fqInterfaceName, instanceName); if (!interfaceRet.isOk()) { // ignore continue; } sp<IBase> interface = interfaceRet; if (interface == nullptr) { // ignore continue; } auto notifyRet = interface->notifySyspropsChanged(); if (!notifyRet.isOk()) { // ignore } } }); if (!listRet.isOk()) { // TODO(b/34242478) fix this when we determine the correct ACL //fprintf(stderr, "failed to list services: %s\n", listRet.description().c_str()); } } // Set the trace tags that userland tracing uses, and poke the running // processes to pick up the new value. static bool setTagsProperty(uint64_t tags) Loading Loading @@ -876,10 +801,6 @@ static bool setUpUserspaceTracing() } ok &= setAppCmdlineProperty(&packageList[0]); ok &= setTagsProperty(tags); #if !ATRACE_SHMEM ok &= pokeBinderServices(); pokeHalServices(); #endif if (g_tracePdx) { ok &= ServiceUtility::PokeServices(); } Loading @@ -891,8 +812,6 @@ static void cleanUpUserspaceTracing() { setTagsProperty(0); clearAppProperties(); pokeBinderServices(); pokeHalServices(); if (g_tracePdx) { ServiceUtility::PokeServices(); Loading libs/renderengine/Android.bp +0 −2 Original line number Diff line number Diff line Loading @@ -59,8 +59,6 @@ filegroup { "gl/Program.cpp", "gl/ProgramCache.cpp", "gl/filters/BlurFilter.cpp", "gl/filters/KawaseBlurFilter.cpp", "gl/filters/GaussianBlurFilter.cpp", "gl/filters/GenericProgram.cpp", ], } Loading libs/renderengine/gl/GLESRenderEngine.cpp +2 −9 Original line number Diff line number Diff line Loading @@ -50,8 +50,6 @@ #include "Program.h" #include "ProgramCache.h" #include "filters/BlurFilter.h" #include "filters/GaussianBlurFilter.h" #include "filters/KawaseBlurFilter.h" extern "C" EGLAPI const char* eglQueryStringImplementationANDROID(EGLDisplay dpy, EGLint name); Loading Loading @@ -430,17 +428,12 @@ GLESRenderEngine::GLESRenderEngine(const RenderEngineCreationArgs& args, EGLDisp } if (args.supportsBackgroundBlur) { char isGaussian[PROPERTY_VALUE_MAX]; property_get("debug.sf.gaussianBlur", isGaussian, "0"); if (atoi(isGaussian)) { mBlurFilter = new GaussianBlurFilter(*this); } else { mBlurFilter = new KawaseBlurFilter(*this); } mBlurFilter = new BlurFilter(*this); checkErrors("BlurFilter creation"); } mImageManager = std::make_unique<ImageManager>(this); mImageManager->initThread(); mDrawingBuffer = createFramebuffer(); } Loading libs/renderengine/gl/GLESRenderEngine.h +0 −2 Original line number Diff line number Diff line Loading @@ -261,8 +261,6 @@ private: friend class ImageManager; friend class GLFramebuffer; friend class BlurFilter; friend class GaussianBlurFilter; friend class KawaseBlurFilter; friend class GenericProgram; std::unique_ptr<FlushTracer> mFlushTracer; std::unique_ptr<ImageManager> mImageManager = std::make_unique<ImageManager>(this); Loading libs/renderengine/gl/ImageManager.cpp +9 −1 Original line number Diff line number Diff line Loading @@ -14,6 +14,9 @@ * limitations under the License. */ //#define LOG_NDEBUG 0 #undef LOG_TAG #define LOG_TAG "RenderEngine" #define ATRACE_TAG ATRACE_TAG_GRAPHICS #include <pthread.h> Loading @@ -27,7 +30,10 @@ namespace android { namespace renderengine { namespace gl { ImageManager::ImageManager(GLESRenderEngine* engine) : mEngine(engine) { ImageManager::ImageManager(GLESRenderEngine* engine) : mEngine(engine) {} void ImageManager::initThread() { mThread = std::thread([this]() { threadMain(); }); pthread_setname_np(mThread.native_handle(), "ImageManager"); // Use SCHED_FIFO to minimize jitter struct sched_param param = {0}; Loading Loading @@ -133,6 +139,8 @@ void ImageManager::threadMain() { entry.barrier->condition.notify_one(); } } ALOGD("Reached end of threadMain, terminating ImageManager thread!"); } } // namespace gl Loading Loading
cmds/atrace/atrace.cpp +0 −81 Original line number Diff line number Diff line Loading @@ -571,81 +571,6 @@ static bool setPrintTgidEnableIfPresent(bool enable) return true; } // Poke all the binder-enabled processes in the system to get them to re-read // their system properties. static bool pokeBinderServices() { sp<IServiceManager> sm = defaultServiceManager(); Vector<String16> services = sm->listServices(); for (size_t i = 0; i < services.size(); i++) { sp<IBinder> obj = sm->checkService(services[i]); if (obj != nullptr) { Parcel data; if (obj->transact(IBinder::SYSPROPS_TRANSACTION, data, nullptr, 0) != OK) { if (false) { // XXX: For some reason this fails on tablets trying to // poke the "phone" service. It's not clear whether some // are expected to fail. String8 svc(services[i]); fprintf(stderr, "error poking binder service %s\n", svc.string()); return false; } } } } return true; } // Poke all the HAL processes in the system to get them to re-read // their system properties. static void pokeHalServices() { using ::android::hidl::base::V1_0::IBase; using ::android::hidl::manager::V1_0::IServiceManager; using ::android::hardware::hidl_string; using ::android::hardware::Return; sp<IServiceManager> sm = ::android::hardware::defaultServiceManager(); if (sm == nullptr) { fprintf(stderr, "failed to get IServiceManager to poke hal services\n"); return; } auto listRet = sm->list([&](const auto &interfaces) { for (size_t i = 0; i < interfaces.size(); i++) { string fqInstanceName = interfaces[i]; string::size_type n = fqInstanceName.find('/'); if (n == std::string::npos || interfaces[i].size() == n+1) continue; hidl_string fqInterfaceName = fqInstanceName.substr(0, n); hidl_string instanceName = fqInstanceName.substr(n+1, std::string::npos); Return<sp<IBase>> interfaceRet = sm->get(fqInterfaceName, instanceName); if (!interfaceRet.isOk()) { // ignore continue; } sp<IBase> interface = interfaceRet; if (interface == nullptr) { // ignore continue; } auto notifyRet = interface->notifySyspropsChanged(); if (!notifyRet.isOk()) { // ignore } } }); if (!listRet.isOk()) { // TODO(b/34242478) fix this when we determine the correct ACL //fprintf(stderr, "failed to list services: %s\n", listRet.description().c_str()); } } // Set the trace tags that userland tracing uses, and poke the running // processes to pick up the new value. static bool setTagsProperty(uint64_t tags) Loading Loading @@ -876,10 +801,6 @@ static bool setUpUserspaceTracing() } ok &= setAppCmdlineProperty(&packageList[0]); ok &= setTagsProperty(tags); #if !ATRACE_SHMEM ok &= pokeBinderServices(); pokeHalServices(); #endif if (g_tracePdx) { ok &= ServiceUtility::PokeServices(); } Loading @@ -891,8 +812,6 @@ static void cleanUpUserspaceTracing() { setTagsProperty(0); clearAppProperties(); pokeBinderServices(); pokeHalServices(); if (g_tracePdx) { ServiceUtility::PokeServices(); Loading
libs/renderengine/Android.bp +0 −2 Original line number Diff line number Diff line Loading @@ -59,8 +59,6 @@ filegroup { "gl/Program.cpp", "gl/ProgramCache.cpp", "gl/filters/BlurFilter.cpp", "gl/filters/KawaseBlurFilter.cpp", "gl/filters/GaussianBlurFilter.cpp", "gl/filters/GenericProgram.cpp", ], } Loading
libs/renderengine/gl/GLESRenderEngine.cpp +2 −9 Original line number Diff line number Diff line Loading @@ -50,8 +50,6 @@ #include "Program.h" #include "ProgramCache.h" #include "filters/BlurFilter.h" #include "filters/GaussianBlurFilter.h" #include "filters/KawaseBlurFilter.h" extern "C" EGLAPI const char* eglQueryStringImplementationANDROID(EGLDisplay dpy, EGLint name); Loading Loading @@ -430,17 +428,12 @@ GLESRenderEngine::GLESRenderEngine(const RenderEngineCreationArgs& args, EGLDisp } if (args.supportsBackgroundBlur) { char isGaussian[PROPERTY_VALUE_MAX]; property_get("debug.sf.gaussianBlur", isGaussian, "0"); if (atoi(isGaussian)) { mBlurFilter = new GaussianBlurFilter(*this); } else { mBlurFilter = new KawaseBlurFilter(*this); } mBlurFilter = new BlurFilter(*this); checkErrors("BlurFilter creation"); } mImageManager = std::make_unique<ImageManager>(this); mImageManager->initThread(); mDrawingBuffer = createFramebuffer(); } Loading
libs/renderengine/gl/GLESRenderEngine.h +0 −2 Original line number Diff line number Diff line Loading @@ -261,8 +261,6 @@ private: friend class ImageManager; friend class GLFramebuffer; friend class BlurFilter; friend class GaussianBlurFilter; friend class KawaseBlurFilter; friend class GenericProgram; std::unique_ptr<FlushTracer> mFlushTracer; std::unique_ptr<ImageManager> mImageManager = std::make_unique<ImageManager>(this); Loading
libs/renderengine/gl/ImageManager.cpp +9 −1 Original line number Diff line number Diff line Loading @@ -14,6 +14,9 @@ * limitations under the License. */ //#define LOG_NDEBUG 0 #undef LOG_TAG #define LOG_TAG "RenderEngine" #define ATRACE_TAG ATRACE_TAG_GRAPHICS #include <pthread.h> Loading @@ -27,7 +30,10 @@ namespace android { namespace renderengine { namespace gl { ImageManager::ImageManager(GLESRenderEngine* engine) : mEngine(engine) { ImageManager::ImageManager(GLESRenderEngine* engine) : mEngine(engine) {} void ImageManager::initThread() { mThread = std::thread([this]() { threadMain(); }); pthread_setname_np(mThread.native_handle(), "ImageManager"); // Use SCHED_FIFO to minimize jitter struct sched_param param = {0}; Loading Loading @@ -133,6 +139,8 @@ void ImageManager::threadMain() { entry.barrier->condition.notify_one(); } } ALOGD("Reached end of threadMain, terminating ImageManager thread!"); } } // namespace gl Loading