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

Unified Diff: chrome/browser/icon_loader_linux.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_chromeos.cc ('k') | chrome/browser/icon_loader_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/icon_loader_linux.cc
diff --git a/chrome/browser/icon_loader_linux.cc b/chrome/browser/icon_loader_linux.cc
index f0bb1e627c1851c5ac1196460cb87485ff779e28..f5e9c22e6b237cee0e376cb0d044753f6971c36e 100644
--- a/chrome/browser/icon_loader_linux.cc
+++ b/chrome/browser/icon_loader_linux.cc
@@ -12,6 +12,7 @@
#include "base/message_loop.h"
#include "base/nix/mime_util_xdg.h"
#include "third_party/skia/include/core/SkBitmap.h"
+#include "ui/gfx/image/image_skia.h"
#include "webkit/glue/image_decoder.h"
using std::string;
@@ -47,7 +48,9 @@ void IconLoader::ReadIcon() {
if (!bitmap.empty()) {
DCHECK_EQ(size_pixels, bitmap.width());
DCHECK_EQ(size_pixels, bitmap.height());
- image_.reset(new gfx::Image(bitmap));
+ gfx::ImageSkia image_skia(bitmap);
+ image_skia.MakeThreadSafe();
+ image_.reset(new gfx::Image(image_skia));
} else {
LOG(WARNING) << "Unsupported file type or load error: "
<< filename.value();
« no previous file with comments | « chrome/browser/icon_loader_chromeos.cc ('k') | chrome/browser/icon_loader_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698