diff options
author | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-03 15:50:07 +0000 |
---|---|---|
committer | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-03 15:50:07 +0000 |
commit | 66171abedad9f817901db48328fdc417ecf56c7a (patch) | |
tree | 59ebd2a67731072f9326f08fa3fcce32cc1c5866 /chrome/browser/icon_loader_win.cc | |
parent | 7aebaf878d8ec781f8fcc5f2932d67a9f6afb966 (diff) | |
download | chromium_src-66171abedad9f817901db48328fdc417ecf56c7a.zip chromium_src-66171abedad9f817901db48328fdc417ecf56c7a.tar.gz chromium_src-66171abedad9f817901db48328fdc417ecf56c7a.tar.bz2 |
Convert IconLoader and IconManager to deal with gfx::Image rather than SkBitmap.
This allows loading of icons in the platform format, avoiding unnecessary
conversions if the image is going to be used with the platform toolkit. In other
cases, this just pushes image conversion to the callsite rather than the actual
image load.
BUG=19685
TEST=unit_tests and visual inspection of icons in the download shelf
Review URL: http://codereview.chromium.org/6597043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76743 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/icon_loader_win.cc')
-rw-r--r-- | chrome/browser/icon_loader_win.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/icon_loader_win.cc b/chrome/browser/icon_loader_win.cc index 717c15b..eeeedb0 100644 --- a/chrome/browser/icon_loader_win.cc +++ b/chrome/browser/icon_loader_win.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -42,7 +42,8 @@ void IconLoader::ReadIcon() { DCHECK(r); gfx::Size icon_size(bitmap_info.bmWidth, bitmap_info.bmHeight); - bitmap_.Set(IconUtil::CreateSkBitmapFromHICON(file_info.hIcon, icon_size)); + image_.reset(new gfx::Image( + IconUtil::CreateSkBitmapFromHICON(file_info.hIcon, icon_size))); target_message_loop_->PostTask(FROM_HERE, NewRunnableMethod(this, &IconLoader::NotifyDelegate)); |