Index: skia/ext/platform_canvas_linux.cc |
diff --git a/skia/ext/platform_canvas_linux.cc b/skia/ext/platform_canvas_linux.cc |
index 8e9db6247994b5821767cd2a490f2fb99ed87070..5d3594e6056a1e73ae25da1adbff1f79ba374ec4 100644 |
--- a/skia/ext/platform_canvas_linux.cc |
+++ b/skia/ext/platform_canvas_linux.cc |
@@ -29,14 +29,8 @@ PlatformCanvas::~PlatformCanvas() { |
} |
bool PlatformCanvas::initialize(int width, int height, bool is_opaque, |
uint8_t* data) { |
- SkDevice* device = |
- BitmapPlatformDevice::Create(width, height, is_opaque, data); |
- if (!device) |
- return false; |
- |
- setDevice(device); |
- device->unref(); // was created with refcount 1, and setDevice also refs |
- return true; |
+ return initializeWithDevice(BitmapPlatformDevice::Create( |
+ width, height, is_opaque, data)); |
} |
cairo_t* PlatformCanvas::beginPlatformPaint() { |