diff options
Diffstat (limited to 'services/surfaceflinger/Layer.cpp')
-rw-r--r-- | services/surfaceflinger/Layer.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index 26840005d4..31b5e28e4e 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -192,6 +192,7 @@ Layer::Layer(const surfaceflinger::LayerCreationArgs& args) mDrawingState.dropInputMode = gui::DropInputMode::NONE; mDrawingState.dimmingEnabled = true; mDrawingState.defaultFrameRateCompatibility = FrameRateCompatibility::Default; + mDrawingState.frameRateSelectionStrategy = FrameRateSelectionStrategy::Self; if (args.flags & ISurfaceComposerClient::eNoColorFill) { // Set an invalid color so there is no color fill. @@ -1338,6 +1339,15 @@ bool Layer::setFrameRateCategory(FrameRateCategory category) { return true; } +bool Layer::setFrameRateSelectionStrategy(FrameRateSelectionStrategy strategy) { + if (mDrawingState.frameRateSelectionStrategy == strategy) return false; + mDrawingState.frameRateSelectionStrategy = strategy; + mDrawingState.sequence++; + mDrawingState.modified = true; + setTransactionFlags(eTransactionNeeded); + return true; +} + void Layer::setFrameTimelineVsyncForBufferTransaction(const FrameTimelineInfo& info, nsecs_t postTime) { mDrawingState.postTime = postTime; |