Loading libs/input/tests/Android.bp +7 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,13 @@ cc_test { "-Werror", "-Wno-unused-parameter", ], sanitize: { undefined: true, all_undefined: true, diag: { undefined: true, }, }, shared_libs: [ "libbase", "libbinder", Loading services/surfaceflinger/Layer.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -3037,6 +3037,10 @@ bool Layer::setBuffer(std::shared_ptr<renderengine::ExternalTexture>& buffer, mLastClientCompositionFence); mLastClientCompositionFence = nullptr; } } else { // if we are latching a buffer for the first time then clear the mLastLatchTime since // we don't want to incorrectly classify a frame if we miss the desired present time. updateLastLatchTime(0); } mDrawingState.producerId = bufferData.producerId; Loading services/surfaceflinger/Layer.h +1 −0 Original line number Diff line number Diff line Loading @@ -852,6 +852,7 @@ public: const sp<GraphicBuffer>& buffer, uint64_t framenumber, const sp<Fence>& releaseFence); bool setFrameRateForLayerTree(FrameRate); bool hasBuffer() const { return mBufferInfo.mBuffer != nullptr; } protected: // For unit tests Loading services/surfaceflinger/SurfaceFlinger.cpp +8 −2 Original line number Diff line number Diff line Loading @@ -3954,9 +3954,15 @@ bool SurfaceFlinger::latchBuffers() { mLayersWithQueuedFrames.emplace(sp<Layer>::fromExisting(layer)); } else { layer->useEmptyDamage(); // If the layer has frames we will update the latch time when latching the buffer. if (!layer->hasBuffer()) { // The last latch time is used to classify a missed frame as buffer stuffing // instead of a missed frame. This is used to identify scenarios where we // could not latch a buffer or apply a transaction due to backpressure. // We only update the latch time for buffer less layers here, the latch time // is updated for buffer layers when the buffer is latched. layer->updateLastLatchTime(latchTime); } } }); mForceTransactionDisplayChange = false; Loading services/surfaceflinger/tests/unittests/Android.bp +2 −1 Original line number Diff line number Diff line Loading @@ -103,7 +103,9 @@ cc_test { "SurfaceFlinger_DestroyDisplayTest.cpp", "SurfaceFlinger_DisplayModeSwitching.cpp", "SurfaceFlinger_DisplayTransactionCommitTest.cpp", "SurfaceFlinger_ExcludeDolbyVisionTest.cpp", "SurfaceFlinger_GetDisplayNativePrimariesTest.cpp", "SurfaceFlinger_HdrOutputControlTest.cpp", "SurfaceFlinger_HotplugTest.cpp", "SurfaceFlinger_MultiDisplayLeaderTest.cpp", "SurfaceFlinger_NotifyPowerBoostTest.cpp", Loading @@ -113,7 +115,6 @@ cc_test { "SurfaceFlinger_SetPowerModeInternalTest.cpp", "SurfaceFlinger_SetupNewDisplayDeviceInternalTest.cpp", "SurfaceFlinger_UpdateLayerMetadataSnapshotTest.cpp", "SurfaceFlinger_ExcludeDolbyVisionTest.cpp", "SchedulerTest.cpp", "SetFrameRateTest.cpp", "RefreshRateSelectorTest.cpp", Loading Loading
libs/input/tests/Android.bp +7 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,13 @@ cc_test { "-Werror", "-Wno-unused-parameter", ], sanitize: { undefined: true, all_undefined: true, diag: { undefined: true, }, }, shared_libs: [ "libbase", "libbinder", Loading
services/surfaceflinger/Layer.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -3037,6 +3037,10 @@ bool Layer::setBuffer(std::shared_ptr<renderengine::ExternalTexture>& buffer, mLastClientCompositionFence); mLastClientCompositionFence = nullptr; } } else { // if we are latching a buffer for the first time then clear the mLastLatchTime since // we don't want to incorrectly classify a frame if we miss the desired present time. updateLastLatchTime(0); } mDrawingState.producerId = bufferData.producerId; Loading
services/surfaceflinger/Layer.h +1 −0 Original line number Diff line number Diff line Loading @@ -852,6 +852,7 @@ public: const sp<GraphicBuffer>& buffer, uint64_t framenumber, const sp<Fence>& releaseFence); bool setFrameRateForLayerTree(FrameRate); bool hasBuffer() const { return mBufferInfo.mBuffer != nullptr; } protected: // For unit tests Loading
services/surfaceflinger/SurfaceFlinger.cpp +8 −2 Original line number Diff line number Diff line Loading @@ -3954,9 +3954,15 @@ bool SurfaceFlinger::latchBuffers() { mLayersWithQueuedFrames.emplace(sp<Layer>::fromExisting(layer)); } else { layer->useEmptyDamage(); // If the layer has frames we will update the latch time when latching the buffer. if (!layer->hasBuffer()) { // The last latch time is used to classify a missed frame as buffer stuffing // instead of a missed frame. This is used to identify scenarios where we // could not latch a buffer or apply a transaction due to backpressure. // We only update the latch time for buffer less layers here, the latch time // is updated for buffer layers when the buffer is latched. layer->updateLastLatchTime(latchTime); } } }); mForceTransactionDisplayChange = false; Loading
services/surfaceflinger/tests/unittests/Android.bp +2 −1 Original line number Diff line number Diff line Loading @@ -103,7 +103,9 @@ cc_test { "SurfaceFlinger_DestroyDisplayTest.cpp", "SurfaceFlinger_DisplayModeSwitching.cpp", "SurfaceFlinger_DisplayTransactionCommitTest.cpp", "SurfaceFlinger_ExcludeDolbyVisionTest.cpp", "SurfaceFlinger_GetDisplayNativePrimariesTest.cpp", "SurfaceFlinger_HdrOutputControlTest.cpp", "SurfaceFlinger_HotplugTest.cpp", "SurfaceFlinger_MultiDisplayLeaderTest.cpp", "SurfaceFlinger_NotifyPowerBoostTest.cpp", Loading @@ -113,7 +115,6 @@ cc_test { "SurfaceFlinger_SetPowerModeInternalTest.cpp", "SurfaceFlinger_SetupNewDisplayDeviceInternalTest.cpp", "SurfaceFlinger_UpdateLayerMetadataSnapshotTest.cpp", "SurfaceFlinger_ExcludeDolbyVisionTest.cpp", "SchedulerTest.cpp", "SetFrameRateTest.cpp", "RefreshRateSelectorTest.cpp", Loading