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

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

Issue 1797663002: Fixes failing instrumentation tests on Nakasi (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
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 a7586d02309356c1eaf2ff01b681258a8eccc742..d31c9df73e95d5733b33c6612b6e9af201e8fb9e 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -903,11 +903,12 @@ void RenderWidgetHostViewAndroid::CopyFromCompositingSurface(
content_view_core_->GetWindowAndroid()->GetCompositor();
DCHECK(compositor);
DCHECK(!surface_id_.is_null());
+ compositor->AttachLayerForReadback(layer_);
no sievers 2016/03/16 00:16:12 Hmm that looks dangerous to attach the layer (pote
Jinsuk Kim 2016/03/16 06:03:12 Changed to the comment in the bug.
scoped_ptr<cc::CopyOutputRequest> request =
cc::CopyOutputRequest::CreateRequest(
base::Bind(&PrepareTextureCopyOutputResult,
dst_size_in_pixel, preferred_color_type, start_time,
- callback));
+ layer_, callback));
if (!src_subrect_in_pixel.IsEmpty())
request->set_area(src_subrect_in_pixel);
layer_->RequestCopyOfOutput(std::move(request));
@@ -1927,6 +1928,7 @@ void RenderWidgetHostViewAndroid::PrepareTextureCopyOutputResult(
const gfx::Size& dst_size_in_pixel,
SkColorType color_type,
const base::TimeTicks& start_time,
+ scoped_refptr<cc::Layer> layer,
const ReadbackRequestCallback& callback,
scoped_ptr<cc::CopyOutputResult> result) {
base::ScopedClosureRunner scoped_callback_runner(
@@ -1934,6 +1936,7 @@ void RenderWidgetHostViewAndroid::PrepareTextureCopyOutputResult(
TRACE_EVENT0("cc",
"RenderWidgetHostViewAndroid::PrepareTextureCopyOutputResult");
+ layer->RemoveFromParent();
if (!result->HasTexture() || result->IsEmpty() || result->size().IsEmpty())
return;
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_android.h ('k') | ui/android/window_android_compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698