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

Unified Diff: ash/shell/window_watcher.cc

Issue 10699065: chromeos: Fix pixelated icons in app list and launcher (part 1) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 5 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
« no previous file with comments | « ash/launcher/launcher_types.h ('k') | ash/test/test_launcher_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell/window_watcher.cc
diff --git a/ash/shell/window_watcher.cc b/ash/shell/window_watcher.cc
index a3d99f1fdb72de5e9578b63c9193748dde563021..dfd54ffdaf6a2e9b10323f23ab1f9d14375d27a5 100644
--- a/ash/shell/window_watcher.cc
+++ b/ash/shell/window_watcher.cc
@@ -52,13 +52,18 @@ void WindowWatcher::OnWindowAdded(aura::Window* new_window) {
ash::LauncherItem item;
item.type = ash::TYPE_TABBED;
id_to_window_[model->next_id()] = new_window;
- item.image.setConfig(SkBitmap::kARGB_8888_Config, 16, 16);
- item.image.allocPixels();
- item.image.eraseARGB(255,
- image_count == 0 ? 255 : 0,
- image_count == 1 ? 255 : 0,
- image_count == 2 ? 255 : 0);
+
+ SkBitmap icon_bitmap;
+ icon_bitmap.setConfig(SkBitmap::kARGB_8888_Config, 16, 16);
+ icon_bitmap.allocPixels();
+ icon_bitmap.eraseARGB(255,
+ image_count == 0 ? 255 : 0,
+ image_count == 1 ? 255 : 0,
+ image_count == 2 ? 255 : 0);
image_count = (image_count + 1) % 3;
+ item.image = gfx::ImageSkia(gfx::ImageSkiaRep(icon_bitmap,
+ ui::SCALE_FACTOR_NONE));
+
model->Add(item);
}
« no previous file with comments | « ash/launcher/launcher_types.h ('k') | ash/test/test_launcher_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698