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..395bbc4ff6b49bff134d135a5b153554853e5d0f 100644 |
--- a/ui/gfx/scoped_ns_graphics_context_save_gstate_mac.mm |
+++ b/ui/gfx/scoped_ns_graphics_context_save_gstate_mac.mm |
@@ -8,15 +8,12 @@ |
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 |