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

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: ensure saving before context access 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..6cbdd0ae2323984b13186e354b18ad06bee46512 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,8 @@ const CGFloat kBorderRadius = 3.0;
if (!themeProvider)
return;
+ gfx::ScopedNSGraphicsContextSaveGState scopedGState;
NSGraphicsContext* context = [NSGraphicsContext currentContext];
- gfx::ScopedNSGraphicsContextSaveGState scopedGState(context);
// Draw the background.
{
@@ -103,7 +103,7 @@ const CGFloat kBorderRadius = 3.0;
// Fade in/out the background.
{
- gfx::ScopedNSGraphicsContextSaveGState bgScopedState(context);
+ gfx::ScopedNSGraphicsContextSaveGState bgScopedState;
[border setClip];
CGContextRef cgContext = (CGContextRef)[context graphicsPort];
Mark Mentovai 2011/08/04 23:20:17 Does [NSGraphicContext currentContext] belong righ
Avi (use Gerrit) 2011/08/05 00:18:50 Done.
CGContextBeginTransparencyLayer(cgContext, NULL);
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/download/download_item_cell.mm » ('j') | chrome/browser/ui/cocoa/tabs/tab_view.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698