diff --git a/engine/flutter/shell/platform/ohos/ohos_surface_software.cc b/engine/flutter/shell/platform/ohos/ohos_surface_software.cc index da4a3513b3d52577f918187f1288c38896d7468c..043bd88c893f0637b13669a294363a8e6129c17e 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); }