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

Unified Diff: trunk/src/chrome/browser/sync/test/integration/bookmarks_helper.cc

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/chrome/browser/sync/test/integration/bookmarks_helper.cc
===================================================================
--- trunk/src/chrome/browser/sync/test/integration/bookmarks_helper.cc (revision 224497)
+++ trunk/src/chrome/browser/sync/test/integration/bookmarks_helper.cc (working copy)
@@ -292,9 +292,9 @@
// Compare only the 1x bitmaps as only those are synced.
SkBitmap bitmap_a = image_a.AsImageSkia().GetRepresentation(
- 1.0f).sk_bitmap();
+ ui::SCALE_FACTOR_100P).sk_bitmap();
SkBitmap bitmap_b = image_b.AsImageSkia().GetRepresentation(
- 1.0f).sk_bitmap();
+ ui::SCALE_FACTOR_100P).sk_bitmap();
return FaviconBitmapsMatch(bitmap_a, bitmap_b);
}
@@ -714,16 +714,14 @@
FaviconUtil::GetFaviconScaleFactors();
gfx::ImageSkia favicon;
for (size_t i = 0; i < favicon_scale_factors.size(); ++i) {
- float scale = ui::GetImageScale(favicon_scale_factors[i]);
+ float scale = ui::GetScaleFactorScale(favicon_scale_factors[i]);
int pixel_width = dip_width * scale;
int pixel_height = dip_height * scale;
SkBitmap bmp;
bmp.setConfig(SkBitmap::kARGB_8888_Config, pixel_width, pixel_height);
bmp.allocPixels();
bmp.eraseColor(color);
- favicon.AddRepresentation(
- gfx::ImageSkiaRep(bmp,
- ui::GetImageScale(favicon_scale_factors[i])));
+ favicon.AddRepresentation(gfx::ImageSkiaRep(bmp, favicon_scale_factors[i]));
}
return gfx::Image(favicon);
}

Powered by Google App Engine
This is Rietveld 408576698