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

Unified Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view.mm

Issue 7572031: Always call the class methods to save/restore contexts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reword Created 9 years, 4 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/ui/cocoa/bookmarks/bookmark_bar_toolbar_view.mm
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view.mm
index 6be1a30c5e130dc140071f68a49dbc07ce8cd0be..1d0aef89b0b0d3736ae4717f7c18fc6f85e932a4 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view.mm
@@ -56,8 +56,7 @@ const CGFloat kBorderRadius = 3.0;
if (!themeProvider)
return;
- NSGraphicsContext* context = [NSGraphicsContext currentContext];
- gfx::ScopedNSGraphicsContextSaveGState scopedGState(context);
+ gfx::ScopedNSGraphicsContextSaveGState scopedGState;
// Draw the background.
{
@@ -103,8 +102,9 @@ const CGFloat kBorderRadius = 3.0;
// Fade in/out the background.
{
- gfx::ScopedNSGraphicsContextSaveGState bgScopedState(context);
+ gfx::ScopedNSGraphicsContextSaveGState bgScopedState;
[border setClip];
+ NSGraphicsContext* context = [NSGraphicsContext currentContext];
CGContextRef cgContext = (CGContextRef)[context graphicsPort];
CGContextBeginTransparencyLayer(cgContext, NULL);
CGContextSetAlpha(cgContext, 1 - morph);

Powered by Google App Engine
This is Rietveld 408576698