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

Unified Diff: trunk/src/ui/base/resource/resource_bundle_ios.mm

Issue 24262008: Revert 224473 "Remove dependency on ui::ScaleFactor from ui/gfx" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 3 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: trunk/src/ui/base/resource/resource_bundle_ios.mm
===================================================================
--- trunk/src/ui/base/resource/resource_bundle_ios.mm (revision 224498)
+++ trunk/src/ui/base/resource/resource_bundle_ios.mm (working copy)
@@ -109,7 +109,7 @@
// Load the raw data from the resource pack at the current supported scale
// factor. This code assumes that only one of the possible scale factors is
// supported at runtime, based on the device resolution.
- ui::ScaleFactor scale_factor = GetMaxScaleFactor();
+ ui::ScaleFactor scale_factor = ui::GetMaxScaleFactor();
scoped_refptr<base::RefCountedStaticMemory> data(
LoadDataResourceBytesForScale(resource_id, scale_factor));
@@ -125,7 +125,7 @@
bool is_fallback = PNGContainsFallbackMarker(data->front(), data->size());
// Create the image from the data.
- CGFloat target_scale = ui::GetImageScale(scale_factor);
+ CGFloat target_scale = ui::GetScaleFactorScale(scale_factor);
CGFloat source_scale = is_fallback ? 1.0 : target_scale;
base::scoped_nsobject<UIImage> ui_image(
[[UIImage alloc] initWithData:ns_data scale:source_scale]);
« no previous file with comments | « trunk/src/ui/base/resource/resource_bundle.cc ('k') | trunk/src/ui/base/resource/resource_bundle_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698