Index: Source/core/html/HTMLCanvasElement.cpp |
diff --git a/Source/core/html/HTMLCanvasElement.cpp b/Source/core/html/HTMLCanvasElement.cpp |
index 37db4a2cc4859f46d9449032234d3c8571f886e3..09bc5d57aaba75922dfa80f5b3462ef1ea602a2a 100644 |
--- a/Source/core/html/HTMLCanvasElement.cpp |
+++ b/Source/core/html/HTMLCanvasElement.cpp |
@@ -700,7 +700,7 @@ void HTMLCanvasElement::updateExternallyAllocatedMemory() const |
GraphicsContext* HTMLCanvasElement::drawingContext() const |
{ |
- return buffer() ? m_imageBuffer->context() : 0; |
+ return buffer() ? m_imageBuffer->context() : nullptr; |
} |
GraphicsContext* HTMLCanvasElement::existingDrawingContext() const |
@@ -711,6 +711,19 @@ GraphicsContext* HTMLCanvasElement::existingDrawingContext() const |
return drawingContext(); |
} |
+SkCanvas* HTMLCanvasElement::drawingCanvas() const |
+{ |
+ return buffer() ? m_imageBuffer->canvas() : nullptr; |
+} |
+ |
+SkCanvas* HTMLCanvasElement::existingDrawingCanvas() const |
+{ |
+ if (!hasImageBuffer()) |
+ return nullptr; |
+ |
+ return m_imageBuffer->canvas(); |
+} |
+ |
ImageBuffer* HTMLCanvasElement::buffer() const |
{ |
ASSERT(m_context); |