Chromium Code Reviews| Index: third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp |
| diff --git a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp |
| index 51ad64568734c0db8969c0b6ee5d4b1e86923de3..8ade02136e791477f64040698a2a5e53a8cb4ace 100644 |
| --- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp |
| +++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp |
| @@ -335,7 +335,7 @@ void HTMLCanvasElement::restoreCanvasMatrixClipStack(SkCanvas* canvas) const |
| void HTMLCanvasElement::doDeferredPaintInvalidation() |
| { |
| ASSERT(!m_dirtyRect.isEmpty()); |
| - if (is3D()) { |
| + if (!m_context->is2d()) { |
| didFinalizeFrame(); |
| } else { |
| ASSERT(hasImageBuffer()); |
| @@ -461,6 +461,12 @@ void HTMLCanvasElement::paint(GraphicsContext& context, const LayoutRect& r) |
| if (!paintsIntoCanvasBuffer() && !document().printing()) |
| return; |
| + // TODO(junov): Paint is currently only implemented by ImageBitmap contexts, |
|
Stephen White
2016/02/10 15:34:55
MicroNit: comma splice. Use a semicolon, or split
|
| + // we could improve the abstraction by making all context types paint |
| + /// themselves (implement paint). |
|
Stephen White
2016/02/10 15:34:55
MicroNit: ///
|
| + if (m_context->paint(context, pixelSnappedIntRect(r))) |
| + return; |
| + |
| m_context->paintRenderingResultsToCanvas(FrontBuffer); |
| if (hasImageBuffer()) { |
| if (!context.contextDisabled()) { |