| Index: content/browser/renderer_host/render_widget_host_view_android.cc
|
| diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
|
| index 52455090ad407c719873d138796bf59dda34136e..5dd0464a194ca0f42d601b0445c8b334137881a4 100644
|
| --- a/content/browser/renderer_host/render_widget_host_view_android.cc
|
| +++ b/content/browser/renderer_host/render_widget_host_view_android.cc
|
| @@ -501,7 +501,8 @@ bool RenderWidgetHostViewAndroid::HasFocus() const {
|
| }
|
|
|
| bool RenderWidgetHostViewAndroid::IsSurfaceAvailableForCopy() const {
|
| - return !using_browser_compositor_ || HasValidFrame();
|
| + return !using_browser_compositor_ ||
|
| + (HasValidFrame() && surface_factory_.get());
|
| }
|
|
|
| void RenderWidgetHostViewAndroid::Show() {
|
| @@ -891,9 +892,10 @@ void RenderWidgetHostViewAndroid::CopyFromCompositingSurface(
|
| dst_size_in_pixel, preferred_color_type, start_time, callback));
|
| if (!src_subrect_in_pixel.IsEmpty())
|
| request->set_area(src_subrect_in_pixel);
|
| - // Make sure the layer doesn't get deleted until we fulfill the request.
|
| + // Make sure the current frame doesn't get deleted until we fulfill the
|
| + // request.
|
| LockCompositingSurface();
|
| - view_.GetLayer()->RequestCopyOfOutput(std::move(request));
|
| + surface_factory_->RequestCopyOfSurface(surface_id_, std::move(request));
|
| }
|
|
|
| void RenderWidgetHostViewAndroid::CopyFromCompositingSurfaceToVideoFrame(
|
|
|