Chromium Code Reviews| Index: chrome/default_plugin/plugin_impl_mac.mm |
| diff --git a/chrome/default_plugin/plugin_impl_mac.mm b/chrome/default_plugin/plugin_impl_mac.mm |
| index eb0ee08e711d3f92541e02df7b24de1aab43a223..4eedf2b450f639ed4dd0154033fd12fab86fa704 100644 |
| --- a/chrome/default_plugin/plugin_impl_mac.mm |
| +++ b/chrome/default_plugin/plugin_impl_mac.mm |
| @@ -17,6 +17,7 @@ |
| #include "ui/base/l10n/l10n_util_mac.h" |
| #include "ui/base/resource/resource_bundle.h" |
| #include "ui/gfx/image/image.h" |
| +#include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" |
| #include "unicode/locid.h" |
| #include "webkit/glue/webkit_glue.h" |
| #include "webkit/plugins/npapi/default_plugin_shared.h" |
| @@ -139,7 +140,7 @@ void PluginInstallerImpl::DownloadCancelled() { |
| } |
| int16 PluginInstallerImpl::OnDrawRect(CGContextRef context, CGRect dirty_rect) { |
| - [NSGraphicsContext saveGraphicsState]; |
| + gfx::ScopedNSGraphicsContextSaveGState scoped_state; |
| NSGraphicsContext* ns_context = [NSGraphicsContext |
| graphicsContextWithGraphicsPort:context flipped:YES]; |
| [NSGraphicsContext setCurrentContext:ns_context]; |
|
Mark Mentovai
2011/08/05 01:15:45
☞
|
| @@ -183,7 +184,6 @@ int16 PluginInstallerImpl::OnDrawRect(CGContextRef context, CGRect dirty_rect) { |
| label_point = NSMakePoint(roundf(label_point.x), roundf(label_point.y)); |
| [command_ drawAtPoint:label_point withAttributes:attributes]; |
| - [NSGraphicsContext restoreGraphicsState]; |
| return 1; |
| } |