diff options
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/aeropeek_manager.cc | 2 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_tabs_module.cc | 2 | ||||
-rw-r--r-- | chrome/browser/tab_contents/thumbnail_generator.cc | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/aeropeek_manager.cc b/chrome/browser/aeropeek_manager.cc index 77360cf..8c65ecb 100644 --- a/chrome/browser/aeropeek_manager.cc +++ b/chrome/browser/aeropeek_manager.cc @@ -998,7 +998,7 @@ bool AeroPeekManager::GetTabPreview(int tab_id, SkBitmap* preview) { // Create a copy of this BackingStore image. // This code is just copied from "thumbnail_generator.cc". skia::PlatformCanvas canvas; - if (!render_view_host->CopyFromBackingStore(&canvas)) + if (!render_view_host->CopyFromBackingStore(gfx::Size(), &canvas)) return false; const SkBitmap& bitmap = skia::GetTopDevice(canvas)->accessBitmap(false); diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc index dbf198b..67d5916 100644 --- a/chrome/browser/extensions/extension_tabs_module.cc +++ b/chrome/browser/extensions/extension_tabs_module.cc @@ -1653,7 +1653,7 @@ bool CaptureVisibleTabFunction::RunImpl() { // For example, some uncommon X11 visual modes are not supported by // CopyFromBackingStore(). skia::PlatformCanvas temp_canvas; - if (render_view_host->CopyFromBackingStore(&temp_canvas)) { + if (render_view_host->CopyFromBackingStore(gfx::Size(), &temp_canvas)) { VLOG(1) << "captureVisibleTab() got image from backing store."; SendResultFromBitmap(skia::GetTopDevice(temp_canvas)->accessBitmap(false)); return true; 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); |