Loading services/surfaceflinger/Layer.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -1014,8 +1014,10 @@ bool Layer::isLayerFocusedBasedOnPriority(int32_t priority) { return priority == PRIORITY_FOCUSED_WITH_MODE || priority == PRIORITY_FOCUSED_WITHOUT_MODE; }; ui::LayerStack Layer::getLayerStack() const { if (const auto parent = mDrawingParent.promote()) { ui::LayerStack Layer::getLayerStack(LayerVector::StateSet state) const { bool useDrawing = state == LayerVector::StateSet::Drawing; const auto parent = useDrawing ? mDrawingParent.promote() : mCurrentParent.promote(); if (parent) { return parent->getLayerStack(); } return getDrawingState().layerStack; Loading services/surfaceflinger/Layer.h +3 −1 Original line number Diff line number Diff line Loading @@ -320,7 +320,9 @@ public: virtual bool setTrustedOverlay(bool); virtual bool setFlags(uint32_t flags, uint32_t mask); virtual bool setLayerStack(ui::LayerStack); virtual ui::LayerStack getLayerStack() const; virtual ui::LayerStack getLayerStack( LayerVector::StateSet state = LayerVector::StateSet::Drawing) const; virtual bool setMetadata(const LayerMetadata& data); virtual void setChildrenDrawingParent(const sp<Layer>&); virtual bool reparent(const sp<IBinder>& newParentHandle); Loading services/surfaceflinger/SurfaceFlinger.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -4123,7 +4123,7 @@ uint32_t SurfaceFlinger::setClientStateLocked(const FrameTimelineInfo& frameTime return 0; } ui::LayerStack oldLayerStack = layer->getLayerStack(); ui::LayerStack oldLayerStack = layer->getLayerStack(LayerVector::StateSet::Current); // Only set by BLAST adapter layers if (what & layer_state_t::eProducerDisconnect) { Loading Loading @@ -4392,7 +4392,8 @@ uint32_t SurfaceFlinger::setClientStateLocked(const FrameTimelineInfo& frameTime // setTransactionCompletedListener // if the layer has been parented on to a new display, update its transform hint. if (((flags & eTransformHintUpdateNeeded) == 0) && oldLayerStack != layer->getLayerStack()) { if (((flags & eTransformHintUpdateNeeded) == 0) && oldLayerStack != layer->getLayerStack(LayerVector::StateSet::Current)) { flags |= eTransformHintUpdateNeeded; } Loading Loading @@ -6892,7 +6893,7 @@ void SurfaceFlinger::handleLayerCreatedLocked(const LayerCreatedState& state, Vs parent->addChild(layer); } ui::LayerStack layerStack = layer->getLayerStack(); ui::LayerStack layerStack = layer->getLayerStack(LayerVector::StateSet::Current); sp<const DisplayDevice> hintDisplay; // Find the display that includes the layer. for (const auto& [token, display] : mDisplays) { Loading Loading
services/surfaceflinger/Layer.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -1014,8 +1014,10 @@ bool Layer::isLayerFocusedBasedOnPriority(int32_t priority) { return priority == PRIORITY_FOCUSED_WITH_MODE || priority == PRIORITY_FOCUSED_WITHOUT_MODE; }; ui::LayerStack Layer::getLayerStack() const { if (const auto parent = mDrawingParent.promote()) { ui::LayerStack Layer::getLayerStack(LayerVector::StateSet state) const { bool useDrawing = state == LayerVector::StateSet::Drawing; const auto parent = useDrawing ? mDrawingParent.promote() : mCurrentParent.promote(); if (parent) { return parent->getLayerStack(); } return getDrawingState().layerStack; Loading
services/surfaceflinger/Layer.h +3 −1 Original line number Diff line number Diff line Loading @@ -320,7 +320,9 @@ public: virtual bool setTrustedOverlay(bool); virtual bool setFlags(uint32_t flags, uint32_t mask); virtual bool setLayerStack(ui::LayerStack); virtual ui::LayerStack getLayerStack() const; virtual ui::LayerStack getLayerStack( LayerVector::StateSet state = LayerVector::StateSet::Drawing) const; virtual bool setMetadata(const LayerMetadata& data); virtual void setChildrenDrawingParent(const sp<Layer>&); virtual bool reparent(const sp<IBinder>& newParentHandle); Loading
services/surfaceflinger/SurfaceFlinger.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -4123,7 +4123,7 @@ uint32_t SurfaceFlinger::setClientStateLocked(const FrameTimelineInfo& frameTime return 0; } ui::LayerStack oldLayerStack = layer->getLayerStack(); ui::LayerStack oldLayerStack = layer->getLayerStack(LayerVector::StateSet::Current); // Only set by BLAST adapter layers if (what & layer_state_t::eProducerDisconnect) { Loading Loading @@ -4392,7 +4392,8 @@ uint32_t SurfaceFlinger::setClientStateLocked(const FrameTimelineInfo& frameTime // setTransactionCompletedListener // if the layer has been parented on to a new display, update its transform hint. if (((flags & eTransformHintUpdateNeeded) == 0) && oldLayerStack != layer->getLayerStack()) { if (((flags & eTransformHintUpdateNeeded) == 0) && oldLayerStack != layer->getLayerStack(LayerVector::StateSet::Current)) { flags |= eTransformHintUpdateNeeded; } Loading Loading @@ -6892,7 +6893,7 @@ void SurfaceFlinger::handleLayerCreatedLocked(const LayerCreatedState& state, Vs parent->addChild(layer); } ui::LayerStack layerStack = layer->getLayerStack(); ui::LayerStack layerStack = layer->getLayerStack(LayerVector::StateSet::Current); sp<const DisplayDevice> hintDisplay; // Find the display that includes the layer. for (const auto& [token, display] : mDisplays) { Loading