| Index: chrome/browser/profiles/profile_shortcut_manager_win.cc
|
| diff --git a/chrome/browser/profiles/profile_shortcut_manager_win.cc b/chrome/browser/profiles/profile_shortcut_manager_win.cc
|
| index d7f1bebd2a6377551e4a422cbe0729a2dc8ef2be..721a73482d5201575e6122b1d1ca6fb182d78d3d 100644
|
| --- a/chrome/browser/profiles/profile_shortcut_manager_win.cc
|
| +++ b/chrome/browser/profiles/profile_shortcut_manager_win.cc
|
| @@ -103,6 +103,7 @@ const int kProfileAvatarIconResources2x[] = {
|
| IDR_PROFILE_AVATAR_2X_23,
|
| IDR_PROFILE_AVATAR_2X_24,
|
| IDR_PROFILE_AVATAR_2X_25,
|
| + IDR_PROFILE_AVATAR_2X_26,
|
| };
|
|
|
| // Badges |app_icon_bitmap| with |avatar_bitmap| at the bottom right corner and
|
| @@ -110,28 +111,18 @@ const int kProfileAvatarIconResources2x[] = {
|
| SkBitmap BadgeIcon(const SkBitmap& app_icon_bitmap,
|
| const SkBitmap& avatar_bitmap,
|
| int scale_factor) {
|
| - // TODO(rlp): Share this chunk of code with
|
| - // avatar_menu_button::DrawTaskBarDecoration.
|
| - SkBitmap source_bitmap = avatar_bitmap;
|
| - if ((avatar_bitmap.width() == scale_factor * profiles::kAvatarIconWidth) &&
|
| - (avatar_bitmap.height() == scale_factor * profiles::kAvatarIconHeight)) {
|
| - // Shave a couple of columns so the bitmap is more square. So when
|
| - // resized to a square aspect ratio it looks pretty.
|
| - gfx::Rect frame(scale_factor * profiles::kAvatarIconWidth,
|
| - scale_factor * profiles::kAvatarIconHeight);
|
| - frame.Inset(scale_factor * 2, 0, scale_factor * 2, 0);
|
| - avatar_bitmap.extractSubset(&source_bitmap, gfx::RectToSkIRect(frame));
|
| - } else {
|
| - NOTREACHED();
|
| - }
|
| + // All icons, whether cartoon, GAIA or placeholder, should be square.
|
| + // TODO(mlerman) - uncomment the ASSERT once noms@ lands the square images.
|
| + // DCHECK(avatar_bitmap.width() == avatar_bitmap.height());
|
| +
|
| int avatar_badge_size = kProfileAvatarBadgeSize;
|
| if (app_icon_bitmap.width() != kShortcutIconSize) {
|
| avatar_badge_size =
|
| app_icon_bitmap.width() * kProfileAvatarBadgeSize / kShortcutIconSize;
|
| }
|
| SkBitmap sk_icon = skia::ImageOperations::Resize(
|
| - source_bitmap, skia::ImageOperations::RESIZE_LANCZOS3, avatar_badge_size,
|
| - source_bitmap.height() * avatar_badge_size / source_bitmap.width());
|
| + avatar_bitmap, skia::ImageOperations::RESIZE_LANCZOS3, avatar_badge_size,
|
| + avatar_bitmap.height() * avatar_badge_size / avatar_bitmap.width());
|
|
|
| // Overlay the avatar on the icon, anchoring it to the bottom-right of the
|
| // icon.
|
|
|