| Index: Source/platform/graphics/UnacceleratedImageBufferSurface.cpp
|
| diff --git a/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp b/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp
|
| index 50b12726a236eaf85c8a3787e5d180f9aa048bae..9151c31094bac253c67e2f132f4f7d00f0517c83 100644
|
| --- a/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp
|
| +++ b/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp
|
| @@ -31,17 +31,29 @@
|
| #include "config.h"
|
| #include "platform/graphics/UnacceleratedImageBufferSurface.h"
|
|
|
| -#include "third_party/skia/include/core/SkCanvas.h"
|
| +#include "third_party/skia/include/core/SkSurface.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())))
|
| + , m_surface(adoptRef(SkSurface::NewRasterPMColor(size.width(), size.height())))
|
| {
|
| - if (m_canvas)
|
| + if (m_surface)
|
| clear();
|
| }
|
|
|
| +UnacceleratedImageBufferSurface::~UnacceleratedImageBufferSurface() { }
|
| +
|
| +SkCanvas* UnacceleratedImageBufferSurface::canvas() const
|
| +{
|
| + return m_surface->getCanvas();
|
| +}
|
| +
|
| +bool UnacceleratedImageBufferSurface::isValid() const
|
| +{
|
| + return m_surface;
|
| +}
|
| +
|
| } // namespace WebCore
|
|
|