Loading services/surfaceflinger/CompositionEngine/include/compositionengine/impl/planner/CachedSet.h +2 −0 Original line number Diff line number Diff line Loading @@ -135,6 +135,8 @@ public: bool hasHdrLayers() const; bool hasProtectedLayers() const; private: CachedSet() = default; Loading services/surfaceflinger/CompositionEngine/include/compositionengine/impl/planner/LayerState.h +4 −0 Original line number Diff line number Diff line Loading @@ -249,6 +249,10 @@ public: transfer == ui::Dataspace::TRANSFER_HLG); } bool isProtected() const { return getOutputLayer()->getLayerFE().getCompositionState()->hasProtectedContent; } void dump(std::string& result) const; std::optional<std::string> compare(const LayerState& other) const; Loading services/surfaceflinger/CompositionEngine/src/planner/CachedSet.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -350,6 +350,11 @@ bool CachedSet::hasHdrLayers() const { [](const Layer& layer) { return layer.getState()->isHdr(); }); } bool CachedSet::hasProtectedLayers() const { return std::any_of(mLayers.cbegin(), mLayers.cend(), [](const Layer& layer) { return layer.getState()->isProtected(); }); } void CachedSet::dump(std::string& result) const { const auto now = std::chrono::steady_clock::now(); Loading services/surfaceflinger/CompositionEngine/src/planner/Flattener.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -373,7 +373,7 @@ std::vector<Flattener::Run> Flattener::findCandidateRuns(time_point now) const { const bool layerIsInactive = now - currentSet->getLastUpdate() > kActiveLayerTimeout; const bool layerHasBlur = currentSet->hasBlurBehind(); if (layerIsInactive && (firstLayer || runHasFirstLayer || !layerHasBlur) && !currentSet->hasHdrLayers()) { !currentSet->hasHdrLayers() && !currentSet->hasProtectedLayers()) { if (isPartOfRun) { builder.append(currentSet->getLayerCount()); } else { Loading Loading
services/surfaceflinger/CompositionEngine/include/compositionengine/impl/planner/CachedSet.h +2 −0 Original line number Diff line number Diff line Loading @@ -135,6 +135,8 @@ public: bool hasHdrLayers() const; bool hasProtectedLayers() const; private: CachedSet() = default; Loading
services/surfaceflinger/CompositionEngine/include/compositionengine/impl/planner/LayerState.h +4 −0 Original line number Diff line number Diff line Loading @@ -249,6 +249,10 @@ public: transfer == ui::Dataspace::TRANSFER_HLG); } bool isProtected() const { return getOutputLayer()->getLayerFE().getCompositionState()->hasProtectedContent; } void dump(std::string& result) const; std::optional<std::string> compare(const LayerState& other) const; Loading
services/surfaceflinger/CompositionEngine/src/planner/CachedSet.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -350,6 +350,11 @@ bool CachedSet::hasHdrLayers() const { [](const Layer& layer) { return layer.getState()->isHdr(); }); } bool CachedSet::hasProtectedLayers() const { return std::any_of(mLayers.cbegin(), mLayers.cend(), [](const Layer& layer) { return layer.getState()->isProtected(); }); } void CachedSet::dump(std::string& result) const { const auto now = std::chrono::steady_clock::now(); Loading
services/surfaceflinger/CompositionEngine/src/planner/Flattener.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -373,7 +373,7 @@ std::vector<Flattener::Run> Flattener::findCandidateRuns(time_point now) const { const bool layerIsInactive = now - currentSet->getLastUpdate() > kActiveLayerTimeout; const bool layerHasBlur = currentSet->hasBlurBehind(); if (layerIsInactive && (firstLayer || runHasFirstLayer || !layerHasBlur) && !currentSet->hasHdrLayers()) { !currentSet->hasHdrLayers() && !currentSet->hasProtectedLayers()) { if (isPartOfRun) { builder.append(currentSet->getLayerCount()); } else { Loading