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

Commit a0cff095 authored by Vishnu Nair's avatar Vishnu Nair Committed by Android (Google) Code Review
Browse files

Merge changes I1c9370fd,Ibe54154b,I9d75ee51,I68818430 into udc-dev

* changes:
  [sf] support region sampling with new frontend
  [sf] provide a unique id for snapshots
  [sf] write layer snapshots to layer trace
  [sf] fix boot animation with new frontend
parents 854b864e c5a5b6e0
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -130,6 +130,14 @@ const RequestedLayerState* LayerHierarchy::getLayer() const {
    return mLayer;
}

const LayerHierarchy* LayerHierarchy::getRelativeParent() const {
    return mRelativeParent;
}

const LayerHierarchy* LayerHierarchy::getParent() const {
    return mParent;
}

std::string LayerHierarchy::getDebugStringShort() const {
    std::string debug = "LayerHierarchy{";
    debug += ((mLayer) ? mLayer->getDebugString() : "root") + " ";
+2 −0
Original line number Diff line number Diff line
@@ -144,6 +144,8 @@ public:
    }

    const RequestedLayerState* getLayer() const;
    const LayerHierarchy* getRelativeParent() const;
    const LayerHierarchy* getParent() const;
    std::string getDebugString(const char* prefix = "") const;
    std::string getDebugStringShort() const;
    // Traverse the hierarchy and return true if loops are found. The outInvalidRelativeRoot
+5 −1
Original line number Diff line number Diff line
@@ -27,12 +27,16 @@ using namespace ftl::flag_operators;
LayerSnapshot::LayerSnapshot(const RequestedLayerState& state,
                             const LayerHierarchy::TraversalPath& path)
      : path(path) {
    static uint32_t sUniqueSequenceId = 0;
    // Provide a unique id for clones otherwise keeping using the sequence id.
    // The seq id can still be useful for debugging if its available.
    uniqueSequence = (path.isClone()) ? sUniqueSequenceId++ : state.id;
    sequence = static_cast<int32_t>(state.id);
    name = state.name;
    textureName = state.textureName;
    premultipliedAlpha = state.premultipliedAlpha;
    inputInfo.name = state.name;
    inputInfo.id = static_cast<int32_t>(state.id);
    inputInfo.id = static_cast<int32_t>(uniqueSequence);
    inputInfo.ownerUid = static_cast<int32_t>(state.ownerUid);
    inputInfo.ownerPid = state.ownerPid;
    changes = RequestedLayerState::Changes::Created;
+6 −0
Original line number Diff line number Diff line
@@ -57,6 +57,12 @@ struct LayerSnapshot : public compositionengine::LayerFECompositionState {
    bool isHiddenByPolicyFromParent = false;
    bool isHiddenByPolicyFromRelativeParent = false;
    ftl::Flags<RequestedLayerState::Changes> changes;
    // Some consumers of this snapshot (input, layer traces) rely on each snapshot to be unique.
    // For mirrored layers, snapshots will have the same sequence so this unique id provides
    // an alternative identifier when needed.
    uint32_t uniqueSequence;
    // Layer id used to create this snapshot. Multiple snapshots will have the same sequence if they
    // generated from the same layer, for example when mirroring.
    int32_t sequence;
    std::string name;
    uint32_t textureName;
+1 −1
Original line number Diff line number Diff line
@@ -957,7 +957,7 @@ void LayerSnapshotBuilder::updateInput(LayerSnapshot& snapshot,
    }

    snapshot.inputInfo.name = requested.name;
    snapshot.inputInfo.id = static_cast<int32_t>(requested.id);
    snapshot.inputInfo.id = static_cast<int32_t>(snapshot.uniqueSequence);
    snapshot.inputInfo.ownerUid = static_cast<int32_t>(requested.ownerUid);
    snapshot.inputInfo.ownerPid = requested.ownerPid;
    snapshot.inputInfo.displayId = static_cast<int32_t>(snapshot.outputFilter.layerStack.id);
Loading