diff options
Diffstat (limited to 'ui/base/clipboard/clipboard_mac.mm')
-rw-r--r-- | ui/base/clipboard/clipboard_mac.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/base/clipboard/clipboard_mac.mm b/ui/base/clipboard/clipboard_mac.mm index 63d456b..eb89565 100644 --- a/ui/base/clipboard/clipboard_mac.mm +++ b/ui/base/clipboard/clipboard_mac.mm @@ -253,7 +253,8 @@ SkBitmap Clipboard::ReadImage(Buffer buffer) const { int height = [image size].height; gfx::CanvasSkia canvas(width, height, false); - CGContextRef gc = canvas.beginPlatformPaint(); + skia::ScopedPlatformPaint scoped_platform_paint(&canvas); + CGContextRef gc = scoped_platform_paint.GetPlatformSurface(); NSGraphicsContext* cocoa_gc = [NSGraphicsContext graphicsContextWithGraphicsPort:gc flipped:NO]; [NSGraphicsContext setCurrentContext:cocoa_gc]; @@ -262,7 +263,6 @@ SkBitmap Clipboard::ReadImage(Buffer buffer) const { operation:NSCompositeCopy fraction:1.0]; [NSGraphicsContext restoreGraphicsState]; - canvas.endPlatformPaint(); return canvas.ExtractBitmap(); } return SkBitmap(); |