diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-05 21:58:27 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-05 21:58:27 +0000 |
commit | b1542583b8b2afc55707f1074ad9f04591ebbf22 (patch) | |
tree | 4d33e3fb06077334b3ff67a19e4b0c025fc2f731 /skia | |
parent | 594de2bc6b1e2732783b673d4f8eeaee8cfa0a54 (diff) | |
download | chromium_src-b1542583b8b2afc55707f1074ad9f04591ebbf22.zip chromium_src-b1542583b8b2afc55707f1074ad9f04591ebbf22.tar.gz chromium_src-b1542583b8b2afc55707f1074ad9f04591ebbf22.tar.bz2 |
Remove implicit dependency from 'skia' on 'ui'.
This is needed for the components build. Just adding an explicit dependency from skia to ui doesn't work because ui already depends on skia.
BUG=90078
TEST=No linker errors when linking libskia.dylib
Review URL: http://codereview.chromium.org/9578010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125009 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia')
-rw-r--r-- | skia/ext/skia_utils_mac.mm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/skia/ext/skia_utils_mac.mm b/skia/ext/skia_utils_mac.mm index 6781a93..d639460 100644 --- a/skia/ext/skia_utils_mac.mm +++ b/skia/ext/skia_utils_mac.mm @@ -14,7 +14,6 @@ #include "skia/ext/bitmap_platform_device_mac.h" #include "third_party/skia/include/core/SkRegion.h" #include "third_party/skia/include/utils/mac/SkCGUtils.h" -#include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" // 10.6 API that we use if available. #if !defined(MAC_OS_X_VERSION_10_6) || \ @@ -76,7 +75,8 @@ SkBitmap NSImageOrNSImageRepToSkBitmap( DCHECK(context); // Save the current graphics context so that we can restore it later. - gfx::ScopedNSGraphicsContextSaveGState scoped_g_state; + NSGraphicsContext* old_context = [NSGraphicsContext currentContext]; + [NSGraphicsContext saveGraphicsState]; // Dummy context that we will draw into. NSGraphicsContext* context_cocoa = @@ -110,6 +110,10 @@ SkBitmap NSImageOrNSImageRepToSkBitmap( } } + [NSGraphicsContext restoreGraphicsState]; + if (!old_context && base::mac::IsOSLeopardOrEarlier()) + [NSGraphicsContext setCurrentContext:nil]; + return bitmap; } |