Chromium Code Reviews| Index: content/app/content_main_runner.cc |
| diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc |
| index 4c8dcbb99c45b9cf19b2637411e2253892f9d1d4..14d8d37f5730e127b561baf0f1335e8deb007df1 100644 |
| --- a/content/app/content_main_runner.cc |
| +++ b/content/app/content_main_runner.cc |
| @@ -83,7 +83,11 @@ |
| #elif defined(OS_MACOSX) |
| #include "base/mac/scoped_nsautorelease_pool.h" |
| #if !defined(OS_IOS) |
| +#include <CoreFoundation/CoreFoundation.h> |
| +#include "base/mac/mac_util.h" |
| +#include "base/mac/scoped_cftyperef.h" |
| #include "base/power_monitor/power_monitor_device_source.h" |
| +#include "base/strings/sys_string_conversions.h" |
| #include "content/browser/mach_broker_mac.h" |
| #include "content/common/sandbox_init_mac.h" |
| #endif // !OS_IOS |
| @@ -551,6 +555,20 @@ class ContentMainRunnerImpl : public ContentMainRunner { |
| // app quits. Each "main" needs to flush this pool right before it goes into |
| // its main event loop to get rid of the cruft. |
| autorelease_pool_.reset(new base::mac::ScopedNSAutoreleasePool()); |
| + |
| + // CoreAnimation has poor performance and CoreAnimation and |
| + // non-CoreAnimation exhibit window flickering when layers are not hosted |
| + // in the window server, which is the default when not not using the |
| + // 10.9 SDK. |
| + // TODO: Remove this when we build with the 10.9 SDK (or higher). |
| + if (base::mac::IsOSMavericksOrLater()) { |
| + base::ScopedCFTypeRef<CFStringRef> key(base::SysUTF8ToCFStringRef( |
| + "NSWindowHostsLayersInWindowServer")); |
| + base::ScopedCFTypeRef<CFStringRef> value(base::SysUTF8ToCFStringRef( |
| + "YES")); |
| + CFPreferencesSetAppValue( |
| + key, value, kCFPreferencesCurrentApplication); |
|
Avi (use Gerrit)
2015/05/07 19:54:44
CFPreferencesSetAppValue is different than -[NSUse
|
| + } |
| #endif |
| // On Android, the command line is initialized when library is loaded and |