Index: third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp |
diff --git a/third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp b/third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp |
index 72474a405f2dd510f2679bf1ea95c4cbc1086383..c2b4ddf29554c157180c634b7c3e42092e6f8fb8 100644 |
--- a/third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp |
+++ b/third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp |
@@ -31,6 +31,7 @@ |
#include "platform/graphics/UnacceleratedImageBufferSurface.h" |
#include "platform/graphics/skia/SkiaUtils.h" |
+#include "third_party/skia/include/core/SkSurface.h" |
#include "wtf/PassRefPtr.h" |
namespace blink { |
@@ -47,13 +48,14 @@ UnacceleratedImageBufferSurface::UnacceleratedImageBufferSurface( |
SkImageInfo info = SkImageInfo::Make(size.width(), size.height(), colorType, |
alphaType, colorSpace); |
SkSurfaceProps disableLCDProps(0, kUnknown_SkPixelGeometry); |
- m_surface = PaintSurface::MakeRaster( |
- info, Opaque == opacityMode ? 0 : &disableLCDProps); |
+ m_surface = |
+ SkSurface::MakeRaster(info, Opaque == opacityMode ? 0 : &disableLCDProps); |
+ m_canvas = WTF::wrapUnique(new PaintCanvas(m_surface->getCanvas())); |
// Always save an initial frame, to support resetting the top level matrix |
// and clip. |
if (m_surface) |
- m_surface->getCanvas()->save(); |
+ m_canvas->save(); |
if (initializationMode == InitializeImagePixels) { |
if (m_surface) |
@@ -64,7 +66,7 @@ UnacceleratedImageBufferSurface::UnacceleratedImageBufferSurface( |
UnacceleratedImageBufferSurface::~UnacceleratedImageBufferSurface() {} |
PaintCanvas* UnacceleratedImageBufferSurface::canvas() { |
- return m_surface->getCanvas(); |
+ return m_canvas.get(); |
} |
bool UnacceleratedImageBufferSurface::isValid() const { |