diff options
Diffstat (limited to 'chrome/browser/views/tabs/tab_overview_cell.cc')
-rw-r--r-- | chrome/browser/views/tabs/tab_overview_cell.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/views/tabs/tab_overview_cell.cc b/chrome/browser/views/tabs/tab_overview_cell.cc index c05aae3..b0b5f9f 100644 --- a/chrome/browser/views/tabs/tab_overview_cell.cc +++ b/chrome/browser/views/tabs/tab_overview_cell.cc @@ -6,6 +6,7 @@ #include "app/gfx/favicon_size.h" #include "base/string_util.h" +#include "skia/ext/image_operations.h" #include "views/border.h" #include "views/controls/image_view.h" #include "views/controls/label.h" @@ -64,7 +65,10 @@ TabOverviewCell::TabOverviewCell() { } void TabOverviewCell::SetThumbnail(const SkBitmap& thumbnail) { - thumbnail_view_->SetImage(thumbnail); + // Do mipmapped-based resampling to get closer to the correct size. The + // input bitmap isn't guaranteed to have any specific resolution. + thumbnail_view_->SetImage(skia::ImageOperations::DownsampleByTwoUntilSize( + thumbnail, kThumbnailWidth, kThumbnailHeight)); } void TabOverviewCell::SetTitle(const string16& title) { |