diff options
| author | 2023-03-02 21:43:00 +0000 | |
|---|---|---|
| committer | 2023-03-02 21:43:00 +0000 | |
| commit | ba87aa7f889c3ee0648eb55766c19870b0671ea9 (patch) | |
| tree | 8abe21b703089a12450973df61dcfcb3e9bf2bce /services/surfaceflinger/Layer.cpp | |
| parent | af7c64563ef4ae20cd37d20c1c5da07fac6e0387 (diff) | |
| parent | c09c023a9bfc3c34be38cf95d1691fd712af2d68 (diff) | |
Merge "[sf] only update the last latch time if the layer has a buffer" into udc-dev
Diffstat (limited to 'services/surfaceflinger/Layer.cpp')
| -rw-r--r-- | services/surfaceflinger/Layer.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index 433606a732..ded607eb49 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -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; |