Loading services/surfaceflinger/Layer.cpp +11 −1 Original line number Diff line number Diff line Loading @@ -4063,7 +4063,7 @@ void Layer::updateRelativeMetadataSnapshot(const LayerMetadata& relativeLayerMet } } void Layer::setTrustedPresentationInfo(TrustedPresentationThresholds const& thresholds, bool Layer::setTrustedPresentationInfo(TrustedPresentationThresholds const& thresholds, TrustedPresentationListener const& listener) { bool hadTrustedPresentationListener = hasTrustedPresentationListener(); mTrustedPresentationListener = listener; Loading @@ -4074,6 +4074,16 @@ void Layer::setTrustedPresentationInfo(TrustedPresentationThresholds const& thre } else if (hadTrustedPresentationListener && !haveTrustedPresentationListener) { mFlinger->mNumTrustedPresentationListeners--; } // Reset trusted presentation states to ensure we start the time again. mEnteredTrustedPresentationStateTime = -1; mLastReportedTrustedPresentationState = false; mLastComputedTrustedPresentationState = false; // If there's a new trusted presentation listener, the code needs to go through the composite // path to ensure it recomutes the current state and invokes the TrustedPresentationListener if // we're already in the requested state. return haveTrustedPresentationListener; } void Layer::updateLastLatchTime(nsecs_t latchTime) { Loading services/surfaceflinger/Layer.h +1 −1 Original line number Diff line number Diff line Loading @@ -758,7 +758,7 @@ public: std::shared_ptr<frametimeline::SurfaceFrame> createSurfaceFrameForBuffer( const FrameTimelineInfo& info, nsecs_t queueTime, std::string debugName); void setTrustedPresentationInfo(TrustedPresentationThresholds const& thresholds, bool setTrustedPresentationInfo(TrustedPresentationThresholds const& thresholds, TrustedPresentationListener const& listener); // Creates a new handle each time, so we only expect Loading services/surfaceflinger/SurfaceFlinger.cpp +8 −4 Original line number Diff line number Diff line Loading @@ -4853,8 +4853,10 @@ uint32_t SurfaceFlinger::setClientStateLocked(const FrameTimelineInfo& frameTime } if (what & layer_state_t::eTrustedPresentationInfoChanged) { layer->setTrustedPresentationInfo(s.trustedPresentationThresholds, s.trustedPresentationListener); if (layer->setTrustedPresentationInfo(s.trustedPresentationThresholds, s.trustedPresentationListener)) { flags |= eTraversalNeeded; } } if (what & layer_state_t::eFlushJankData) { Loading Loading @@ -4956,8 +4958,10 @@ uint32_t SurfaceFlinger::updateLayerCallbacksAndStats(const FrameTimelineInfo& f } if (what & layer_state_t::eTrustedPresentationInfoChanged) { layer->setTrustedPresentationInfo(s.trustedPresentationThresholds, s.trustedPresentationListener); if (layer->setTrustedPresentationInfo(s.trustedPresentationThresholds, s.trustedPresentationListener)) { flags |= eTraversalNeeded; } } const auto& snapshot = mLayerSnapshotBuilder.getSnapshot(layer->getSequence()); Loading Loading
services/surfaceflinger/Layer.cpp +11 −1 Original line number Diff line number Diff line Loading @@ -4063,7 +4063,7 @@ void Layer::updateRelativeMetadataSnapshot(const LayerMetadata& relativeLayerMet } } void Layer::setTrustedPresentationInfo(TrustedPresentationThresholds const& thresholds, bool Layer::setTrustedPresentationInfo(TrustedPresentationThresholds const& thresholds, TrustedPresentationListener const& listener) { bool hadTrustedPresentationListener = hasTrustedPresentationListener(); mTrustedPresentationListener = listener; Loading @@ -4074,6 +4074,16 @@ void Layer::setTrustedPresentationInfo(TrustedPresentationThresholds const& thre } else if (hadTrustedPresentationListener && !haveTrustedPresentationListener) { mFlinger->mNumTrustedPresentationListeners--; } // Reset trusted presentation states to ensure we start the time again. mEnteredTrustedPresentationStateTime = -1; mLastReportedTrustedPresentationState = false; mLastComputedTrustedPresentationState = false; // If there's a new trusted presentation listener, the code needs to go through the composite // path to ensure it recomutes the current state and invokes the TrustedPresentationListener if // we're already in the requested state. return haveTrustedPresentationListener; } void Layer::updateLastLatchTime(nsecs_t latchTime) { Loading
services/surfaceflinger/Layer.h +1 −1 Original line number Diff line number Diff line Loading @@ -758,7 +758,7 @@ public: std::shared_ptr<frametimeline::SurfaceFrame> createSurfaceFrameForBuffer( const FrameTimelineInfo& info, nsecs_t queueTime, std::string debugName); void setTrustedPresentationInfo(TrustedPresentationThresholds const& thresholds, bool setTrustedPresentationInfo(TrustedPresentationThresholds const& thresholds, TrustedPresentationListener const& listener); // Creates a new handle each time, so we only expect Loading
services/surfaceflinger/SurfaceFlinger.cpp +8 −4 Original line number Diff line number Diff line Loading @@ -4853,8 +4853,10 @@ uint32_t SurfaceFlinger::setClientStateLocked(const FrameTimelineInfo& frameTime } if (what & layer_state_t::eTrustedPresentationInfoChanged) { layer->setTrustedPresentationInfo(s.trustedPresentationThresholds, s.trustedPresentationListener); if (layer->setTrustedPresentationInfo(s.trustedPresentationThresholds, s.trustedPresentationListener)) { flags |= eTraversalNeeded; } } if (what & layer_state_t::eFlushJankData) { Loading Loading @@ -4956,8 +4958,10 @@ uint32_t SurfaceFlinger::updateLayerCallbacksAndStats(const FrameTimelineInfo& f } if (what & layer_state_t::eTrustedPresentationInfoChanged) { layer->setTrustedPresentationInfo(s.trustedPresentationThresholds, s.trustedPresentationListener); if (layer->setTrustedPresentationInfo(s.trustedPresentationThresholds, s.trustedPresentationListener)) { flags |= eTraversalNeeded; } } const auto& snapshot = mLayerSnapshotBuilder.getSnapshot(layer->getSequence()); Loading