Bug 220770

Summary: [GPUProcess] Mark IOSurface backing for RemoteGraphicsContextGL's displayBuffer as owned by the WebProcess
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: ggaren, kkinnunen, simon.fraser, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=220663
Bug Depends on:    
Bug Blocks: 231075    
Attachments:
Description Flags
Patch
none
Patch none

Description Chris Dumez 2021-01-20 09:32:56 PST
Mark IOSurface backing for RemoteGraphicsContextGL's displayBuffer as owned by the WebProcess. This is so that Jetsam knows which process to terminate to reclaim memory.
Comment 1 Chris Dumez 2021-01-20 09:34:31 PST
Created attachment 417977 [details]
Patch
Comment 2 Kimmo Kinnunen 2021-01-20 09:50:55 PST
Could we do it already today in GPU process instead, so that we don't need to do that later?
Comment 3 Chris Dumez 2021-01-20 09:53:29 PST
(In reply to Kimmo Kinnunen from comment #2)
> Could we do it already today in GPU process instead, so that we don't need
> to do that later?

ahah, I wish :) Sadly it is currently not possible to do so from the GPUProcess without opening the sandbox too much. I have a meeting about this soon though. If and when we have an SPI that works from the GPUProcess (and with acceptable security ramifications), I will update our code accordingly.

For now, doing it from the WebProcess is that best we can do and the approach we have taken in Bug 220663 as well.
Comment 4 Geoffrey Garen 2021-01-20 13:55:02 PST
Comment on attachment 417977 [details]
Patch

r=me
Comment 5 EWS 2021-01-20 14:07:54 PST
Committed r271673: <https://trac.webkit.org/changeset/271673>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 417977 [details].
Comment 6 Radar WebKit Bug Importer 2021-01-20 14:08:15 PST
<rdar://problem/73419639>
Comment 7 Chris Dumez 2021-01-21 10:29:10 PST
Reopening to attach new patch.
Comment 8 Chris Dumez 2021-01-21 10:29:11 PST
Created attachment 418058 [details]
Patch