Chromium Code Reviews| Index: Source/core/html/HTMLCanvasElement.cpp |
| diff --git a/Source/core/html/HTMLCanvasElement.cpp b/Source/core/html/HTMLCanvasElement.cpp |
| index 4ea22121fa982da6aa7d0e3754e0d820cd904e05..a747a9fba20d8e34f9b44f7442102a9f666630af 100644 |
| --- a/Source/core/html/HTMLCanvasElement.cpp |
| +++ b/Source/core/html/HTMLCanvasElement.cpp |
| @@ -315,6 +315,10 @@ void HTMLCanvasElement::paint(GraphicsContext* context, const LayoutRect& r, boo |
| if (!paintsIntoCanvasBuffer() && !document().printing()) |
| return; |
| m_context->paintRenderingResultsToCanvas(); |
| + |
| + // When alpha is false, we should initialize to opaque black. |
| + if (!hasImageBuffer() && !m_context->hasAlpha()) |
| + createImageBuffer(); |
|
Justin Novosad
2014/03/17 17:24:23
I think you can solve this problem without creatin
|
| } |
| if (hasImageBuffer()) { |