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

Unified Diff: chrome/browser/ui/app_list/fast_show_pickler.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/ui/app_list/fast_show_pickler.cc
diff --git a/chrome/browser/ui/app_list/fast_show_pickler.cc b/chrome/browser/ui/app_list/fast_show_pickler.cc
index 2ef48efba14ab6ab390f1c8ef1cdb41f5c6a0541..d282aabfc2be6197f303ac7a5cff82afb47ee534 100644
--- a/chrome/browser/ui/app_list/fast_show_pickler.cc
+++ b/chrome/browser/ui/app_list/fast_show_pickler.cc
@@ -88,7 +88,7 @@ bool PickleImage(Pickle* pickle, const gfx::ImageSkia& image) {
pickle->WriteInt(static_cast<int>(reps.size()));
for (std::vector<gfx::ImageSkiaRep>::const_iterator it = reps.begin();
it != reps.end(); ++it) {
- pickle->WriteInt(static_cast<int>(it->scale_factor()));
+ pickle->WriteInt(static_cast<int>(ui::GetSupportedScaleFactor(it->scale())));
pickle->WriteInt(it->pixel_width());
pickle->WriteInt(it->pixel_height());
ImageFormat format = NONE;
@@ -147,8 +147,8 @@ bool UnpickleImage(PickleIterator* it, gfx::ImageSkia* out) {
SkAutoLockPixels lock(bitmap);
memcpy(bitmap.getPixels(), pixels, bitmap.getSize());
}
- result.AddRepresentation(
- gfx::ImageSkiaRep(bitmap, static_cast<ui::ScaleFactor>(scale_factor)));
+ float scale = ui::GetImageScale(static_cast<ui::ScaleFactor>(scale_factor));
+ result.AddRepresentation(gfx::ImageSkiaRep(bitmap, scale));
}
*out = result;

Powered by Google App Engine
This is Rietveld 408576698