Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 14fd41aa authored by Alec Mouri's avatar Alec Mouri
Browse files

Don't skip blurring recently-decomposed cachedsets.

If we had found that a cachedset had a blur effect applied, then we tell the layer requesting the blur to skip blurring. This is so that we do not blur twice.

But, this does not hold if we needed to update a cachedset, meaning that the blur effect was no longer applied. This was previously causing us to never render a blur.

Bug: 390403736
Change-Id: I4389a8c73b20556abe392fe3b464408c6775fc34
Flag: EXEMPT bug fix
Test: Notification shade + blurs
parent 5a2c6135
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -325,6 +325,7 @@ bool Flattener::mergeWithCachedSets(const std::vector<const LayerState*>& layers
                                priorBlurLayer == (*incomingLayerIter)->getOutputLayer();
                        OutputLayer::CompositionState& state =
                                (*incomingLayerIter)->getOutputLayer()->editState();

                        state.overrideInfo = {
                                .buffer = mNewCachedSet->getBuffer(),
                                .acquireFence = mNewCachedSet->getDrawFence(),
@@ -378,6 +379,7 @@ bool Flattener::mergeWithCachedSets(const std::vector<const LayerState*>& layers
                };
                ++incomingLayerIter;
            }
            priorBlurLayer = currentLayerIter->getBlurLayer();
        } else if (currentLayerIter->getLayerCount() > 1) {
            // Break the current layer into its constituent layers
            ++mInvalidatedCachedSetAges[currentLayerIter->getAge()];
@@ -400,8 +402,8 @@ bool Flattener::mergeWithCachedSets(const std::vector<const LayerState*>& layers
            currentLayerIter->updateAge(now);
            merged.emplace_back(*currentLayerIter);
            ++incomingLayerIter;
        }
          priorBlurLayer = currentLayerIter->getBlurLayer();
        }
        ++currentLayerIter;
    }