From 941f07f11af6135640ff5c333b8ce2bd4aa73a79 Mon Sep 17 00:00:00 2001 From: quguiren Date: Mon, 19 Aug 2024 16:15:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8B=96=E6=8B=BD=E8=BF=87?= =?UTF-8?q?=E7=A8=8B=E4=B8=AD=E5=9B=BE=E7=89=87=E9=87=8D=E5=BD=B1=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: quguiren --- rosen/modules/platform/image_native/pixel_map.cpp | 6 ++++++ .../core/pipeline/rs_divided_ui_capture.cpp | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/rosen/modules/platform/image_native/pixel_map.cpp b/rosen/modules/platform/image_native/pixel_map.cpp index 591487d95c..e9feb924ba 100644 --- a/rosen/modules/platform/image_native/pixel_map.cpp +++ b/rosen/modules/platform/image_native/pixel_map.cpp @@ -23,6 +23,12 @@ std::unique_ptr PixelMap::Create(const InitializationOptions &opts) return nullptr; } +std::unique_ptr PixelMap::Create( + const uint32_t* colors, uint32_t colorLength, const InitializationOptions& opts) +{ + return nullptr; +} + int32_t PixelMap::GetRowBytes() { return 0; diff --git a/rosen/modules/render_service_client/core/pipeline/rs_divided_ui_capture.cpp b/rosen/modules/render_service_client/core/pipeline/rs_divided_ui_capture.cpp index eb4723079c..8e0f26f9d0 100644 --- a/rosen/modules/render_service_client/core/pipeline/rs_divided_ui_capture.cpp +++ b/rosen/modules/render_service_client/core/pipeline/rs_divided_ui_capture.cpp @@ -79,7 +79,9 @@ std::shared_ptr 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(length); + return Media::PixelMap::Create(data.release(), length, opts); } std::shared_ptr RSDividedUICapture::CreateSurface(