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

Unified Diff: chrome/browser/ui/cocoa/download/download_item_cell.mm

Issue 7541043: Revert 95611 - Always call the class methods to save/restore contexts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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/download/download_item_cell.mm
===================================================================
--- chrome/browser/ui/cocoa/download/download_item_cell.mm (revision 95630)
+++ chrome/browser/ui/cocoa/download/download_item_cell.mm (working copy)
@@ -406,14 +406,14 @@
nil];
NSPoint secondaryPos =
NSMakePoint(innerFrame.origin.x + kTextPosLeft, kSecondaryTextPosTop);
-
- gfx::ScopedNSGraphicsContextSaveGState contextSave;
NSGraphicsContext* nsContext = [NSGraphicsContext currentContext];
CGContextRef cgContext = (CGContextRef)[nsContext graphicsPort];
+ [nsContext saveGraphicsState];
[nsContext setCompositingOperation:NSCompositeSourceOver];
CGContextSetAlpha(cgContext, statusAlpha_);
[secondaryText drawAtPoint:secondaryPos
withAttributes:secondaryTextAttributes];
+ [nsContext restoreGraphicsState];
}
- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView*)controlView {
@@ -579,7 +579,8 @@
[triangle lineToPoint:p3];
[triangle closePath];
- gfx::ScopedNSGraphicsContextSaveGState scopedGState;
+ NSGraphicsContext* context = [NSGraphicsContext currentContext];
+ gfx::ScopedNSGraphicsContextSaveGState scopedGState(context);
scoped_nsobject<NSShadow> shadow([[NSShadow alloc] init]);
[shadow.get() setShadowColor:[NSColor whiteColor]];
« no previous file with comments | « chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view.mm ('k') | chrome/browser/ui/cocoa/find_bar/find_bar_view.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698