Fix API changes in OSR code

This commit is contained in:
Cheng Zhao 2017-04-05 17:31:22 +09:00
parent fc2d62d5cb
commit 9d1b88ed59
6 changed files with 132 additions and 69 deletions

View file

@ -32,8 +32,7 @@ bool FrameSubscriber::ShouldCaptureFrame(
base::TimeTicks present_time,
scoped_refptr<media::VideoFrame>* storage,
DeliverFrameCallback* callback) {
const auto host = view_ ? view_->GetRenderWidgetHost() : nullptr;
if (!view_ || !host)
if (!view_)
return false;
if (dirty_rect.IsEmpty())
@ -54,7 +53,7 @@ bool FrameSubscriber::ShouldCaptureFrame(
rect = gfx::Rect(rect.origin(), bitmap_size);
host->CopyFromBackingStore(
view_->CopyFromSurface(
rect,
rect.size(),
base::Bind(&FrameSubscriber::OnFrameDelivered,