Index: chrome/browser/renderer_host/render_widget_host_view_mac.mm |
diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac.mm b/chrome/browser/renderer_host/render_widget_host_view_mac.mm |
index bda28574757c9422848df3c725d7391319147bd0..29186a59f66470ff7ff585d7b0a5e1253daf6041 100644 |
--- a/chrome/browser/renderer_host/render_widget_host_view_mac.mm |
+++ b/chrome/browser/renderer_host/render_widget_host_view_mac.mm |
@@ -42,6 +42,7 @@ |
#include "third_party/WebKit/Source/WebKit/chromium/public/mac/WebInputEventFactory.h" |
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
#include "ui/gfx/gl/gl_switches.h" |
+#include "ui/gfx/scoped_ns_graphics_context_state_mac.h" |
#include "ui/gfx/surface/io_surface_support_mac.h" |
#include "webkit/glue/webaccessibility.h" |
#include "webkit/plugins/npapi/webplugin.h" |
@@ -416,7 +417,7 @@ static CVReturn DrawOneAcceleratedPluginCallback( |
int dirtyRectCount; |
[self getRectsBeingDrawn:&dirtyRects count:&dirtyRectCount]; |
- [NSGraphicsContext saveGraphicsState]; |
+ gfx::ScopedNSGraphicsContextState scopedGState; |
Nico
2011/04/26 17:56:28
hm, this line in itself isn't very obvious. Maybe
Robert Sesek
2011/04/26 18:50:53
This matches the CGContext version...
|
// Mask out any cutout rects--somewhat counterintuitively cutout rects are |
// places where clearColor is *not* drawn. The trick is that drawing nothing |
@@ -444,8 +445,6 @@ static CVReturn DrawOneAcceleratedPluginCallback( |
// Punch a hole so that the OpenGL view shows through. |
[[NSColor clearColor] set]; |
NSRectFillList(dirtyRects, dirtyRectCount); |
- |
- [NSGraphicsContext restoreGraphicsState]; |
} |
[self drawView]; |