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

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

Issue 24175004: Remove dependency on ui::ScaleFactor from ui/gfx (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix new usage of scale in FastShowPickler 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: chrome/browser/sync/test/integration/bookmarks_helper.cc
diff --git a/chrome/browser/sync/test/integration/bookmarks_helper.cc b/chrome/browser/sync/test/integration/bookmarks_helper.cc
index a59c28c55cd15689f4b926c654ea95762f7fd77e..63407887365d43d9837819d6aa8e2be5fb1a078f 100644
--- a/chrome/browser/sync/test/integration/bookmarks_helper.cc
+++ b/chrome/browser/sync/test/integration/bookmarks_helper.cc
@@ -292,9 +292,9 @@ bool FaviconsMatch(BookmarkModel* model_a,
// Compare only the 1x bitmaps as only those are synced.
SkBitmap bitmap_a = image_a.AsImageSkia().GetRepresentation(
- ui::SCALE_FACTOR_100P).sk_bitmap();
+ 1.0f).sk_bitmap();
SkBitmap bitmap_b = image_b.AsImageSkia().GetRepresentation(
- ui::SCALE_FACTOR_100P).sk_bitmap();
+ 1.0f).sk_bitmap();
return FaviconBitmapsMatch(bitmap_a, bitmap_b);
}
@@ -714,14 +714,16 @@ gfx::Image CreateFavicon(SkColor color) {
FaviconUtil::GetFaviconScaleFactors();
gfx::ImageSkia favicon;
for (size_t i = 0; i < favicon_scale_factors.size(); ++i) {
- float scale = ui::GetScaleFactorScale(favicon_scale_factors[i]);
+ float scale = ui::GetImageScale(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, favicon_scale_factors[i]));
+ favicon.AddRepresentation(
+ gfx::ImageSkiaRep(bmp,
+ ui::GetImageScale(favicon_scale_factors[i])));
}
return gfx::Image(favicon);
}

Powered by Google App Engine
This is Rietveld 408576698