Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(978)

Unified Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 2189493002: Android: Fix some tab placeholder/thumbnail readbacks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698