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

Unified Diff: ui/gfx/image/image_ios.mm

Issue 11293147: Always add 100P scale format in the supported format list. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Adding TODO. Created 8 years, 1 month 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
« no previous file with comments | « ui/base/resource/resource_bundle_ios.mm ('k') | ui/gfx/image/image_skia_util_ios.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/image/image_ios.mm
diff --git a/ui/gfx/image/image_ios.mm b/ui/gfx/image/image_ios.mm
index cdc921dddc2df462d296f452faf7059e984ad90d..f844d8811cbb1366377ba300ec1081af838f7696 100644
--- a/ui/gfx/image/image_ios.mm
+++ b/ui/gfx/image/image_ios.mm
@@ -26,14 +26,7 @@ void PNGFromUIImage(UIImage* uiimage, std::vector<unsigned char>* png) {
}
UIImage* CreateUIImageFromPNG(const std::vector<unsigned char>& png) {
- // iOS only supports one scale factor.
- std::vector<ui::ScaleFactor> supported_scale_factors =
- ui::GetSupportedScaleFactors();
- DCHECK_EQ(1U, supported_scale_factors.size());
- if (supported_scale_factors.size() < 1)
- return nil;
-
- ui::ScaleFactor scale_factor = supported_scale_factors[0];
+ ui::ScaleFactor scale_factor = ui::GetMaxScaleFactor();
float scale = ui::GetScaleFactorScale(scale_factor);
NSData* data = [NSData dataWithBytes:&png.front() length:png.size()];
« no previous file with comments | « ui/base/resource/resource_bundle_ios.mm ('k') | ui/gfx/image/image_skia_util_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698