Signed-off-by: luhan <luhan22@huawei.com>
Change-Id: I08ae9929d913400e69c9800570a0bf02209932a1
This commit is contained in:
luhan 2024-06-13 12:03:54 +08:00
parent 54123667dc
commit d15c878969

View File

@ -347,7 +347,7 @@ void FilterNapi::GetPixelMapAsyncExecute(napi_env env, void* data)
}
managerFlag = (*manager).second.load();
}
if (!managerFlag) {
std::lock_guard<std::mutex> lock2(getPixelMapAsyncExecuteMutex_);
ctx->filterNapi->Render(ctx->forceCPU);
@ -368,7 +368,7 @@ napi_value FilterNapi::GetPixelMapAsync(napi_env env, napi_callback_info info)
{
napi_value result = nullptr;
napi_get_undefined(env, &result);
size_t argc = 1;
napi_value argv[1];
napi_status status;
@ -403,8 +403,9 @@ napi_value FilterNapi::GetPixelMapAsync(napi_env env, napi_callback_info info)
}
if (ctx->errorMsg != nullptr) {
IMG_CREATE_CREATE_ASYNC_WORK(env, status, "GetPixelMapAsyncError", [](napi_env env, void* data) {},
GetPixelMapAsyncErrorComplete, ctx, ctx->work);
IMG_CREATE_CREATE_ASYNC_WORK(env, status, "GetPixelMapAsyncError", [](napi_env env, void* data) {
EFFECT_LOG_E("FilterNapi: GetPixelMapAsync fail to extract param");
}, GetPixelMapAsyncErrorComplete, ctx, ctx->work);
} else {
IMG_CREATE_CREATE_ASYNC_WORK(env, status, "GetPixelMapAsync", GetPixelMapAsyncExecute,
GetPixelMapAsyncComplete, ctx, ctx->work);