| Index: Source/core/html/HTMLCanvasElement.cpp
|
| diff --git a/Source/core/html/HTMLCanvasElement.cpp b/Source/core/html/HTMLCanvasElement.cpp
|
| index 3ec540eaa09f374d7a955719435f7b1a1984cef6..81b458ffdbfb9e60ef013c927eb195f40bac85e3 100644
|
| --- a/Source/core/html/HTMLCanvasElement.cpp
|
| +++ b/Source/core/html/HTMLCanvasElement.cpp
|
| @@ -701,7 +701,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
|
| @@ -712,6 +712,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);
|
|
|