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

Commit fa6b41dc authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "libvulkan: ensure layer discovery is triggered only once for a new process"

parents 2f089b4e 519b44c8
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1177,10 +1177,14 @@ bool EnsureInitialized() {
    });

    {
        static pid_t pid = getpid() + 1;
        static std::mutex layer_lock;
        std::lock_guard<std::mutex> lock(layer_lock);
        if (pid != getpid()) {
            pid = getpid();
            DiscoverLayers();
        }
    }

    return initialized;
}