修改跨平台判断

Signed-off-by: zhujingru <zhujingru2@huawei.com>
This commit is contained in:
zhujingru 2024-01-22 18:41:14 +08:00
parent f68017e8f0
commit 3a7f52c4b3
3 changed files with 4 additions and 3 deletions

View File

@ -778,6 +778,8 @@ uint32_t PixelMap::SetRowDataSizeForImageInfo(ImageInfo info)
} else {
SetRowStride(pixelBytes_ * info.size.width);
}
#else
SetRowStride(pixelBytes_ * info.size.width);
#endif
rowDataSize_ = pixelBytes_ * info.size.width;
}

View File

@ -805,7 +805,7 @@ STATIC_EXEC_FUNC(CreatePixelMapFromSurface)
if (IMG_NOT_NULL(context->rPixelMap)) {
context->status = SUCCESS;
} else {
context->status = ERROR;
context->status = ERR_IMAGE_INVALID_PARAMETER;
}
}
@ -822,7 +822,7 @@ void PixelMapNapi::CreatePixelMapFromSurfaceComplete(napi_env env, napi_status s
}
if (!IMG_IS_OK(status)) {
context->status = ERROR;
context->status = ERR_IMAGE_PIXELMAP_CREATE_FAILED;
HiLog::Error(LABEL, "New instance could not be obtained");
napi_get_undefined(env, &result);
}

View File

@ -157,7 +157,6 @@ struct ImageInfo {
ColorSpace colorSpace = ColorSpace::SRGB;
AlphaType alphaType = AlphaType::IMAGE_ALPHA_TYPE_UNKNOWN;
int32_t baseDensity = 0;
int32_t stride = 1;
};
struct FillColor {