skia2/gm/system_preferences_mac.mm
tfarina@chromium.org 7b3b26e56c gm: Include system_preferences.h in mac file.
This fixes the FIXME in there.

R=epoger@google.com

Review URL: https://codereview.appspot.com/6576049

git-svn-id: http://skia.googlecode.com/svn/trunk@5692 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-26 15:41:42 +00:00

29 lines
852 B
Plaintext

/*
* Copyright 2012 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "system_preferences.h"
#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
enum {
NoFontSmoothing = 0,
LightFontSmoothing = 1,
MediumFontSmoothing = 2,
StrongFontSmoothing = 3,
};
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setInteger:MediumFontSmoothing forKey:@"AppleFontSmoothing"];
[pool release];
}