Loading services/surfaceflinger/Layer.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -1294,7 +1294,6 @@ std::shared_ptr<frametimeline::SurfaceFrame> Layer::createSurfaceFrameForBuffer( if (fps) { surfaceFrame->setRenderRate(*fps); } // TODO(b/178542907): Implement onSurfaceFrameCreated for BQLayer as well. onSurfaceFrameCreated(surfaceFrame); return surfaceFrame; } Loading Loading @@ -2703,6 +2702,10 @@ void Layer::onLayerDisplayed(ftl::SharedFuture<FenceResult> futureFenceResult) { void Layer::onSurfaceFrameCreated( const std::shared_ptr<frametimeline::SurfaceFrame>& surfaceFrame) { if (!hasBufferOrSidebandStreamInDrawing()) { return; } while (mPendingJankClassifications.size() >= kPendingClassificationMaxSurfaceFrames) { // Too many SurfaceFrames pending classification. The front of the deque is probably not // tracked by FrameTimeline and will never be presented. This will only result in a memory Loading services/surfaceflinger/Layer.h +5 −1 Original line number Diff line number Diff line Loading @@ -1082,6 +1082,10 @@ private: return ((mSidebandStream != nullptr) || (mBufferInfo.mBuffer != nullptr)); } bool hasBufferOrSidebandStreamInDrawing() const { return ((mDrawingState.sidebandStream != nullptr) || (mDrawingState.buffer != nullptr)); } bool hasSomethingToDraw() const { return hasEffect() || hasBufferOrSidebandStream(); } void updateChildrenSnapshots(bool updateGeometry); Loading Loading @@ -1157,7 +1161,7 @@ private: std::deque<std::shared_ptr<android::frametimeline::SurfaceFrame>> mPendingJankClassifications; // An upper bound on the number of SurfaceFrames in the pending classifications deque. static constexpr int kPendingClassificationMaxSurfaceFrames = 25; static constexpr int kPendingClassificationMaxSurfaceFrames = 50; const std::string mBlastTransactionName{"BufferTX - " + mName}; // This integer is incremented everytime a buffer arrives at the server for this layer, Loading Loading
services/surfaceflinger/Layer.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -1294,7 +1294,6 @@ std::shared_ptr<frametimeline::SurfaceFrame> Layer::createSurfaceFrameForBuffer( if (fps) { surfaceFrame->setRenderRate(*fps); } // TODO(b/178542907): Implement onSurfaceFrameCreated for BQLayer as well. onSurfaceFrameCreated(surfaceFrame); return surfaceFrame; } Loading Loading @@ -2703,6 +2702,10 @@ void Layer::onLayerDisplayed(ftl::SharedFuture<FenceResult> futureFenceResult) { void Layer::onSurfaceFrameCreated( const std::shared_ptr<frametimeline::SurfaceFrame>& surfaceFrame) { if (!hasBufferOrSidebandStreamInDrawing()) { return; } while (mPendingJankClassifications.size() >= kPendingClassificationMaxSurfaceFrames) { // Too many SurfaceFrames pending classification. The front of the deque is probably not // tracked by FrameTimeline and will never be presented. This will only result in a memory Loading
services/surfaceflinger/Layer.h +5 −1 Original line number Diff line number Diff line Loading @@ -1082,6 +1082,10 @@ private: return ((mSidebandStream != nullptr) || (mBufferInfo.mBuffer != nullptr)); } bool hasBufferOrSidebandStreamInDrawing() const { return ((mDrawingState.sidebandStream != nullptr) || (mDrawingState.buffer != nullptr)); } bool hasSomethingToDraw() const { return hasEffect() || hasBufferOrSidebandStream(); } void updateChildrenSnapshots(bool updateGeometry); Loading Loading @@ -1157,7 +1161,7 @@ private: std::deque<std::shared_ptr<android::frametimeline::SurfaceFrame>> mPendingJankClassifications; // An upper bound on the number of SurfaceFrames in the pending classifications deque. static constexpr int kPendingClassificationMaxSurfaceFrames = 25; static constexpr int kPendingClassificationMaxSurfaceFrames = 50; const std::string mBlastTransactionName{"BufferTX - " + mName}; // This integer is incremented everytime a buffer arrives at the server for this layer, Loading