summaryrefslogtreecommitdiffstats
path: root/chrome/browser/web_applications
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-29 03:46:27 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-29 03:46:27 +0000
commit2b8ac34229b953d763712d038eb52bb989e52568 (patch)
treec3d2b10983efee188778bb43a3d7f2d7f284c31b /chrome/browser/web_applications
parentd5f6d64a34f875835b5750a54524df9502fb6f68 (diff)
downloadchromium_src-2b8ac34229b953d763712d038eb52bb989e52568.zip
chromium_src-2b8ac34229b953d763712d038eb52bb989e52568.tar.gz
chromium_src-2b8ac34229b953d763712d038eb52bb989e52568.tar.bz2
Load 2x resources on demand
Currently, this always load 1x. This will be fixed in follow up CL to use currently used scale factor. * Added thread check to ImageSkiaStorage using NonThreadSafe. This is important as GetRepresentation may change the stage now even for the Image obtained from ResourceBundle. * Added SetReadOnly to protect read only resources (ones in ResourceBundle) from being modified by accident. * Addded MakeThreadSafe to guarantee that it can be safely accessed from multiple threads. BUG=141351,144367 TEST=covered by tests. Also run with --force-device-scale-factor=2 and --load-2x-resources and make sure chrome still uses 2x resources where available. Review URL: https://chromiumcodereview.appspot.com/10820049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153846 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/web_applications')
-rw-r--r--chrome/browser/web_applications/web_app_mac.mm3
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/browser/web_applications/web_app_mac.mm b/chrome/browser/web_applications/web_app_mac.mm
index 2246926..f373076 100644
--- a/chrome/browser/web_applications/web_app_mac.mm
+++ b/chrome/browser/web_applications/web_app_mac.mm
@@ -198,8 +198,9 @@ bool WebAppShortcutCreator::UpdateIcon(const FilePath& app_path) const {
scoped_nsobject<IconFamily> icon_family([[IconFamily alloc] init]);
bool image_added = false;
+ info_.favicon.ToImageSkia()->EnsureRepsForSupportedScaleFactors();
std::vector<gfx::ImageSkiaRep> image_reps =
- info_.favicon.ToImageSkia()->GetRepresentations();
+ info_.favicon.ToImageSkia()->image_reps();
for (size_t i = 0; i < image_reps.size(); ++i) {
NSBitmapImageRep* image_rep = SkBitmapToImageRep(
image_reps[i].sk_bitmap());