Chromium Code Reviews| Index: ui/base/cocoa/scoped_cg_context_smooth_fonts.mm |
| diff --git a/ui/base/cocoa/scoped_cg_context_smooth_fonts.mm b/ui/base/cocoa/scoped_cg_context_smooth_fonts.mm |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..88738f0458c8b0b51d1e485c900728129b54e9c6 |
| --- /dev/null |
| +++ b/ui/base/cocoa/scoped_cg_context_smooth_fonts.mm |
| @@ -0,0 +1,20 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "ui/base/cocoa/scoped_cg_context_smooth_fonts.h" |
| + |
| +#import <AppKit/AppKit.h> |
| + |
| +namespace ui { |
| + |
| +ScopedCGContextSmoothFonts::ScopedCGContextSmoothFonts() { |
| + NSGraphicsContext* context = [NSGraphicsContext currentContext]; |
| + CGContextRef cgContext = static_cast<CGContextRef>([context graphicsPort]); |
|
Robert Sesek
2015/09/25 23:00:52
naming: cg_context
tapted
2015/09/28 04:30:38
Done.
|
| + CGContextSetShouldSmoothFonts(cgContext, true); |
| +} |
| + |
| +ScopedCGContextSmoothFonts::~ScopedCGContextSmoothFonts() { |
| +} |
| + |
| +} // namespace ui |