From 0efdc30cc23423d0babe615ed406be88c91dae4e Mon Sep 17 00:00:00 2001 From: h00574155 Date: Wed, 15 Feb 2023 07:42:40 +0000 Subject: [PATCH] Fix the interfaces of FlushBuffer and AcquireBuffer Signed-off-by: h00574155 Change-Id: Id0b1218bdc0a8dfe230975f6c9eaa1efb0023fca --- .../shell/platform/ohos/ohos_surface_software.cc | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/engine/flutter/shell/platform/ohos/ohos_surface_software.cc b/engine/flutter/shell/platform/ohos/ohos_surface_software.cc index da4a3513..043bd88c 100644 --- a/engine/flutter/shell/platform/ohos/ohos_surface_software.cc +++ b/engine/flutter/shell/platform/ohos/ohos_surface_software.cc @@ -191,15 +191,10 @@ void OhosSurfaceSoftware::SurfaceDrawBuffer( void OhosSurfaceSoftware::SurfaceFlushBuffer(OHOS::sptr surfaceBuffer) { FML_LOG(INFO) << "OhosSurfaceSoftware flush buffer"; - OHOS::BufferFlushConfig flushConfig = { - .damage = { - .x = 0, - .y = 0, - .w = requestConfig_.width, - .h = requestConfig_.height, - }, - .timestamp = 0 - }; + OHOS::BufferFlushConfig flushConfig; + OHOS::Rect rect = { .x = 0, .y = 0, .w = requestConfig_.width, .h = requestConfig_.height, }; + flushConfig.damages.push_back(rect); + flushConfig.timestamp = 0; surface_->FlushBuffer(surfaceBuffer, -1, flushConfig); } -- Gitee