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

Commit 553065f3 authored by Dimitry Ivanov's avatar Dimitry Ivanov Committed by android-build-merger
Browse files

Merge "replace dlclose() with CloseNativeLibrary() in vulkan layer"

am: 7101abd1

Change-Id: I9fe6bfe849640346abf0ebcebaf89180253ca630
parents d2f893a7 7101abd1
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -165,10 +165,15 @@ void LayerLibrary::Close() {
    std::lock_guard<std::mutex> lock(mutex_);
    if (--refcount_ == 0) {
        ALOGV("closing layer library '%s'", path_.c_str());
        dlclose(dlhandle_);
        std::string error_msg;
        if (!android::CloseNativeLibrary(dlhandle_, native_bridge_, &error_msg)) {
            ALOGE("failed to unload library '%s': %s", path_.c_str(), error_msg.c_str());
            refcount_++;
        } else {
           dlhandle_ = nullptr;
        }
    }
}

bool LayerLibrary::EnumerateLayers(size_t library_idx,
                                   std::vector<Layer>& instance_layers) const {