summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/SurfaceFlinger.h
diff options
context:
space:
mode:
author Android Build Coastguard Worker <android-build-coastguard-worker@google.com> 2025-03-21 20:19:16 -0700
committer Android Build Coastguard Worker <android-build-coastguard-worker@google.com> 2025-03-21 20:19:16 -0700
commitac284d4683e194b7a05800cf7fbd682972699faa (patch)
tree127a5fbd6bcbdf2c0c82207671a2b38c26c4991d /services/surfaceflinger/SurfaceFlinger.h
parenta105c7bcfb6281b65d0384cf07a774a8235836fc (diff)
parent520d8fcb8aa54289f2272369d3040635c2fbd4bd (diff)
Snap for 13256841 from 520d8fcb8aa54289f2272369d3040635c2fbd4bd to 25Q2-release
Change-Id: If86b3c2a4136267c7ea448cd178eb8744a9643fd
Diffstat (limited to 'services/surfaceflinger/SurfaceFlinger.h')
-rw-r--r--services/surfaceflinger/SurfaceFlinger.h25
1 files changed, 12 insertions, 13 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index c472c4c6d4..fe8998403e 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -545,13 +545,7 @@ private:
}
sp<IBinder> getPhysicalDisplayToken(PhysicalDisplayId displayId) const;
- status_t setTransactionState(
- const FrameTimelineInfo& frameTimelineInfo, Vector<ComposerState>& state,
- Vector<DisplayState>& displays, uint32_t flags, const sp<IBinder>& applyToken,
- InputWindowCommands inputWindowCommands, int64_t desiredPresentTime,
- bool isAutoTimestamp, const std::vector<client_cache_t>& uncacheBuffers,
- bool hasListenerCallbacks, const std::vector<ListenerCallbacks>& listenerCallbacks,
- uint64_t transactionId, const std::vector<uint64_t>& mergedTransactionIds) override;
+ status_t setTransactionState(TransactionState&&) override;
void bootFinished();
status_t getSupportedFrameTimestamps(std::vector<FrameEvent>* outSupported) const;
sp<IDisplayEventConnection> createDisplayEventConnection(
@@ -739,14 +733,19 @@ private:
void setVirtualDisplayPowerMode(const sp<DisplayDevice>& display, hal::PowerMode mode)
REQUIRES(mStateLock, kMainThreadContext);
- // Adjusts thread scheduling according to the optimization policy
- static void optimizeThreadScheduling(
- const char* whence, gui::ISurfaceComposer::OptimizationPolicy optimizationPolicy);
+ // Returns whether to optimize globally for performance instead of power.
+ bool shouldOptimizeForPerformance() REQUIRES(mStateLock);
+
+ // Turns on power optimizations, for example when there are no displays to be optimized for
+ // performance.
+ static void enablePowerOptimizations(const char* whence);
+
+ // Turns off power optimizations.
+ static void disablePowerOptimizations(const char* whence);
// Enables or disables power optimizations depending on whether there are displays that should
// be optimized for performance.
- void applyOptimizationPolicy(const char* whence) REQUIRES(kMainThreadContext)
- REQUIRES(mStateLock);
+ void applyOptimizationPolicy(const char* whence) REQUIRES(mStateLock);
// Returns the preferred mode for PhysicalDisplayId if the Scheduler has selected one for that
// display. Falls back to the display's defaultModeId otherwise.
@@ -793,7 +792,7 @@ private:
*/
bool applyTransactionState(const FrameTimelineInfo& info,
std::vector<ResolvedComposerState>& state,
- Vector<DisplayState>& displays, uint32_t flags,
+ std::span<DisplayState> displays, uint32_t flags,
const InputWindowCommands& inputWindowCommands,
const int64_t desiredPresentTime, bool isAutoTimestamp,
const std::vector<uint64_t>& uncacheBufferIds,