Index: content/browser/renderer_host/render_widget_host_view_aura.cc |
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc |
index 8fbaad82ee016e1739ea068b586ac9b7a0ab1629..463492a2c9dcbfcf784a89be5a54fe8d338a5185 100644 |
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc |
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc |
@@ -1719,10 +1719,12 @@ void RenderWidgetHostViewAura::CopyFromCompositingSurfaceHasResult( |
static void CopyFromCompositingSurfaceFinished( |
const base::Callback<void(bool, const SkBitmap&)>& callback, |
+ const cc::TextureMailbox::ReleaseCallback& release_callback, |
scoped_ptr<SkBitmap> bitmap, |
scoped_ptr<SkAutoLockPixels> bitmap_pixels_lock, |
bool result) { |
bitmap_pixels_lock.reset(); |
+ release_callback.Run(0, false); |
callback.Run(result, *bitmap); |
} |
@@ -1770,6 +1772,7 @@ void RenderWidgetHostViewAura::PrepareTextureCopyOutputResult( |
pixels, |
base::Bind(&CopyFromCompositingSurfaceFinished, |
callback, |
+ texture_mailbox->callback(), |
base::Passed(&bitmap), |
base::Passed(&bitmap_pixels_lock))); |
} |
@@ -1801,6 +1804,14 @@ void RenderWidgetHostViewAura::PrepareBitmapCopyOutputResult( |
callback.Run(true, bitmap); |
} |
+static void CopyFromCompositingSurfaceFinishedForVideo( |
+ const base::Callback<void(bool)>& callback, |
+ const cc::TextureMailbox::ReleaseCallback& release_callback, |
+ bool result) { |
+ release_callback.Run(0, false); |
+ callback.Run(result); |
+} |
+ |
// static |
void RenderWidgetHostViewAura::CopyFromCompositingSurfaceHasResultForVideo( |
base::WeakPtr<RenderWidgetHostViewAura> rwhva, |
@@ -1884,11 +1895,15 @@ void RenderWidgetHostViewAura::CopyFromCompositingSurfaceHasResultForVideo( |
} |
scoped_callback_runner.Release(); |
+ base::Callback<void(bool result)> finished_callback = base::Bind( |
+ &CopyFromCompositingSurfaceFinishedForVideo, |
+ callback, |
+ texture_mailbox->callback()); |
yuv_readback_pipeline->ReadbackYUV( |
texture_mailbox->name(), |
texture_mailbox->sync_point(), |
video_frame.get(), |
- callback); |
+ finished_callback); |
} |
void RenderWidgetHostViewAura::GetScreenInfo(WebScreenInfo* results) { |