Commit f3d59d04 authored by sail@chromium.org's avatar sail@chromium.org

Mac: Disable loading 2x bitmaps on 10.5 and 10.6

Loading 2x bitmaps on 10.5 caused a regression in our startup time.

Since we don't need 2x bitmaps on 10.5 and 10.6 simple fix is to simply disable loading the bitmaps on those platforms.

BUG=80501
TEST=Ran on 10.6 and used logs to verify that the resource pak was not being loaded. Did the same on 10.7 and verified that the resource pak was being loaded.


Review URL: http://codereview.chromium.org/6995090

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88426 0039d316-1c4b-4281-b951-d872f2087c98
parent 487d8820
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "base/mac/mac_util.h" #include "base/mac/mac_util.h"
#include "base/memory/scoped_nsobject.h" #include "base/memory/scoped_nsobject.h"
#include "base/synchronization/lock.h" #include "base/synchronization/lock.h"
#include "base/sys_info.h"
#include "base/sys_string_conversions.h" #include "base/sys_string_conversions.h"
#include "ui/gfx/image.h" #include "ui/gfx/image.h"
...@@ -47,7 +48,16 @@ FilePath ResourceBundle::GetResourcesFilePath() { ...@@ -47,7 +48,16 @@ FilePath ResourceBundle::GetResourcesFilePath() {
// static // static
FilePath ResourceBundle::GetLargeIconResourcesFilePath() { FilePath ResourceBundle::GetLargeIconResourcesFilePath() {
return GetResourcesPakFilePath(@"theme_resources_large", nil); int32 major = 0;
int32 minor = 0;
int32 bugfix = 0;
base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
// Only load the large resource pak on if we're running on 10.7 or above.
if (major > 10 || (major == 10 && minor >= 7))
return GetResourcesPakFilePath(@"theme_resources_large", nil);
else
return FilePath();
} }
// static // static
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment