RESOLVED FIXED 222880
[GPU Process] inspector/canvas/memory.html fails when GPU rendering is enabled for 2D Canvas
https://bugs.webkit.org/show_bug.cgi?id=222880
Summary [GPU Process] inspector/canvas/memory.html fails when GPU rendering is enable...
Said Abou-Hallawa
Reported 2021-03-07 01:03:05 PST
It looks related to the memoryCost() of the RemoteImageBuffer.
Attachments
Patch (2.88 KB, patch)
2021-03-12 11:58 PST, Said Abou-Hallawa
thorton: review+
ews-feeder: commit-queue-
Patch (2.89 KB, patch)
2021-03-12 14:29 PST, Said Abou-Hallawa
no flags
Radar WebKit Bug Importer
Comment 1 2021-03-07 19:27:03 PST
Said Abou-Hallawa
Comment 2 2021-03-12 11:58:14 PST
Tim Horton
Comment 3 2021-03-12 12:13:54 PST
Comment on attachment 423072 [details] Patch How does it have a memory cost if it has no GPUP backend yet :) Why does asking for the memory cost make it have a cost?
Tim Horton
Comment 4 2021-03-12 12:14:30 PST
Also, do we /really/ need to round-trip processes to multiply some numbers :D
Said Abou-Hallawa
Comment 5 2021-03-12 12:32:39 PST
(In reply to Tim Horton from comment #3) > Comment on attachment 423072 [details] > Patch > > How does it have a memory cost if it has no GPUP backend yet :) Why does > asking for the memory cost make it have a cost? Once the RemoteImageBufferProxy is created, the WebP process sends a messages to the GPUP asking it to create the corresponding RemoteImageBuffer. So the backend is created almost instantly when RemoteImageBufferProxy is created. Please see RemoteRenderingBackendProxy::createImageBuffer(). ensureBackendCreated() only makes the WebP wait the GPUP to reply back with the backend handle so it can map it to a shareable backend.
Said Abou-Hallawa
Comment 6 2021-03-12 12:41:28 PST
(In reply to Tim Horton from comment #4) > Also, do we /really/ need to round-trip processes to multiply some numbers :D The IOSurface aligns its rows to 64 bytes. So the size is not necessarily = width x height x 4. For example an ImageBuffer whose logical size is 200 x 200 is not 160,000 bytes. But it is 166,400. And of course this is not the case with other backend types.
Said Abou-Hallawa
Comment 7 2021-03-12 12:43:32 PST
(In reply to Said Abou-Hallawa from comment #6) > (In reply to Tim Horton from comment #4) > > Also, do we /really/ need to round-trip processes to multiply some numbers :D > > The IOSurface aligns its rows to 64 bytes. So the size is not necessarily = > width x height x 4. > > For example an ImageBuffer whose logical size is 200 x 200 is not 160,000 > bytes. But it is 166,400. And of course this is not the case with other > backend types. The bytesPerRow() for the example above is 832. So the size = 832 * 200 = 166,400 bytes
EWS
Comment 8 2021-03-12 14:20:24 PST
commit-queue failed to commit attachment 423072 [details] to WebKit repository. To retry, please set cq+ flag again.
Said Abou-Hallawa
Comment 9 2021-03-12 14:29:10 PST
EWS
Comment 10 2021-03-12 15:44:02 PST
commit-queue failed to commit attachment 423082 [details] to WebKit repository. To retry, please set cq+ flag again.
Said Abou-Hallawa
Comment 11 2021-03-12 15:55:31 PST
Note You need to log in before you can comment on or make changes to this bug.