Chromium Code Reviews| Index: Source/platform/graphics/UnacceleratedImageBufferSurface.cpp |
| diff --git a/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp b/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp |
| index 40812df5e776038dbafc423a578370ea08678312..468576d35832492d755d23f524380f1d27a5b724 100644 |
| --- a/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp |
| +++ b/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp |
| @@ -40,8 +40,7 @@ UnacceleratedImageBufferSurface::UnacceleratedImageBufferSurface(const IntSize& |
| : ImageBufferSurface(size, opacityMode) |
| { |
| SkBitmap bitmap; |
| - bitmap.setConfig(SkBitmap::kARGB_8888_Config, size.width(), size.height()); |
| - bitmap.allocPixels(); |
| + bitmap.allocN32Pixels(size.width(), size.height()); |
|
reed1
2014/03/17 13:25:18
allocN32Pixels returns false on error, so you can
jbroman
2014/03/17 16:46:38
Done. Didn't realize SkCanvas::NewRasterN32 existe
|
| if (bitmap.isNull()) |
| return; |
| m_canvas = adoptPtr(new SkCanvas(bitmap)); |