[child cr_recursivelySetNeedsDisplay:flag];
}
+- (BOOL)cr_supportsLayerSquashing {
+ return [self respondsToSelector:@selector(setCanDrawSubviewsIntoLayer:)];
+}
+
- (void)cr_setWantsLayer:(BOOL)wantsLayer
withSquashing:(BOOL)squashing {
if (!CommandLine::ForCurrentProcess()->HasSwitch(
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableCoreAnimationLayerSquashing))
return;
- if ([self respondsToSelector:@selector(setCanDrawSubviewsIntoLayer:)])
+ if ([self cr_supportsLayerSquashing])
[self setCanDrawSubviewsIntoLayer:squashing];
}