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

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

Issue 10815070: Support copying a partial rectangle region from the compositing surface on Aura and GTK. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
Index: content/browser/renderer_host/render_widget_host_view_win.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_win.cc b/content/browser/renderer_host/render_widget_host_view_win.cc
index 9149c239a8dc25a2187b72008953838d81bb8470..3bdcf057ea05111d50ef9dd4ebeeae8940a3a43e 100644
--- a/content/browser/renderer_host/render_widget_host_view_win.cc
+++ b/content/browser/renderer_host/render_widget_host_view_win.cc
@@ -1196,22 +1196,25 @@ BackingStore* RenderWidgetHostViewWin::AllocBackingStore(
return new BackingStoreWin(render_widget_host_, size);
}
+// TODO(mazda): Support copying a partial rectangle from the compositing surface
+// with |src_subrect| (http://crbug.com/118571).
void RenderWidgetHostViewWin::CopyFromCompositingSurface(
- const gfx::Size& size,
+ const gfx::Rect& /* src_subrect */,
+ const gfx::Size& dst_size,
const base::Callback<void(bool)>& callback,
skia::PlatformCanvas* output) {
base::ScopedClosureRunner scoped_callback_runner(base::Bind(callback, false));
if (!accelerated_surface_.get())
return;
- if (size.IsEmpty())
+ if (dst_size.IsEmpty())
return;
- if (!output->initialize(size.width(), size.height(), true))
+ if (!output->initialize(dst_size.width(), dst_size.height(), true))
return;
const bool result = accelerated_surface_->CopyTo(
- size, output->getTopDevice()->accessBitmap(true).getPixels());
+ dst_size, output->getTopDevice()->accessBitmap(true).getPixels());
scoped_callback_runner.Release();
callback.Run(result);
}

Powered by Google App Engine
This is Rietveld 408576698