diff --git a/modules/desktop_capture/screen_capturer_fuchsia.cc b/modules/desktop_capture/screen_capturer_fuchsia.cc index c0ad841c05..19c4c735ad 100644 --- a/modules/desktop_capture/screen_capturer_fuchsia.cc +++ b/modules/desktop_capture/screen_capturer_fuchsia.cc @@ -65,8 +65,7 @@ std::unique_ptr DesktopCapturer::CreateRawScreenCapturer( } ScreenCapturerFuchsia::ScreenCapturerFuchsia() - : component_context_( - sys::ComponentContext::CreateAndServeOutgoingDirectory()) { + : component_context_(sys::ComponentContext::Create()) { RTC_DCHECK(CheckRequirements()); } @@ -86,7 +85,7 @@ ScreenCapturerFuchsia::~ScreenCapturerFuchsia() { // TODO(fxbug.dev/100303): Remove this function when Flatland is the only API. bool ScreenCapturerFuchsia::CheckRequirements() { std::unique_ptr component_context = - sys::ComponentContext::CreateAndServeOutgoingDirectory(); + sys::ComponentContext::Create(); fuchsia::ui::scenic::ScenicSyncPtr scenic; zx_status_t status = component_context->svc()->Connect(scenic.NewRequest()); if (status != ZX_OK) { @@ -163,6 +162,9 @@ void ScreenCapturerFuchsia::CaptureFrame() { uint32_t stride = kFuchsiaBytesPerPixel * pixels_per_row; frame->CopyPixelsFrom(virtual_memory_mapped_addrs_[buffer_index], stride, DesktopRect::MakeWH(width_, height_)); + // Mark the whole screen as having been updated. + frame->mutable_updated_region()->SetRect( + DesktopRect::MakeWH(width_, height_)); fuchsia::ui::composition::ScreenCapture_ReleaseFrame_Result release_result; screen_capture_->ReleaseFrame(buffer_index, &release_result);