summaryrefslogtreecommitdiff
path: root/libs/gui/LayerState.cpp
diff options
context:
space:
mode:
author Ana Krulec <akrulec@google.com> 2019-11-02 23:10:29 +0100
committer Ana Krulec <akrulec@google.com> 2020-01-15 16:36:19 -0800
commitc84d09b6464242b1809ffb4f7faa5b2632f4a5e0 (patch)
tree2657b5eedbf4251670addfc6576c470675fb57f6 /libs/gui/LayerState.cpp
parentb168232839544cc033bb98e18d3e478afb5ea929 (diff)
SF Generalization of Refresh Rates: Adding layer priority hint
Test: Device boots. Observe logs for errors. Test: Open Swappy and Chrome in split screen, tap between apps, SF prints the correct priority. Test: Open Chrome, play video. SF prints correct priority. Test: SF prints the correct priority received. Bug: 142507166 Change-Id: I5fa8a857c950db01f42a380a72d098039badc289
Diffstat (limited to 'libs/gui/LayerState.cpp')
-rw-r--r--libs/gui/LayerState.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp
index a7c4f4670a..8b448ff3f6 100644
--- a/libs/gui/LayerState.cpp
+++ b/libs/gui/LayerState.cpp
@@ -110,6 +110,9 @@ status_t layer_state_t::write(Parcel& output) const
}
}
output.writeFloat(shadowRadius);
+
+ output.writeInt32(frameRateSelectionPriority);
+
return NO_ERROR;
}
@@ -188,6 +191,9 @@ status_t layer_state_t::read(const Parcel& input)
listeners.emplace_back(listener, callbackIds);
}
shadowRadius = input.readFloat();
+
+ frameRateSelectionPriority = input.readInt32();
+
return NO_ERROR;
}
@@ -406,12 +412,14 @@ void layer_state_t::merge(const layer_state_t& other) {
what |= eMetadataChanged;
metadata.merge(other.metadata);
}
-
if (other.what & eShadowRadiusChanged) {
what |= eShadowRadiusChanged;
shadowRadius = other.shadowRadius;
}
-
+ if (other.what & eFrameRateSelectionPriority) {
+ what |= eFrameRateSelectionPriority;
+ frameRateSelectionPriority = other.frameRateSelectionPriority;
+ }
if ((other.what & what) != other.what) {
ALOGE("Unmerged SurfaceComposer Transaction properties. LayerState::merge needs updating? "
"other.what=0x%" PRIu64 " what=0x%" PRIu64,