Loading libs/gui/LayerState.cpp +6 −1 Original line number Diff line number Diff line Loading @@ -85,6 +85,7 @@ layer_state_t::layer_state_t() changeFrameRateStrategy(ANATIVEWINDOW_CHANGE_FRAME_RATE_ONLY_IF_SEAMLESS), defaultFrameRateCompatibility(ANATIVEWINDOW_FRAME_RATE_COMPATIBILITY_DEFAULT), frameRateCategory(ANATIVEWINDOW_FRAME_RATE_CATEGORY_DEFAULT), frameRateCategorySmoothSwitchOnly(false), frameRateSelectionStrategy(ANATIVEWINDOW_FRAME_RATE_SELECTION_STRATEGY_SELF), fixedTransformHint(ui::Transform::ROT_INVALID), autoRefresh(false), Loading Loading @@ -162,6 +163,7 @@ status_t layer_state_t::write(Parcel& output) const SAFE_PARCEL(output.writeByte, changeFrameRateStrategy); SAFE_PARCEL(output.writeByte, defaultFrameRateCompatibility); SAFE_PARCEL(output.writeByte, frameRateCategory); SAFE_PARCEL(output.writeBool, frameRateCategorySmoothSwitchOnly); SAFE_PARCEL(output.writeByte, frameRateSelectionStrategy); SAFE_PARCEL(output.writeUint32, fixedTransformHint); SAFE_PARCEL(output.writeBool, autoRefresh); Loading Loading @@ -296,6 +298,7 @@ status_t layer_state_t::read(const Parcel& input) SAFE_PARCEL(input.readByte, &changeFrameRateStrategy); SAFE_PARCEL(input.readByte, &defaultFrameRateCompatibility); SAFE_PARCEL(input.readByte, &frameRateCategory); SAFE_PARCEL(input.readBool, &frameRateCategorySmoothSwitchOnly); SAFE_PARCEL(input.readByte, &frameRateSelectionStrategy); SAFE_PARCEL(input.readUint32, &tmpUint32); fixedTransformHint = static_cast<ui::Transform::RotationFlags>(tmpUint32); Loading Loading @@ -669,6 +672,7 @@ void layer_state_t::merge(const layer_state_t& other) { if (other.what & eFrameRateCategoryChanged) { what |= eFrameRateCategoryChanged; frameRateCategory = other.frameRateCategory; frameRateCategorySmoothSwitchOnly = other.frameRateCategorySmoothSwitchOnly; } if (other.what & eFrameRateSelectionStrategyChanged) { what |= eFrameRateSelectionStrategyChanged; Loading Loading @@ -784,7 +788,8 @@ uint64_t layer_state_t::diff(const layer_state_t& other) const { CHECK_DIFF(diff, eFrameRateSelectionPriority, other, frameRateSelectionPriority); CHECK_DIFF3(diff, eFrameRateChanged, other, frameRate, frameRateCompatibility, changeFrameRateStrategy); CHECK_DIFF(diff, eFrameRateCategoryChanged, other, frameRateCategory); CHECK_DIFF2(diff, eFrameRateCategoryChanged, other, frameRateCategory, frameRateCategorySmoothSwitchOnly); CHECK_DIFF(diff, eFrameRateSelectionStrategyChanged, other, frameRateSelectionStrategy); CHECK_DIFF(diff, eFixedTransformHintChanged, other, fixedTransformHint); CHECK_DIFF(diff, eAutoRefreshChanged, other, autoRefresh); Loading libs/gui/SurfaceComposerClient.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -2098,7 +2098,7 @@ SurfaceComposerClient::Transaction::setDefaultFrameRateCompatibility(const sp<Su } SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setFrameRateCategory( const sp<SurfaceControl>& sc, int8_t category) { const sp<SurfaceControl>& sc, int8_t category, bool smoothSwitchOnly) { layer_state_t* s = getLayerState(sc); if (!s) { mStatus = BAD_INDEX; Loading @@ -2106,6 +2106,7 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setFrame } s->what |= layer_state_t::eFrameRateCategoryChanged; s->frameRateCategory = category; s->frameRateCategorySmoothSwitchOnly = smoothSwitchOnly; return *this; } Loading libs/gui/include/gui/LayerState.h +1 −0 Original line number Diff line number Diff line Loading @@ -361,6 +361,7 @@ struct layer_state_t { // Frame rate category to suggest what frame rate range a surface should run. int8_t frameRateCategory; bool frameRateCategorySmoothSwitchOnly; // Strategy of the layer for frame rate selection. int8_t frameRateSelectionStrategy; Loading libs/gui/include/gui/SurfaceComposerClient.h +2 −1 Original line number Diff line number Diff line Loading @@ -686,7 +686,8 @@ public: Transaction& setDefaultFrameRateCompatibility(const sp<SurfaceControl>& sc, int8_t compatibility); Transaction& setFrameRateCategory(const sp<SurfaceControl>& sc, int8_t category); Transaction& setFrameRateCategory(const sp<SurfaceControl>& sc, int8_t category, bool smoothSwitchOnly); Transaction& setFrameRateSelectionStrategy(const sp<SurfaceControl>& sc, int8_t strategy); Loading services/surfaceflinger/FrontEnd/RequestedLayerState.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -124,6 +124,7 @@ RequestedLayerState::RequestedLayerState(const LayerCreationArgs& args) dimmingEnabled = true; defaultFrameRateCompatibility = static_cast<int8_t>(scheduler::FrameRateCompatibility::Default); frameRateCategory = static_cast<int8_t>(FrameRateCategory::Default); frameRateCategorySmoothSwitchOnly = false; frameRateSelectionStrategy = static_cast<int8_t>(scheduler::LayerInfo::FrameRateSelectionStrategy::Self); dataspace = ui::Dataspace::V0_SRGB; Loading Loading
libs/gui/LayerState.cpp +6 −1 Original line number Diff line number Diff line Loading @@ -85,6 +85,7 @@ layer_state_t::layer_state_t() changeFrameRateStrategy(ANATIVEWINDOW_CHANGE_FRAME_RATE_ONLY_IF_SEAMLESS), defaultFrameRateCompatibility(ANATIVEWINDOW_FRAME_RATE_COMPATIBILITY_DEFAULT), frameRateCategory(ANATIVEWINDOW_FRAME_RATE_CATEGORY_DEFAULT), frameRateCategorySmoothSwitchOnly(false), frameRateSelectionStrategy(ANATIVEWINDOW_FRAME_RATE_SELECTION_STRATEGY_SELF), fixedTransformHint(ui::Transform::ROT_INVALID), autoRefresh(false), Loading Loading @@ -162,6 +163,7 @@ status_t layer_state_t::write(Parcel& output) const SAFE_PARCEL(output.writeByte, changeFrameRateStrategy); SAFE_PARCEL(output.writeByte, defaultFrameRateCompatibility); SAFE_PARCEL(output.writeByte, frameRateCategory); SAFE_PARCEL(output.writeBool, frameRateCategorySmoothSwitchOnly); SAFE_PARCEL(output.writeByte, frameRateSelectionStrategy); SAFE_PARCEL(output.writeUint32, fixedTransformHint); SAFE_PARCEL(output.writeBool, autoRefresh); Loading Loading @@ -296,6 +298,7 @@ status_t layer_state_t::read(const Parcel& input) SAFE_PARCEL(input.readByte, &changeFrameRateStrategy); SAFE_PARCEL(input.readByte, &defaultFrameRateCompatibility); SAFE_PARCEL(input.readByte, &frameRateCategory); SAFE_PARCEL(input.readBool, &frameRateCategorySmoothSwitchOnly); SAFE_PARCEL(input.readByte, &frameRateSelectionStrategy); SAFE_PARCEL(input.readUint32, &tmpUint32); fixedTransformHint = static_cast<ui::Transform::RotationFlags>(tmpUint32); Loading Loading @@ -669,6 +672,7 @@ void layer_state_t::merge(const layer_state_t& other) { if (other.what & eFrameRateCategoryChanged) { what |= eFrameRateCategoryChanged; frameRateCategory = other.frameRateCategory; frameRateCategorySmoothSwitchOnly = other.frameRateCategorySmoothSwitchOnly; } if (other.what & eFrameRateSelectionStrategyChanged) { what |= eFrameRateSelectionStrategyChanged; Loading Loading @@ -784,7 +788,8 @@ uint64_t layer_state_t::diff(const layer_state_t& other) const { CHECK_DIFF(diff, eFrameRateSelectionPriority, other, frameRateSelectionPriority); CHECK_DIFF3(diff, eFrameRateChanged, other, frameRate, frameRateCompatibility, changeFrameRateStrategy); CHECK_DIFF(diff, eFrameRateCategoryChanged, other, frameRateCategory); CHECK_DIFF2(diff, eFrameRateCategoryChanged, other, frameRateCategory, frameRateCategorySmoothSwitchOnly); CHECK_DIFF(diff, eFrameRateSelectionStrategyChanged, other, frameRateSelectionStrategy); CHECK_DIFF(diff, eFixedTransformHintChanged, other, fixedTransformHint); CHECK_DIFF(diff, eAutoRefreshChanged, other, autoRefresh); Loading
libs/gui/SurfaceComposerClient.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -2098,7 +2098,7 @@ SurfaceComposerClient::Transaction::setDefaultFrameRateCompatibility(const sp<Su } SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setFrameRateCategory( const sp<SurfaceControl>& sc, int8_t category) { const sp<SurfaceControl>& sc, int8_t category, bool smoothSwitchOnly) { layer_state_t* s = getLayerState(sc); if (!s) { mStatus = BAD_INDEX; Loading @@ -2106,6 +2106,7 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setFrame } s->what |= layer_state_t::eFrameRateCategoryChanged; s->frameRateCategory = category; s->frameRateCategorySmoothSwitchOnly = smoothSwitchOnly; return *this; } Loading
libs/gui/include/gui/LayerState.h +1 −0 Original line number Diff line number Diff line Loading @@ -361,6 +361,7 @@ struct layer_state_t { // Frame rate category to suggest what frame rate range a surface should run. int8_t frameRateCategory; bool frameRateCategorySmoothSwitchOnly; // Strategy of the layer for frame rate selection. int8_t frameRateSelectionStrategy; Loading
libs/gui/include/gui/SurfaceComposerClient.h +2 −1 Original line number Diff line number Diff line Loading @@ -686,7 +686,8 @@ public: Transaction& setDefaultFrameRateCompatibility(const sp<SurfaceControl>& sc, int8_t compatibility); Transaction& setFrameRateCategory(const sp<SurfaceControl>& sc, int8_t category); Transaction& setFrameRateCategory(const sp<SurfaceControl>& sc, int8_t category, bool smoothSwitchOnly); Transaction& setFrameRateSelectionStrategy(const sp<SurfaceControl>& sc, int8_t strategy); Loading
services/surfaceflinger/FrontEnd/RequestedLayerState.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -124,6 +124,7 @@ RequestedLayerState::RequestedLayerState(const LayerCreationArgs& args) dimmingEnabled = true; defaultFrameRateCompatibility = static_cast<int8_t>(scheduler::FrameRateCompatibility::Default); frameRateCategory = static_cast<int8_t>(FrameRateCategory::Default); frameRateCategorySmoothSwitchOnly = false; frameRateSelectionStrategy = static_cast<int8_t>(scheduler::LayerInfo::FrameRateSelectionStrategy::Self); dataspace = ui::Dataspace::V0_SRGB; Loading