SurfaceFlinger: Correct logic error in early release

Client composition early release logic should function roughly
like this:
	1. Set client composition fence on layer if it's client
	composed
	2. If we process setBuffer when we have the fence, release the
	   previous buffer with the client composition fence
	3. If we display the layer a second time we clear the client
	   composition fence.
The current implementation doesn't really accomplish this. Since
onLayerDisplayed comes after setting the client composition fence, we
need to track "the second onLayerDisplayed after onPostComposition".
Unfortunately when adding the onPostComposition logic I seem to have
not thought carefully enough about this, likely because I was too
focused on the multi-display issue going on in the previous bug. This
logic should also work to solve that bug.

Bug: 231290210
Test: Existing tests pass
Change-Id: I0fbf3cf3e2b39410fdac3bc0db905a4d088aba58
diff --git a/services/surfaceflinger/CompositionEngine/src/Output.cpp b/services/surfaceflinger/CompositionEngine/src/Output.cpp
index aac478d..c3385a8 100644
--- a/services/surfaceflinger/CompositionEngine/src/Output.cpp
+++ b/services/surfaceflinger/CompositionEngine/src/Output.cpp
@@ -1300,6 +1300,7 @@
         const auto& layerState = layer->getState();
         const auto* layerFEState = layer->getLayerFE().getCompositionState();
         auto& layerFE = layer->getLayerFE();
+        layerFE.setWasClientComposed(nullptr);
 
         const Region clip(viewportRegion.intersect(layerState.visibleRegion));
         ALOGV("Layer: %s", layerFE.getDebugName());