提交 6647e04c 编写于 作者: C Cao Chuan

Fix api changing

Signed-off-by: NCao Chuan <caochuan@huawei.com>
上级 1a650f30
......@@ -162,7 +162,8 @@ napi_value ImagePixelMapNDKTest::CreatePixelMap(napi_env env, napi_callback_info
if (!parseCreateOptions(env, argValue[NUM_1], &createOps)) {
return udfVar;
}
int32_t res = OH_PixelMap_CreatePixelMap(env, createOps, buffer, bufferSize, &pixelmap);
int32_t res = OH_PixelMap_CreatePixelMap(env, createOps,
static_cast<uint8_t*>(buffer), bufferSize, &pixelmap);
if (res != OHOS_IMAGE_RESULT_SUCCESS || pixelmap == nullptr) {
return udfVar;
}
......@@ -587,7 +588,7 @@ napi_value ImagePixelMapNDKTest::AccessPixels(napi_env env, napi_callback_info i
return result;
}
void* pixelAddr = nullptr;
uint8_t* pixelAddr = nullptr;
int32_t res = OH_PixelMap_AccessPixels(native, &pixelAddr);
if (res != OHOS_IMAGE_RESULT_SUCCESS || pixelAddr == nullptr) {
return result;
......
......@@ -29,8 +29,8 @@ static napi_value TestGetImageInfo(napi_env env, napi_callback_info info)
napi_get_cb_info(env, info, &argCount, argValue, &thisVar, nullptr);
OHOS::Media::OhosPixelMapInfo pixelMapInfo;
OHOS::Media::OH_GetImageInfo(env, argValue[0], &pixelMapInfo);
OhosPixelMapInfo pixelMapInfo;
OH_GetImageInfo(env, argValue[0], &pixelMapInfo);
return result;
}
......@@ -45,8 +45,8 @@ static napi_value TestAccessPixels(napi_env env, napi_callback_info info)
napi_get_cb_info(env, info, &argCount, argValue, &thisVar, nullptr);
void* addrPtr = nullptr;
OHOS::Media::OH_AccessPixels(env, argValue[0], &addrPtr);
uint8_t* addrPtr = nullptr;
OH_AccessPixels(env, argValue[0], &addrPtr);
return result;
}
......@@ -61,7 +61,7 @@ static napi_value TestUnAccessPixels(napi_env env, napi_callback_info info)
napi_get_cb_info(env, info, &argCount, argValue, &thisVar, nullptr);
OHOS::Media::OH_UnAccessPixels(env, argValue[0]);
OH_UnAccessPixels(env, argValue[0]);
return result;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册