Recording the drawing commands and replaying them to the backend is already implemented and should be handled by DisplayList::ImageBuffer.
Created attachment 393064 [details] Patch
Created attachment 393096 [details] Patch
Comment on attachment 393096 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=393096&action=review > Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp:2062 > if (UNLIKELY(m_usesDisplayListDrawing)) { We should probably go farther and delete the whole thing, LayoutTests and all.
Comment on attachment 393096 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=393096&action=review >> Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp:2062 >> if (UNLIKELY(m_usesDisplayListDrawing)) { > > We should probably go farther and delete the whole thing, LayoutTests and all. This DisplayList recording and replay back is used by CustomPaintCanvas, OffscreenCanvas and WebGLRenderingContextBase. A CanvasRenderingContext2DBase is created without an ImageBuffer. The drawing commands are recorded and later replayed back on the context of a temporary ImageBuffer. It will be nice if we can remove that. But at least for now I think it is okay to remove the code duplication.
Comment on attachment 393096 [details] Patch Clearing flags on attachment: 393096 Committed r258219: <https://trac.webkit.org/changeset/258219>
All reviewed patches have been landed. Closing bug.
<rdar://problem/60279998>