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

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

Merge "libvulkan: refactor the layer discovery logic"

parents 0354d791 9dfc93ac
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1172,11 +1172,16 @@ bool EnsureInitialized() {

    std::call_once(once_flag, []() {
        if (driver::OpenHAL()) {
            DiscoverLayers();
            initialized = true;
        }
    });

    {
        static std::mutex layer_lock;
        std::lock_guard<std::mutex> lock(layer_lock);
        DiscoverLayers();
    }

    return initialized;
}