!2534 arkui-x update master OH to weekly_20240909 and OH fix build bug

Merge pull request !2534 from mufeng521/mufeng_master_oh_weekly_20240909
This commit is contained in:
oh_ci 2024-09-14 03:56:12 +00:00 committed by Gitee
commit af149820fb
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -532,6 +532,7 @@ bool PixelMap::CheckParams(const uint32_t *colors, uint32_t colorLength, int32_t
return true; return true;
} }
#if !defined(IOS_PLATFORM) && !defined(ANDROID_PLATFORM)
bool InitYuvDataOutInfo(SurfaceBuffer* surfaceBuffer, const ImageInfo &info, YUVDataInfo &yuvInfo) bool InitYuvDataOutInfo(SurfaceBuffer* surfaceBuffer, const ImageInfo &info, YUVDataInfo &yuvInfo)
{ {
if (surfaceBuffer == nullptr) { if (surfaceBuffer == nullptr) {
@ -557,6 +558,7 @@ bool InitYuvDataOutInfo(SurfaceBuffer* surfaceBuffer, const ImageInfo &info, YUV
yuvInfo.uvOffset = planes->planes[uvPlaneOffset].offset; yuvInfo.uvOffset = planes->planes[uvPlaneOffset].offset;
return true; return true;
} }
#endif
static bool CheckPixelMap(unique_ptr<PixelMap>& dstPixelMap, const InitializationOptions &opts) static bool CheckPixelMap(unique_ptr<PixelMap>& dstPixelMap, const InitializationOptions &opts)
{ {
@ -612,10 +614,12 @@ unique_ptr<PixelMap> PixelMap::Create(const InitializationOptions &opts)
if (IsYUV(opts.pixelFormat)) { if (IsYUV(opts.pixelFormat)) {
if (dstPixelFormat == PixelFormat::YCRCB_P010 || dstPixelFormat == PixelFormat::YCBCR_P010) { if (dstPixelFormat == PixelFormat::YCRCB_P010 || dstPixelFormat == PixelFormat::YCBCR_P010) {
YUVDataInfo yuvDatainfo; YUVDataInfo yuvDatainfo;
#if !defined(IOS_PLATFORM) && !defined(ANDROID_PLATFORM)
if (!InitYuvDataOutInfo(reinterpret_cast<SurfaceBuffer*>(dstMemory->extend.data), if (!InitYuvDataOutInfo(reinterpret_cast<SurfaceBuffer*>(dstMemory->extend.data),
dstImageInfo, yuvDatainfo)) { dstImageInfo, yuvDatainfo)) {
return nullptr; return nullptr;
} }
#endif
dstPixelMap->SetImageYUVInfo(yuvDatainfo); dstPixelMap->SetImageYUVInfo(yuvDatainfo);
} else { } else {
SetYUVDataInfoToPixelMap(dstPixelMap); SetYUVDataInfoToPixelMap(dstPixelMap);