| Index: skia/ext/skia_utils_mac.mm
|
| diff --git a/skia/ext/skia_utils_mac.mm b/skia/ext/skia_utils_mac.mm
|
| index b6351d404eb9a271146a2b3566bc0e6a5970454e..c1f1552321a963b1a5f6e6a13f2251e4b27930f1 100644
|
| --- a/skia/ext/skia_utils_mac.mm
|
| +++ b/skia/ext/skia_utils_mac.mm
|
| @@ -14,7 +14,6 @@
|
| #include "base/mac/scoped_nsobject.h"
|
| #include "skia/ext/bitmap_platform_device_mac.h"
|
| #include "skia/ext/platform_canvas.h"
|
| -#include "third_party/skia/include/core/SkRegion.h"
|
| #include "third_party/skia/include/utils/mac/SkCGUtils.h"
|
|
|
| namespace {
|
| @@ -192,10 +191,12 @@ SkBitmap CGImageToSkBitmap(CGImageRef image) {
|
| int width = CGImageGetWidth(image);
|
| int height = CGImageGetHeight(image);
|
|
|
| - std::unique_ptr<skia::BitmapPlatformDevice> device(
|
| + sk_sp<skia::BitmapPlatformDevice> device(
|
| skia::BitmapPlatformDevice::Create(NULL, width, height, false));
|
|
|
| - CGContextRef context = device->GetBitmapContext();
|
| + sk_sp<SkCanvas> canvas(skia::CreateCanvas(device, RETURN_NULL_ON_FAILURE));
|
| + ScopedPlatformPaint p(canvas.get());
|
| + CGContextRef context = p.GetPlatformSurface();
|
|
|
| // We need to invert the y-axis of the canvas so that Core Graphics drawing
|
| // happens right-side up. Skia has an upper-left origin and CG has a lower-
|
|
|