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

Unified Diff: chrome/browser/icon_loader_win.cc

Issue 10820049: Load 2x resources on demand (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updated comment Created 8 years, 4 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 | « chrome/browser/icon_loader_mac.mm ('k') | chrome/browser/themes/browser_theme_pack.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/icon_loader_win.cc
diff --git a/chrome/browser/icon_loader_win.cc b/chrome/browser/icon_loader_win.cc
index 26c39fabb21164fbb4e3bcee5600dc21aa70c4a8..48e565f840d6a663c21d5542c85a991500ad2c7c 100644
--- a/chrome/browser/icon_loader_win.cc
+++ b/chrome/browser/icon_loader_win.cc
@@ -12,6 +12,7 @@
#include "base/threading/thread.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/icon_util.h"
+#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/size.h"
void IconLoader::ReadIcon() {
@@ -37,7 +38,9 @@ void IconLoader::ReadIcon() {
scoped_ptr<SkBitmap> bitmap(IconUtil::CreateSkBitmapFromHICON(
file_info.hIcon));
- image_.reset(new gfx::Image(*bitmap));
+ gfx::ImageSkia image_skia(*bitmap);
+ image_skia.MakeThreadSafe();
+ image_.reset(new gfx::Image(image_skia));
DestroyIcon(file_info.hIcon);
target_message_loop_->PostTask(FROM_HERE,
base::Bind(&IconLoader::NotifyDelegate, this));
« no previous file with comments | « chrome/browser/icon_loader_mac.mm ('k') | chrome/browser/themes/browser_theme_pack.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698