diff --git a/DEPS b/DEPS index 1c231eb..728e6a1 100644 --- a/DEPS +++ b/DEPS
@@ -44,7 +44,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. - 'v8_revision': '97d1bf8050cf188e4caae1337b82ccb1d522b685', + 'v8_revision': 'b66f01197fd7bfe2063ce4dca8bf295463abc9ea', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling swarming_client # and whatever else without interference from each other.
diff --git a/skia/ext/skia_utils_mac.mm b/skia/ext/skia_utils_mac.mm index e2dbb80..a8102cb 100644 --- a/skia/ext/skia_utils_mac.mm +++ b/skia/ext/skia_utils_mac.mm
@@ -184,31 +184,10 @@ } SkBitmap CGImageToSkBitmap(CGImageRef image) { - if (!image) - return SkBitmap(); - - int width = CGImageGetWidth(image); - int height = CGImageGetHeight(image); - - std::unique_ptr<SkCanvas> canvas( - skia::TryCreateBitmapCanvas(width, height, false)); - ScopedPlatformPaint p(canvas.get()); - CGContextRef context = p.GetNativeDrawingContext(); - - // 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- - // left one. - CGContextScaleCTM(context, 1.0, -1.0); - CGContextTranslateCTM(context, 0, -height); - - // We want to copy transparent pixels from |image|, instead of blending it - // onto uninitialized pixels. - CGContextSetBlendMode(context, kCGBlendModeCopy); - - CGRect rect = CGRectMake(0, 0, width, height); - CGContextDrawImage(context, rect, image); - - return skia::ReadPixels(canvas.get()); + SkBitmap bitmap; + if (image && SkCreateBitmapFromCGImage(&bitmap, image)) + return bitmap; + return SkBitmap(); } SkBitmap NSImageToSkBitmapWithColorSpace(