| Index: skia/ext/platform_canvas_mac.cc
|
| diff --git a/skia/ext/platform_canvas_mac.cc b/skia/ext/platform_canvas_mac.cc
|
| index 7e4c6108ccf4204b1a57f91b69aff3736e24da9e..dd893947bb278e65f25397f2ee8f6d760c302ac6 100644
|
| --- a/skia/ext/platform_canvas_mac.cc
|
| +++ b/skia/ext/platform_canvas_mac.cc
|
| @@ -19,7 +19,7 @@ PlatformCanvas::PlatformCanvas(int width,
|
| bool is_opaque,
|
| CGContextRef context)
|
| : SkCanvas(SkNEW(BitmapPlatformDeviceFactory)) {
|
| - initialize(width, height, is_opaque);
|
| + initialize(context, width, height, is_opaque);
|
| }
|
|
|
| PlatformCanvas::PlatformCanvas(int width,
|
| @@ -37,8 +37,19 @@ bool PlatformCanvas::initialize(int width,
|
| int height,
|
| bool is_opaque,
|
| uint8_t* data) {
|
| - SkDevice* device = BitmapPlatformDevice::CreateWithData(data, width, height,
|
| - is_opaque);
|
| + return initialize(BitmapPlatformDevice::CreateWithData(data, width, height,
|
| + is_opaque));
|
| +}
|
| +
|
| +bool PlatformCanvas::initialize(CGContextRef context,
|
| + int width,
|
| + int height,
|
| + bool is_opaque) {
|
| + return initialize(BitmapPlatformDevice::Create(context, width, height,
|
| + is_opaque));
|
| +}
|
| +
|
| +bool PlatformCanvas::initialize(SkDevice* device) {
|
| if (!device)
|
| return false;
|
|
|
|
|