Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Unified Diff: chrome/browser/renderer_host/render_widget_host_view_mac.mm

Issue 6904026: Add and use gfx::ScopedNSGraphicsContextState (ui/gfx/scoped_ns_graphics_context_state_mac.h). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..2f08d2870e39d02625498abea8078c4e2e31cb9a 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_save_gstate_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::ScopedNSGraphicsContextSaveGState scopedGState;
// 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];

Powered by Google App Engine
This is Rietveld 408576698