diff options
author | mazda@chromium.org <mazda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-26 05:44:05 +0000 |
---|---|---|
committer | mazda@chromium.org <mazda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-26 05:44:05 +0000 |
commit | a83914abee670b46f24574f00c365054773e9d93 (patch) | |
tree | ab039446db828df1d33bfda0b9ad646a8a211be1 /content/browser/renderer_host/render_widget_host_view_gtk.cc | |
parent | e9478a9964f53967686f252942fb3eb881f273fa (diff) | |
download | chromium_src-a83914abee670b46f24574f00c365054773e9d93.zip chromium_src-a83914abee670b46f24574f00c365054773e9d93.tar.gz chromium_src-a83914abee670b46f24574f00c365054773e9d93.tar.bz2 |
Support copying a partial rectangle region from the compositing surface on Aura and GTK.
BUG=118571
TEST=Manual
Review URL: https://chromiumcodereview.appspot.com/10815070
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148520 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/renderer_host/render_widget_host_view_gtk.cc')
-rw-r--r-- | content/browser/renderer_host/render_widget_host_view_gtk.cc | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/content/browser/renderer_host/render_widget_host_view_gtk.cc b/content/browser/renderer_host/render_widget_host_view_gtk.cc index d1db525..ec74be1 100644 --- a/content/browser/renderer_host/render_widget_host_view_gtk.cc +++ b/content/browser/renderer_host/render_widget_host_view_gtk.cc @@ -1030,23 +1030,26 @@ BackingStore* RenderWidgetHostViewGtk::AllocBackingStore( depth); } -// NOTE: |output| is initialized with the size of the view and |size| is -// ignored on GTK. +// NOTE: |output| is initialized with the size of |src_subrect|, and |dst_size| +// is ignored on GTK. void RenderWidgetHostViewGtk::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)); const gfx::Rect bounds = GetViewBounds(); XImage* image = XGetImage(ui::GetXDisplay(), ui::GetX11RootWindow(), - bounds.x(), bounds.y(), - bounds.width(), bounds.height(), + bounds.x() + src_subrect.x(), + bounds.y() + src_subrect.y(), + src_subrect.width(), + src_subrect.height(), AllPlanes, ZPixmap); if (!image) return; - if (!output->initialize(bounds.width(), bounds.height(), true)) { + if (!output->initialize(src_subrect.width(), src_subrect.height(), true)) { XFree(image); return; } |