Loading services/surfaceflinger/main_surfaceflinger.cpp +17 −19 Original line number Diff line number Diff line Loading @@ -35,6 +35,13 @@ using namespace android; static status_t startGraphicsAllocatorService() { using android::hardware::configstore::getBool; using android::hardware::configstore::V1_0::ISurfaceFlingerConfigs; if (!getBool<ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::startGraphicsAllocatorService>(false)) { return OK; } using android::hardware::graphics::allocator::V2_0::IAllocator; status_t result = Loading @@ -47,27 +54,12 @@ static status_t startGraphicsAllocatorService() { return OK; } static status_t startHidlServices() { static status_t startDisplayService() { using android::frameworks::displayservice::V1_0::implementation::DisplayService; using android::frameworks::displayservice::V1_0::IDisplayService; using android::hardware::configstore::getBool; using android::hardware::configstore::getBool; using android::hardware::configstore::V1_0::ISurfaceFlingerConfigs; hardware::configureRpcThreadpool(1 /* maxThreads */, false /* callerWillJoin */); status_t err; if (getBool<ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::startGraphicsAllocatorService>(false)) { err = startGraphicsAllocatorService(); if (err != OK) { return err; } } sp<IDisplayService> displayservice = new DisplayService(); err = displayservice->registerAsService(); status_t err = displayservice->registerAsService(); if (err != OK) { ALOGE("Could not register IDisplayService service."); Loading @@ -77,9 +69,13 @@ static status_t startHidlServices() { } int main(int, char**) { startHidlServices(); signal(SIGPIPE, SIG_IGN); hardware::configureRpcThreadpool(1 /* maxThreads */, false /* callerWillJoin */); startGraphicsAllocatorService(); // When SF is launched in its own process, limit the number of // binder threads to 4. ProcessState::self()->setThreadPoolMaxThreadCount(4); Loading Loading @@ -112,6 +108,8 @@ int main(int, char**) { sp<GpuService> gpuservice = new GpuService(); sm->addService(String16(GpuService::SERVICE_NAME), gpuservice, false); startDisplayService(); // dependency on SF getting registered above struct sched_param param = {0}; param.sched_priority = 2; if (sched_setscheduler(0, SCHED_FIFO, ¶m) != 0) { Loading vulkan/libvulkan/swapchain.cpp +8 −8 Original line number Diff line number Diff line Loading @@ -1268,21 +1268,21 @@ VkResult CreateSwapchainKHR(VkDevice device, // // TODO(jessehall): The error path here is the same as DestroySwapchain, // but not the non-error path. Should refactor/unify. if (!swapchain->shared) { for (uint32_t i = 0; i < num_images; i++) { Swapchain::Image& img = swapchain->images[i]; if (img.dequeued) { if (!swapchain->shared) { surface.window->cancelBuffer(surface.window.get(), img.buffer.get(), img.dequeue_fence); img.dequeue_fence = -1; img.dequeued = false; } } if (result != VK_SUCCESS) { if (img.image) dispatch.DestroyImage(device, img.image, nullptr); } } } if (result != VK_SUCCESS) { swapchain->~Swapchain(); Loading Loading
services/surfaceflinger/main_surfaceflinger.cpp +17 −19 Original line number Diff line number Diff line Loading @@ -35,6 +35,13 @@ using namespace android; static status_t startGraphicsAllocatorService() { using android::hardware::configstore::getBool; using android::hardware::configstore::V1_0::ISurfaceFlingerConfigs; if (!getBool<ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::startGraphicsAllocatorService>(false)) { return OK; } using android::hardware::graphics::allocator::V2_0::IAllocator; status_t result = Loading @@ -47,27 +54,12 @@ static status_t startGraphicsAllocatorService() { return OK; } static status_t startHidlServices() { static status_t startDisplayService() { using android::frameworks::displayservice::V1_0::implementation::DisplayService; using android::frameworks::displayservice::V1_0::IDisplayService; using android::hardware::configstore::getBool; using android::hardware::configstore::getBool; using android::hardware::configstore::V1_0::ISurfaceFlingerConfigs; hardware::configureRpcThreadpool(1 /* maxThreads */, false /* callerWillJoin */); status_t err; if (getBool<ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::startGraphicsAllocatorService>(false)) { err = startGraphicsAllocatorService(); if (err != OK) { return err; } } sp<IDisplayService> displayservice = new DisplayService(); err = displayservice->registerAsService(); status_t err = displayservice->registerAsService(); if (err != OK) { ALOGE("Could not register IDisplayService service."); Loading @@ -77,9 +69,13 @@ static status_t startHidlServices() { } int main(int, char**) { startHidlServices(); signal(SIGPIPE, SIG_IGN); hardware::configureRpcThreadpool(1 /* maxThreads */, false /* callerWillJoin */); startGraphicsAllocatorService(); // When SF is launched in its own process, limit the number of // binder threads to 4. ProcessState::self()->setThreadPoolMaxThreadCount(4); Loading Loading @@ -112,6 +108,8 @@ int main(int, char**) { sp<GpuService> gpuservice = new GpuService(); sm->addService(String16(GpuService::SERVICE_NAME), gpuservice, false); startDisplayService(); // dependency on SF getting registered above struct sched_param param = {0}; param.sched_priority = 2; if (sched_setscheduler(0, SCHED_FIFO, ¶m) != 0) { Loading
vulkan/libvulkan/swapchain.cpp +8 −8 Original line number Diff line number Diff line Loading @@ -1268,21 +1268,21 @@ VkResult CreateSwapchainKHR(VkDevice device, // // TODO(jessehall): The error path here is the same as DestroySwapchain, // but not the non-error path. Should refactor/unify. if (!swapchain->shared) { for (uint32_t i = 0; i < num_images; i++) { Swapchain::Image& img = swapchain->images[i]; if (img.dequeued) { if (!swapchain->shared) { surface.window->cancelBuffer(surface.window.get(), img.buffer.get(), img.dequeue_fence); img.dequeue_fence = -1; img.dequeued = false; } } if (result != VK_SUCCESS) { if (img.image) dispatch.DestroyImage(device, img.image, nullptr); } } } if (result != VK_SUCCESS) { swapchain->~Swapchain(); Loading