Bug 260283 - Remove LocalResourceHeap and QualifiedResourceHeap
Summary: Remove LocalResourceHeap and QualifiedResourceHeap
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Said Abou-Hallawa
URL:
Keywords: InRadar
Depends on:
Blocks: 260181
  Show dependency treegraph
 
Reported: 2023-08-16 12:49 PDT by Said Abou-Hallawa
Modified: 2023-08-18 10:43 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Said Abou-Hallawa 2023-08-16 12:49:52 PDT
LocalResourceHeap is the only super class of ResourceHeap so it is cleaner to move all the implementation of LocalResourceHeap to ResourceHeap.

All the calls to the add() and get() functions of QualifiedResourceHeap come from RemoteRenderingBackend and RemoteDisplayListRecorder via RemoteResourceCache. These two callers qualify the RenderingResourceIdentifier with m_gpuConnectionToWebProcess->webProcessIdentifier() of the RemoteRenderingBackend.

But RemoteRenderingBackend never changes its m_gpuConnectionToWebProcess since it is defined to be `Ref<GPUConnectionToWebProcess>`. And GPUConnectionToWebProcess never changes its m_webProcessIdentifier since it is defined to be `const WebCore::ProcessIdentifier`. So the resources stored by QualifiedResourceHeap should have the same ProcessIdentifier.

This will make replaying a whole DisplayList in GPU Process be straightforward once the DisplayList items and the resources are transferred from Web Content Process to the GPU Process. The DisplayList::Replayer can be initialized with the decoded DisplayList items and the ResourceHeap of the RemoteResourceCache.
Comment 1 Radar WebKit Bug Importer 2023-08-16 12:50:06 PDT
<rdar://problem/113983207>
Comment 2 Said Abou-Hallawa 2023-08-16 15:09:46 PDT
Pull request: https://github.com/WebKit/WebKit/pull/16760
Comment 3 EWS 2023-08-18 10:43:25 PDT
Committed 267044@main (d5ada78e4261): <https://commits.webkit.org/267044@main>

Reviewed commits have been landed. Closing PR #16760 and removing active labels.