diff options
author | Derek Sollenberger <djsollen@google.com> | 2012-03-12 15:59:01 -0400 |
---|---|---|
committer | Derek Sollenberger <djsollen@google.com> | 2012-03-12 15:59:01 -0400 |
commit | a8a1f8b5da30d0ce9091b8475d336c4ddb0f2b4e (patch) | |
tree | 1f4289d1f765d793e8c942ca5b3b87fa56a30258 /gm/system_preferences_mac.mm | |
parent | 573b53f8618997434563ae650004f89a20aaf631 (diff) | |
parent | 2a049989f422cb1f59e9e05f413d13745f34a3d1 (diff) | |
download | external_skia-a8a1f8b5da30d0ce9091b8475d336c4ddb0f2b4e.zip external_skia-a8a1f8b5da30d0ce9091b8475d336c4ddb0f2b4e.tar.gz external_skia-a8a1f8b5da30d0ce9091b8475d336c4ddb0f2b4e.tar.bz2 |
resolved conflicts for merge of 2a049989 to master
Change-Id: Ia1cbb6b274e1b3739704de9dd997e6d5dc5185af
Diffstat (limited to 'gm/system_preferences_mac.mm')
-rw-r--r-- | gm/system_preferences_mac.mm | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gm/system_preferences_mac.mm b/gm/system_preferences_mac.mm new file mode 100644 index 0000000..2c772a1 --- /dev/null +++ b/gm/system_preferences_mac.mm @@ -0,0 +1,24 @@ +/* + * Copyright 2012 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#import <Cocoa/Cocoa.h> + +void setSystemPreferences() { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + // Set LCD font smoothing level for this application (does not affect other + // applications). Based on resetDefaultsToConsistentValues() in + // http://trac.webkit.org/browser/trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm + static const int NoFontSmoothing = 0; + static const int LightFontSmoothing = 1; + static const int MediumFontSmoothing = 2; + static const int StrongFontSmoothing = 3; + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + [defaults setInteger:MediumFontSmoothing forKey:@"AppleFontSmoothing"]; + + [pool release]; +} |