Loading services/surfaceflinger/DisplayHardware/HWComposer.cpp +5 −4 Original line number Diff line number Diff line Loading @@ -620,7 +620,7 @@ sp<Fence> HWComposer::getLayerReleaseFence(int32_t displayId, return displayFences[layer]; } status_t HWComposer::commit(int32_t displayId) { status_t HWComposer::presentAndGetReleaseFences(int32_t displayId) { ATRACE_CALL(); if (!isValidDisplay(displayId)) { Loading @@ -631,15 +631,16 @@ status_t HWComposer::commit(int32_t displayId) { auto& hwcDisplay = displayData.hwcDisplay; auto error = hwcDisplay->present(&displayData.lastRetireFence); if (error != HWC2::Error::None) { ALOGE("commit: present failed for display %d: %s (%d)", displayId, to_string(error).c_str(), static_cast<int32_t>(error)); ALOGE("presentAndGetReleaseFences: failed for display %d: %s (%d)", displayId, to_string(error).c_str(), static_cast<int32_t>(error)); return UNKNOWN_ERROR; } std::unordered_map<std::shared_ptr<HWC2::Layer>, sp<Fence>> releaseFences; error = hwcDisplay->getReleaseFences(&releaseFences); if (error != HWC2::Error::None) { ALOGE("commit: Failed to get release fences for display %d: %s (%d)", ALOGE("presentAndGetReleaseFences: Failed to get release fences " "for display %d: %s (%d)", displayId, to_string(error).c_str(), static_cast<int32_t>(error)); return UNKNOWN_ERROR; Loading services/surfaceflinger/DisplayHardware/HWComposer.h +2 −2 Original line number Diff line number Diff line Loading @@ -97,8 +97,8 @@ public: status_t setClientTarget(int32_t displayId, const sp<Fence>& acquireFence, const sp<GraphicBuffer>& target, android_dataspace_t dataspace); // Finalize the layers and present them status_t commit(int32_t displayId); // Present layers to the display and read releaseFences. status_t presentAndGetReleaseFences(int32_t displayId); // set power mode status_t setPowerMode(int32_t displayId, int mode); Loading services/surfaceflinger/SurfaceFlinger.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1488,7 +1488,7 @@ void SurfaceFlinger::postFramebuffer() } const auto hwcId = displayDevice->getHwcDisplayId(); if (hwcId >= 0) { mHwc->commit(hwcId); mHwc->presentAndGetReleaseFences(hwcId); } displayDevice->onSwapBuffersCompleted(); displayDevice->makeCurrent(mEGLDisplay, mEGLContext); Loading Loading
services/surfaceflinger/DisplayHardware/HWComposer.cpp +5 −4 Original line number Diff line number Diff line Loading @@ -620,7 +620,7 @@ sp<Fence> HWComposer::getLayerReleaseFence(int32_t displayId, return displayFences[layer]; } status_t HWComposer::commit(int32_t displayId) { status_t HWComposer::presentAndGetReleaseFences(int32_t displayId) { ATRACE_CALL(); if (!isValidDisplay(displayId)) { Loading @@ -631,15 +631,16 @@ status_t HWComposer::commit(int32_t displayId) { auto& hwcDisplay = displayData.hwcDisplay; auto error = hwcDisplay->present(&displayData.lastRetireFence); if (error != HWC2::Error::None) { ALOGE("commit: present failed for display %d: %s (%d)", displayId, to_string(error).c_str(), static_cast<int32_t>(error)); ALOGE("presentAndGetReleaseFences: failed for display %d: %s (%d)", displayId, to_string(error).c_str(), static_cast<int32_t>(error)); return UNKNOWN_ERROR; } std::unordered_map<std::shared_ptr<HWC2::Layer>, sp<Fence>> releaseFences; error = hwcDisplay->getReleaseFences(&releaseFences); if (error != HWC2::Error::None) { ALOGE("commit: Failed to get release fences for display %d: %s (%d)", ALOGE("presentAndGetReleaseFences: Failed to get release fences " "for display %d: %s (%d)", displayId, to_string(error).c_str(), static_cast<int32_t>(error)); return UNKNOWN_ERROR; Loading
services/surfaceflinger/DisplayHardware/HWComposer.h +2 −2 Original line number Diff line number Diff line Loading @@ -97,8 +97,8 @@ public: status_t setClientTarget(int32_t displayId, const sp<Fence>& acquireFence, const sp<GraphicBuffer>& target, android_dataspace_t dataspace); // Finalize the layers and present them status_t commit(int32_t displayId); // Present layers to the display and read releaseFences. status_t presentAndGetReleaseFences(int32_t displayId); // set power mode status_t setPowerMode(int32_t displayId, int mode); Loading
services/surfaceflinger/SurfaceFlinger.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1488,7 +1488,7 @@ void SurfaceFlinger::postFramebuffer() } const auto hwcId = displayDevice->getHwcDisplayId(); if (hwcId >= 0) { mHwc->commit(hwcId); mHwc->presentAndGetReleaseFences(hwcId); } displayDevice->onSwapBuffersCompleted(); displayDevice->makeCurrent(mEGLDisplay, mEGLContext); Loading