Bug 208828

Summary: Remove the special DisplayList handling in CanvasRenderingContext2DBase
Product: WebKit Reporter: Said Abou-Hallawa <sabouhallawa>
Component: CanvasAssignee: Said Abou-Hallawa <sabouhallawa>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, dino, esprehn+autocc, ews-watchlist, gyuyoung.kim, mmaxfield, simon.fraser, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Said Abou-Hallawa 2020-03-09 13:09:19 PDT
Recording the drawing commands and replaying them to the backend is already implemented and should be handled by DisplayList::ImageBuffer.
Comment 1 Said Abou-Hallawa 2020-03-09 13:10:51 PDT
Created attachment 393064 [details]
Patch
Comment 2 Said Abou-Hallawa 2020-03-09 17:24:29 PDT
Created attachment 393096 [details]
Patch
Comment 3 Myles C. Maxfield 2020-03-09 22:24:04 PDT
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 4 Said Abou-Hallawa 2020-03-10 09:50:50 PDT
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 5 WebKit Commit Bot 2020-03-10 10:52:12 PDT
Comment on attachment 393096 [details]
Patch

Clearing flags on attachment: 393096

Committed r258219: <https://trac.webkit.org/changeset/258219>
Comment 6 WebKit Commit Bot 2020-03-10 10:52:14 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2020-03-10 10:53:14 PDT
<rdar://problem/60279998>