RESOLVED FIXED 218720
Rename ImageBuffer::flushDisplayList to ImageBuffer::submitDisplayList
https://bugs.webkit.org/show_bug.cgi?id=218720
Summary Rename ImageBuffer::flushDisplayList to ImageBuffer::submitDisplayList
Wenson Hsieh
Reported 2020-11-09 11:57:18 PST
ImageBuffer's `flushDisplayList` method is currently only responsible for replaying the given display list into the image buffer's drawing context, and doesn't actually guarantee a context flush. A name like `renderDisplayList` seems more fitting.
Attachments
Patch (11.83 KB, patch)
2020-11-09 12:25 PST, Wenson Hsieh
no flags
Patch (13.88 KB, patch)
2020-11-09 13:41 PST, Wenson Hsieh
no flags
Patch (11.83 KB, patch)
2020-11-09 13:46 PST, Wenson Hsieh
no flags
Said Abou-Hallawa
Comment 1 2020-11-09 12:09:24 PST
(In reply to Wenson Hsieh from comment #0) > ImageBuffer's `flushDisplayList` method is currently only responsible for > replaying the given display list into the image buffer's drawing context, > and doesn't actually guarantee a context flush. A name like > `renderDisplayList` seems more fitting. I think this statement is a little inaccurate. The "flushDisplayList" is responsible for replaying the given display list into the image buffer's "backend context". Using the "drawing context" is a little vague here because DisplayList::DrawingContext refers to the class that wraps the DisplayList::Recorder. Regarding the new name "renderDisplayList", I am not sure why it is better than flushDisplayList() especially when we deal with cross process operation and where WebP does not really renders the display list to the backend context.
Simon Fraser (smfr)
Comment 2 2020-11-09 12:15:59 PST
flush() implies "play this out until the end", and normally flush is used for a function that doesn't take arguments; it's "flush out existing state". So flush(DisplayList&) is a bit ambiguous. Is there already some internal DisplayList that gets flushed out first?
Wenson Hsieh
Comment 3 2020-11-09 12:25:55 PST
Tim Horton
Comment 4 2020-11-09 12:46:17 PST
How about "submit"?
Wenson Hsieh
Comment 5 2020-11-09 12:48:59 PST
(In reply to Tim Horton from comment #4) > How about "submit"? "submitDisplayList" sounds fine to me (I think I actually prefer it to "renderDisplayList", since "submit" is a more accurate word to describe what happens in RemoteImageBufferProxy).
Said Abou-Hallawa
Comment 6 2020-11-09 12:49:19 PST
For me, 'flush' means "When you empty something, you flush it." This means you just get rid of it and you do not have to know where it will end up. And yes all, we only flush the internal DisplayList of the ImageBuffer to its remote backend. So we should only be flushing the ImageBuffer's existence state. I think the problem is flushDisplayList() is used in both RemoteImageBufferProxy and RemoteImageBuffer. In RemoteImageBufferProxy, it is used to send the DisplayList to GPUP. But in RemoteImageBuffer, it is used to replay, apply or render the DisplayList into the backend. My suggestion is: Remove the virtual function ImageBuffer::flushDisplayList() Remove RemoteImageBuffer::flushDisplayList() and inline it in RemoteRenderingBackend::applyDisplayList() Make RemoteImageBufferProxy::flushDisplayList() private none virtual.
Wenson Hsieh
Comment 7 2020-11-09 13:32:23 PST
(In reply to Said Abou-Hallawa from comment #6) > For me, 'flush' means "When you empty something, you flush it." This means > you just get rid of it and you do not have to know where it will end up. > > And yes all, we only flush the internal DisplayList of the ImageBuffer to > its remote backend. So we should only be flushing the ImageBuffer's > existence state. > > I think the problem is flushDisplayList() is used in both > RemoteImageBufferProxy and RemoteImageBuffer. In RemoteImageBufferProxy, it > is used to send the DisplayList to GPUP. But in RemoteImageBuffer, it is > used to replay, apply or render the DisplayList into the backend. > > My suggestion is: > > Remove the virtual function ImageBuffer::flushDisplayList() > Remove RemoteImageBuffer::flushDisplayList() and inline it in > RemoteRenderingBackend::applyDisplayList() > Make RemoteImageBufferProxy::flushDisplayList() private none virtual. (We chatted about this on Slack, and decided to use the name "submitDisplayList" for now to deal with the confusion around flushing, and then remove `ImageBuffer::flushDisplayList` later, which will require some additional refactoring around ConcreteImageBuffer)
Wenson Hsieh
Comment 8 2020-11-09 13:41:41 PST Comment hidden (obsolete)
Wenson Hsieh
Comment 9 2020-11-09 13:46:11 PST
EWS
Comment 10 2020-11-09 15:12:03 PST
Committed r269606: <https://trac.webkit.org/changeset/269606> All reviewed patches have been landed. Closing bug and clearing flags on attachment 413627 [details].
Note You need to log in before you can comment on or make changes to this bug.