Searched defs:desired_aspect (Results 1 - 4 of 4) sorted by relevance

/external/chromium_org/chrome/browser/thumbnails/
H A Dsimple_thumbnail_crop_unittest.cc148 float desired_aspect = local
165 EXPECT_NEAR(desired_aspect, clip_aspect, 0.01);
177 EXPECT_NEAR(desired_aspect, clip_aspect, 0.01);
189 EXPECT_NEAR(desired_aspect, clip_aspect, 0.01);
H A Dsimple_thumbnail_crop.cc144 float desired_aspect = local
160 if (src_aspect > desired_aspect) {
163 int new_width = static_cast<int>(source_size.height() * desired_aspect);
169 } else if (src_aspect < desired_aspect) {
171 gfx::Rect(source_size.width(), source_size.width() / desired_aspect);
H A Dcontent_analysis.cc485 float desired_aspect = local
490 float aspect_change_delta = std::abs(computed_aspect - desired_aspect);
496 (computed_aspect / desired_aspect > kAspectRatioToleranceFactor ||
497 desired_aspect / computed_aspect > kAspectRatioToleranceFactor)) {
505 if (computed_aspect / desired_aspect > kAspectRatioToleranceFactor) {
514 static_cast<int>(computed_width / desired_aspect + 0.5f));
525 static_cast<int>(computed_width / desired_aspect + 0.5f));
530 new_computed_width = desired_aspect * computed_height + 0.5f;
539 static_cast<int>(desired_aspect * computed_height + 0.5f));
548 static_cast<int>(desired_aspect * computed_heigh
[all...]
/external/chromium_org/ui/gfx/image/
H A Dimage_family.cc49 float desired_aspect; local
51 desired_aspect = 1.0f;
55 desired_aspect = static_cast<float>(width) / height;
57 DCHECK_GT(desired_aspect, 0.0f);
59 float closest_aspect = GetClosestAspect(desired_aspect);
63 int desired_width = closest_aspect <= desired_aspect ?
70 float ImageFamily::GetClosestAspect(float desired_aspect) const {
71 // Find the two aspect ratios on either side of |desired_aspect|.
73 map_.lower_bound(MapKey(desired_aspect, 0));
76 greater_or_equal->first.aspect() == desired_aspect) {
[all...]

Completed in 333 milliseconds