!14026 修复拖拽过程中图片重影问题

Merge pull request !14026 from qugr/2024_08_19_drag_drop
This commit is contained in:
openharmony_ci 2024-08-27 02:12:27 +00:00 committed by Gitee
commit d5f5ccf111
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 9 additions and 1 deletions

View File

@ -23,6 +23,12 @@ std::unique_ptr<PixelMap> PixelMap::Create(const InitializationOptions &opts)
return nullptr;
}
std::unique_ptr<PixelMap> PixelMap::Create(
const uint32_t* colors, uint32_t colorLength, const InitializationOptions& opts)
{
return nullptr;
}
int32_t PixelMap::GetRowBytes()
{
return 0;

View File

@ -79,7 +79,9 @@ std::shared_ptr<Media::PixelMap> RSDividedUICapture::CreatePixelMapByNode(std::s
Media::InitializationOptions opts;
opts.size.width = ceil(pixmapWidth * scaleX_);
opts.size.height = ceil(pixmapHeight * scaleY_);
return Media::PixelMap::Create(opts);
uint32_t length = opts.size.width * opts.size.height;
auto data = std::make_unique<uint32_t[]>(length);
return Media::PixelMap::Create(data.release(), length, opts);
}
std::shared_ptr<Drawing::Surface> RSDividedUICapture::CreateSurface(