Use the correct frame rate vote for metrics

Applications using preferredDisplayModeId to request a frame rate will
have their vote recorded on the task SurfaceControl, so the entire layer
tree vote needs to be used.

Bug: 284866750
Test: builds
Test: test app setting preferredDisplayModeId
Change-Id: I04c575e58b842bebf5f79d86ec7ab7e738079886
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index af4b65b..93ebc8c 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -4018,7 +4018,7 @@
         const std::optional<Fps> renderRate =
                 mFlinger->mScheduler->getFrameRateOverride(getOwnerUid());
 
-        const auto vote = frameRateToSetFrameRateVotePayload(mDrawingState.frameRate);
+        const auto vote = frameRateToSetFrameRateVotePayload(getFrameRateForLayerTree());
         const auto gameMode = getGameMode();
 
         if (presentFence->isValid()) {