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

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

Merge changes Ib30f7d8e,I669bcd7d,I416bff27 into udc-dev

* changes:
  [LayerTraceGenerator] fix mirrors and rel-z data
  [LayerTraceGenerator] Ignore unknown handles
  [sf] Switch layer trace generator to use the new sf front end
parents a54014b4 39872bc1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -167,6 +167,7 @@ auto DisplayDevice::getFrontEndInfo() const -> frontend::DisplayInfo {
            .receivesInput = receivesInput(),
            .isSecure = isSecure(),
            .isPrimary = isPrimary(),
            .isVirtual = isVirtual(),
            .rotationFlags = ui::Transform::toRotationFlags(mOrientation),
            .transformHint = getTransformHint()};
}
+1 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ struct DisplayInfo {
    bool isSecure;
    // TODO(b/238781169) can eliminate once sPrimaryDisplayRotationFlags is removed.
    bool isPrimary;
    bool isVirtual;
    ui::Transform::RotationFlags rotationFlags;
    ui::Transform::RotationFlags transformHint;
    std::string getDebugString() const {
+4 −2
Original line number Diff line number Diff line
@@ -69,7 +69,9 @@ LayerCreationArgs::LayerCreationArgs(std::optional<uint32_t> id, bool internalLa
      : LayerCreationArgs(nullptr, nullptr, /*name=*/"", /*flags=*/0, /*metadata=*/{}, id,
                          internalLayer) {}

LayerCreationArgs::LayerCreationArgs(const LayerCreationArgs& args)
      : LayerCreationArgs(args.flinger, args.client, args.name, args.flags, args.metadata) {}
LayerCreationArgs LayerCreationArgs::fromOtherArgs(const LayerCreationArgs& other) {
    // returns a new instance of LayerCreationArgs with a unique id.
    return LayerCreationArgs(other.flinger, other.client, other.name, other.flags, other.metadata);
}

} // namespace android::surfaceflinger
+2 −2
Original line number Diff line number Diff line
@@ -37,13 +37,13 @@ namespace android::surfaceflinger {
struct LayerCreationArgs {
    static std::atomic<uint32_t> sSequence;
    static uint32_t getInternalLayerId(uint32_t id);
    static LayerCreationArgs fromOtherArgs(const LayerCreationArgs& other);

    LayerCreationArgs(android::SurfaceFlinger*, sp<android::Client>, std::string name,
                      uint32_t flags, gui::LayerMetadata, std::optional<uint32_t> id = std::nullopt,
                      bool internalLayer = false);
    LayerCreationArgs(std::optional<uint32_t> id, bool internalLayer = false);

    LayerCreationArgs(const LayerCreationArgs&);
    LayerCreationArgs() = default; // for tracing

    android::SurfaceFlinger* flinger;
    sp<android::Client> client;
+10 −0
Original line number Diff line number Diff line
@@ -104,6 +104,16 @@ public:
        static const TraversalPath ROOT;
    };

    struct TraversalPathHash {
        std::size_t operator()(const LayerHierarchy::TraversalPath& key) const {
            uint32_t hashCode = key.id * 31;
            if (key.mirrorRootId != UNASSIGNED_LAYER_ID) {
                hashCode += key.mirrorRootId * 31;
            }
            return std::hash<size_t>{}(hashCode);
        }
    };

    // Helper class to add nodes to an existing traversal id and removes the
    // node when it goes out of scope.
    class ScopedAddToTraversalPath {
Loading