Index: ui/gfx/image/image_skia_util_mac.mm |
diff --git a/ui/gfx/image/image_skia_util_mac.mm b/ui/gfx/image/image_skia_util_mac.mm |
index f9d0475af7fc1f77c67a63e58a3b0f190177b45f..64f95d65bfdfb8894399a8fd55e8062409e412ee 100644 |
--- a/ui/gfx/image/image_skia_util_mac.mm |
+++ b/ui/gfx/image/image_skia_util_mac.mm |
@@ -57,12 +57,11 @@ gfx::ImageSkia ImageSkiaFromResizedNSImage(NSImage* image, |
if (IsNSImageEmpty(image)) |
return gfx::ImageSkia(); |
- std::vector<ui::ScaleFactor> supported_scale_factors = |
- ui::GetSupportedScaleFactors(); |
+ std::vector<float> supported_scales = ImageSkia::GetSupportedScales(); |
gfx::ImageSkia image_skia; |
- for (size_t i = 0; i < supported_scale_factors.size(); ++i) { |
- float scale = ui::GetScaleFactorScale(supported_scale_factors[i]); |
+ for (size_t i = 0; i < supported_scales.size(); ++i) { |
+ float scale = supported_scales[i]; |
NSSize desired_size_for_scale = NSMakeSize(desired_size.width * scale, |
desired_size.height * scale); |
NSImageRep* ns_image_rep = GetNSImageRepWithPixelSize(image, |
@@ -73,8 +72,7 @@ gfx::ImageSkia ImageSkiaFromResizedNSImage(NSImage* image, |
if (bitmap.isNull()) |
continue; |
- image_skia.AddRepresentation(gfx::ImageSkiaRep(bitmap, |
- supported_scale_factors[i])); |
+ image_skia.AddRepresentation(gfx::ImageSkiaRep(bitmap, scale)); |
} |
return image_skia; |
} |
@@ -90,7 +88,7 @@ NSImage* NSImageFromImageSkia(const gfx::ImageSkia& image_skia) { |
return nil; |
base::scoped_nsobject<NSImage> image([[NSImage alloc] init]); |
- image_skia.EnsureRepsForSupportedScaleFactors(); |
+ image_skia.EnsureRepsForSupportedScales(); |
std::vector<gfx::ImageSkiaRep> image_reps = image_skia.image_reps(); |
for (std::vector<gfx::ImageSkiaRep>::const_iterator it = image_reps.begin(); |
it != image_reps.end(); ++it) { |
@@ -108,7 +106,7 @@ NSImage* NSImageFromImageSkiaWithColorSpace(const gfx::ImageSkia& image_skia, |
return nil; |
base::scoped_nsobject<NSImage> image([[NSImage alloc] init]); |
- image_skia.EnsureRepsForSupportedScaleFactors(); |
+ image_skia.EnsureRepsForSupportedScales(); |
std::vector<gfx::ImageSkiaRep> image_reps = image_skia.image_reps(); |
for (std::vector<gfx::ImageSkiaRep>::const_iterator it = image_reps.begin(); |
it != image_reps.end(); ++it) { |