SF: Remove CompositorTiming state and lock
Replace the CompositorTiming::interval access on layer creation with a
RefreshRateConfigs lookup.
Bug: 185535769
Test: Perfetto timeline is green.
Change-Id: I0d2240f879b60c1d0ffe68be35c96a227e495ce3
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index f6dbfbf..0e5386f 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -168,10 +168,6 @@
using DisplayColorSetting = compositionengine::OutputColorSetting;
struct SurfaceFlingerBE {
- // protected by mCompositorTimingLock;
- mutable std::mutex mCompositorTimingLock;
- CompositorTiming mCompositorTiming;
-
// Only accessed from the main thread.
struct CompositePresentTime {
nsecs_t composite = -1;
@@ -962,9 +958,8 @@
// Returns the composite-to-present latency of the latest presented frame.
nsecs_t trackPresentLatency(nsecs_t compositeTime, std::shared_ptr<FenceTime> presentFenceTime);
- void getCompositorTiming(CompositorTiming* compositorTiming);
- void setCompositorTimingSnapped(nsecs_t vsyncDeadline, nsecs_t vsyncPeriod,
- nsecs_t compositeToPresentLatency);
+ CompositorTiming makeCompositorTiming(nsecs_t vsyncDeadline, nsecs_t vsyncPeriod,
+ nsecs_t compositeToPresentLatency);
void postFrame() REQUIRES(kMainThreadContext);