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

Unified Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 10917307: Implement asynchronous operation for RWHVP::CopyFromCompositingSurface on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed comments Created 8 years, 3 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 | « content/browser/renderer_host/compositing_iosurface_mac.mm ('k') | 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_mac.mm
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 4ad0b373f2ff479a15b01d804249fc31508c501a..d4b794e92045b7a4032272e5c43f3da0d7939dea 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -843,6 +843,7 @@ void RenderWidgetHostViewMac::CopyFromCompositingSurface(
if (!output->initialize(
dst_pixel_size.width(), dst_pixel_size.height(), true))
return;
+ scoped_callback_runner.Release();
// Convert |src_subrect| from the views coordinate (upper-left origin) into
// the OpenGL coordinate (lower-left origin).
@@ -850,12 +851,11 @@ void RenderWidgetHostViewMac::CopyFromCompositingSurface(
src_gl_subrect.set_y(GetViewBounds().height() - src_subrect.bottom());
gfx::Rect src_pixel_gl_subrect = src_gl_subrect.Scale(scale);
- const bool result = compositing_iosurface_->CopyTo(
+ compositing_iosurface_->CopyTo(
src_pixel_gl_subrect,
dst_pixel_size,
- output->getTopDevice()->accessBitmap(true).getPixels());
- scoped_callback_runner.Release();
- callback.Run(result);
+ output->getTopDevice()->accessBitmap(true).getPixels(),
+ callback);
}
// Sets whether or not to accept first responder status.
« no previous file with comments | « content/browser/renderer_host/compositing_iosurface_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698