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

Unified Diff: ui/base/clipboard/clipboard_mac.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
« no previous file with comments | « chrome/default_plugin/plugin_impl_mac.mm ('k') | ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/clipboard/clipboard_mac.mm
===================================================================
--- ui/base/clipboard/clipboard_mac.mm (revision 95630)
+++ ui/base/clipboard/clipboard_mac.mm (working copy)
@@ -16,7 +16,6 @@
#import "third_party/mozilla/NSPasteboard+Utils.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/canvas_skia.h"
-#include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h"
#include "ui/gfx/size.h"
namespace ui {
@@ -249,7 +248,6 @@
scoped_nsobject<NSImage> image(
[[NSImage alloc] initWithPasteboard:GetPasteboard()]);
if (image.get()) {
- gfx::ScopedNSGraphicsContextSaveGState scoped_state;
[image setFlipped:YES];
int width = [image size].width;
int height = [image size].height;
@@ -264,6 +262,7 @@
fromRect:NSZeroRect
operation:NSCompositeCopy
fraction:1.0];
+ [NSGraphicsContext restoreGraphicsState];
return canvas.ExtractBitmap();
}
return SkBitmap();
« no previous file with comments | « chrome/default_plugin/plugin_impl_mac.mm ('k') | ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698