summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
authormazda@chromium.org <mazda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-15 09:29:36 +0000
committermazda@chromium.org <mazda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-15 09:29:36 +0000
commitca2fd075cf4eaeb2ee650affff606bbb3120772c (patch)
tree4cb40434aa433d9e30bba39e103b4ec8b59c4f59 /chrome/browser/tab_contents
parent0c652b8e854aad1f44751449e7029f432f4502fe (diff)
downloadchromium_src-ca2fd075cf4eaeb2ee650affff606bbb3120772c.zip
chromium_src-ca2fd075cf4eaeb2ee650affff606bbb3120772c.tar.gz
chromium_src-ca2fd075cf4eaeb2ee650affff606bbb3120772c.tar.bz2
Support browser side thumbnailing for GPU-composited pages on Windows.
Benchmark results of copying a 1280 x 800 pixels using CopyFromCompositingSurface or CopyFromBackingSurface are as follows. FromCompositingSurface: 40.00 ms FromBackingStore: 2.12 ms I'm prepareing the following CLs and these will come soon, - Support Mac and Chrome OS (Aura) - Reduce the number of pixels to copy from the compositing surface for performance improvement BUG=96351 TEST=Manual Review URL: http://codereview.chromium.org/9582003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126870 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r--chrome/browser/tab_contents/thumbnail_generator.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/browser/tab_contents/thumbnail_generator.cc b/chrome/browser/tab_contents/thumbnail_generator.cc
index 79d8f10..398c2af 100644
--- a/chrome/browser/tab_contents/thumbnail_generator.cc
+++ b/chrome/browser/tab_contents/thumbnail_generator.cc
@@ -77,8 +77,9 @@ SkBitmap GetBitmapForRenderWidgetHost(
// Get the bitmap as a Skia object so we can resample it. This is a large
// allocation and we can tolerate failure here, so give up if the allocation
// fails.
+ // TODO(mazda): Copy a shrinked size of image instead of the whole view size.
skia::PlatformCanvas temp_canvas;
- if (!render_widget_host->CopyFromBackingStore(&temp_canvas))
+ if (!render_widget_host->CopyFromBackingStore(gfx::Size(), &temp_canvas))
return result;
const SkBitmap& bmp_with_scrollbars =
skia::GetTopDevice(temp_canvas)->accessBitmap(false);