summaryrefslogtreecommitdiffstats
path: root/content/public/browser
diff options
context:
space:
mode:
authormazda@chromium.org <mazda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-20 05:58:35 +0000
committermazda@chromium.org <mazda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-20 05:58:35 +0000
commit3a2df50b66ced0548aa2b86ab0e88424b18f3808 (patch)
tree2274c799eadb04d1445c95a8480f9ed42231f2f2 /content/public/browser
parented7cde2b856aa5000ce4fb737c3a59cdc964addb (diff)
downloadchromium_src-3a2df50b66ced0548aa2b86ab0e88424b18f3808.zip
chromium_src-3a2df50b66ced0548aa2b86ab0e88424b18f3808.tar.gz
chromium_src-3a2df50b66ced0548aa2b86ab0e88424b18f3808.tar.bz2
Copy a shrinked image from the backing store or compositing surface for generating thumbnail.
Also changed the resize method to Lanczos3 for better quality. This will make RenderWidgetHost::CopyFromBackingStore about 6 times faster on Lumpy while retaining the quality of thumbnail. BUG=96351,118571 TEST=Manually checked the thumbnail generated properly with --enable-in-browser-thumbnailing. Review URL: http://codereview.chromium.org/9703113 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127650 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/public/browser')
-rw-r--r--content/public/browser/render_widget_host.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/content/public/browser/render_widget_host.h b/content/public/browser/render_widget_host.h
index 4c0f983..7d341ad 100644
--- a/content/public/browser/render_widget_host.h
+++ b/content/public/browser/render_widget_host.h
@@ -170,14 +170,20 @@ class CONTENT_EXPORT RenderWidgetHost : public IPC::Channel::Sender {
virtual void Blur() = 0;
- // Copies the contents of the backing store into the given (uninitialized)
- // PlatformCanvas. Returns true on success, false otherwise. When accelerated
- // compositing is active, the contents is copied from the compositing surface.
- // If non empty |dest_size| is given, the content is shrinked so that it fits
- // in |dest_size|. If |dest_size| is larger than the contens size, the
- // content is not resized. If |dest_size| is empty, the original size of the
- // contents is copied.
- virtual bool CopyFromBackingStore(const gfx::Size& dest_size,
+ // Copies the given subset of the backing store into the given (uninitialized)
+ // PlatformCanvas. If |src_rect| is empty, the whole contents is copied.
+ // Returns true on success, false otherwise. When accelerated compositing is
+ // active, the contents is copied from the compositing surface.
+ // If non empty |accelerated_dest_size| is given and accelerated compositing
+ // is active, the content is shrinked so that it fits in
+ // |accelerated_dest_size|. If |accelerated_dest_size| is larger than the
+ // contens size, the content is not resized. If |accelerated_dest_size| is
+ // empty, the size copied from the source contents is used.
+ // NOTE: |src_rect| is not supported yet when accelerated compositing is
+ // active (http://crbug.com/118571) and the whole content is always copied
+ // regardless of |src_rect|.
+ virtual bool CopyFromBackingStore(const gfx::Rect& src_rect,
+ const gfx::Size& accelerated_dest_size,
skia::PlatformCanvas* output) = 0;
#if defined(TOOLKIT_GTK)