The following test cases in fast/canvas are failing in DRT when run with --enable-accelerated-compositing --enable-accelerated-2d-canvas due to a NULL m_drawingBuffer in CanvasRenderingContext2D. The reason is that drawingContext() is NULL when the CanvasRenderingContext2D is created, so the drawing buffer is never initialized. fast/canvas/access-zero-sized-canvas.html fast/canvas/canvas-skia-excessive-size.html fast/canvas/toDataURL-noData.html
Created attachment 69880 [details] Patch
Patch flips around the logic so we don't touch m_context3d or m_drawingBuffer if there's no drawingContext(), which makes sense since if there is no drawingBuffer() we won't be doing any software draws either. This also means that <canvas> elements that are zero sized or excessively large will not get composited layers since canvas layers are only set if CanvasRenderingContext2D::isAccelerated() is true which checks m_context3d.
Comment on attachment 69880 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=69880&action=review Looks good. > WebCore/html/canvas/CanvasRenderingContext2D.cpp:171 > + if (m_context3D) { Nit: Could use && and a single if (although it'd probably need more parens around the =; your call).
Comment on attachment 69880 [details] Patch Looks fine to me.
Comment on attachment 69880 [details] Patch I thought this had already landed - whoops!
Comment on attachment 69880 [details] Patch Clearing flags on attachment: 69880 Committed r69529: <http://trac.webkit.org/changeset/69529>
All reviewed patches have been landed. Closing bug.