Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(668)

Unified Diff: chrome/browser/thumbnails/content_based_thumbnailing_algorithm.cc

Issue 1028393003: [Thumbnails] Specify copy size in Pixels, not DIPs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: correct rebase Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/thumbnails/content_based_thumbnailing_algorithm.cc
diff --git a/chrome/browser/thumbnails/content_based_thumbnailing_algorithm.cc b/chrome/browser/thumbnails/content_based_thumbnailing_algorithm.cc
index 6bb8883d3d4de0872c6a55151d56c101f8c983fd..9d6222fa9e9e122d5c4de6d9e697f32989a505a4 100644
--- a/chrome/browser/thumbnails/content_based_thumbnailing_algorithm.cc
+++ b/chrome/browser/thumbnails/content_based_thumbnailing_algorithm.cc
@@ -45,14 +45,14 @@ ClipResult ContentBasedThumbnailingAlgorithm::GetCanvasCopyInfo(
const gfx::Size& source_size,
ui::ScaleFactor scale_factor,
gfx::Rect* clipping_rect,
- gfx::Size* target_size) const {
+ gfx::Size* copy_size) const {
DCHECK(!source_size.IsEmpty());
- gfx::Size target_thumbnail_size =
+ gfx::Size copy_thumbnail_size =
SimpleThumbnailCrop::GetCopySizeForThumbnail(scale_factor, target_size_);
ClipResult clipping_method = thumbnails::CLIP_RESULT_NOT_CLIPPED;
- *clipping_rect = GetClippingRect(
- source_size, target_thumbnail_size, target_size, &clipping_method);
+ *clipping_rect = GetClippingRect(source_size, copy_thumbnail_size, copy_size,
+ &clipping_method);
return clipping_method;
}
« no previous file with comments | « chrome/browser/thumbnails/content_based_thumbnailing_algorithm.h ('k') | chrome/browser/thumbnails/simple_thumbnail_crop.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698