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

Commit e40935f3 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

am: 553065f3

Change-Id: I8663dbd8c0740780d19dd0f826c9216009231bb1
parents 876199e6 553065f3
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 {