| Index: Source/platform/graphics/UnacceleratedImageBufferSurface.cpp
|
| diff --git a/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp b/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp
|
| index 40812df5e776038dbafc423a578370ea08678312..50b12726a236eaf85c8a3787e5d180f9aa048bae 100644
|
| --- a/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp
|
| +++ b/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp
|
| @@ -32,20 +32,16 @@
|
| #include "platform/graphics/UnacceleratedImageBufferSurface.h"
|
|
|
| #include "third_party/skia/include/core/SkCanvas.h"
|
| -#include "wtf/PassOwnPtr.h"
|
| +#include "wtf/PassRefPtr.h"
|
|
|
| namespace WebCore {
|
|
|
| UnacceleratedImageBufferSurface::UnacceleratedImageBufferSurface(const IntSize& size, OpacityMode opacityMode)
|
| : ImageBufferSurface(size, opacityMode)
|
| + , m_canvas(adoptRef(SkCanvas::NewRasterN32(size.width(), size.height())))
|
| {
|
| - SkBitmap bitmap;
|
| - bitmap.setConfig(SkBitmap::kARGB_8888_Config, size.width(), size.height());
|
| - bitmap.allocPixels();
|
| - if (bitmap.isNull())
|
| - return;
|
| - m_canvas = adoptPtr(new SkCanvas(bitmap));
|
| - clear();
|
| + if (m_canvas)
|
| + clear();
|
| }
|
|
|
| } // namespace WebCore
|
|
|