diff --git a/atom/browser/osr/osr_render_widget_host_view.cc b/atom/browser/osr/osr_render_widget_host_view.cc index 7bc7c69afeaf..8a68b601d59b 100644 --- a/atom/browser/osr/osr_render_widget_host_view.cc +++ b/atom/browser/osr/osr_render_widget_host_view.cc @@ -128,8 +128,9 @@ class AtomCopyFrameGenerator { if (!view_->render_widget_host() || !view_->IsPainting()) return; - std::unique_ptr request = - viz::CopyOutputRequest::CreateBitmapRequest(base::Bind( + auto request = std::make_unique( + viz::CopyOutputRequest::ResultFormat::RGBA_BITMAP, + base::BindOnce( &AtomCopyFrameGenerator::CopyFromCompositingSurfaceHasResult, weak_ptr_factory_.GetWeakPtr(), damage_rect)); @@ -153,9 +154,9 @@ class AtomCopyFrameGenerator { return; } - DCHECK(result->HasBitmap()); - std::unique_ptr source = result->TakeBitmap(); - DCHECK(source); + DCHECK(!result->IsEmpty()); + auto source = std::make_unique(result->AsSkBitmap()); + DCHECK(source->readyToDraw()); if (source) { base::AutoLock autolock(lock_); std::shared_ptr bitmap(source.release());