Index: chrome/browser/ui/cocoa/nsview_additions.mm |
diff --git a/chrome/browser/ui/cocoa/nsview_additions.mm b/chrome/browser/ui/cocoa/nsview_additions.mm |
index d6241e62cf867533ded750658dd63e359b685101..fc9291df4fd118888d35781a4552684fdf0c1b45 100644 |
--- a/chrome/browser/ui/cocoa/nsview_additions.mm |
+++ b/chrome/browser/ui/cocoa/nsview_additions.mm |
@@ -6,6 +6,7 @@ |
#include "base/mac/mac_util.h" |
#import "chrome/browser/ui/cocoa/nsview_additions.h" |
#include "chrome/common/chrome_switches.h" |
+#include "ui/base/cocoa/animation_utils.h" |
#include "ui/base/ui_base_switches.h" |
#include "base/logging.h" |
@@ -117,4 +118,16 @@ |
[self setCanDrawSubviewsIntoLayer:YES]; |
} |
+- (void)cr_setHostsSolidWhiteLayer { |
+ if (CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kDisableCoreAnimation)) |
+ return; |
+ |
+ ScopedCAActionDisabler disabler; |
+ CALayer* layer = [[CALayer alloc] init]; |
Avi (use Gerrit)
2014/03/05 03:19:28
This looks like it leaks. scoped_nsobject?
ccameron
2014/03/05 07:59:31
Yes, it does leak. The setLayer will take out a re
|
+ [layer setBackgroundColor:CGColorGetConstantColor(kCGColorWhite)]; |
+ [self setLayer:layer]; |
+ [self setWantsLayer:YES]; |
+} |
+ |
@end |