Index: ui/gfx/scoped_ns_graphics_context_save_gstate_mac.mm |
diff --git a/ui/gfx/scoped_ns_graphics_context_save_gstate_mac.mm b/ui/gfx/scoped_ns_graphics_context_save_gstate_mac.mm |
index f3992ea0b694a520c9b45b869151144d4237836b..a6be99b66cda126409937d9f6832fa0370395bd9 100644 |
--- a/ui/gfx/scoped_ns_graphics_context_save_gstate_mac.mm |
+++ b/ui/gfx/scoped_ns_graphics_context_save_gstate_mac.mm |
@@ -4,19 +4,16 @@ |
#include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" |
-#include <AppKit/AppKit.h> |
+#import <AppKit/AppKit.h> |
namespace gfx { |
-ScopedNSGraphicsContextSaveGState::ScopedNSGraphicsContextSaveGState( |
- NSGraphicsContext* context) : context_([context retain]) { |
- if (!context_) |
- context_.reset([[NSGraphicsContext currentContext] retain]); |
- [context_ saveGraphicsState]; |
+ScopedNSGraphicsContextSaveGState::ScopedNSGraphicsContextSaveGState() { |
+ [NSGraphicsContext saveGraphicsState]; |
} |
ScopedNSGraphicsContextSaveGState::~ScopedNSGraphicsContextSaveGState() { |
- [context_ restoreGraphicsState]; |
+ [NSGraphicsContext restoreGraphicsState]; |
} |
} // namespace gfx |