cobalt: Move VideoGeometrySetterService on gpu thread#8962
cobalt: Move VideoGeometrySetterService on gpu thread#8962borongc merged 1 commit intoyoutube:mainfrom
Conversation
🤖 Gemini Suggested Commit Message💡 Pro Tips for a Better Commit Message:
|
fefd10f to
4dd9666
Compare
There was a problem hiding this comment.
Code Review
This pull request successfully moves the VideoGeometrySetterService from the browser process to the GPU process, which should improve performance by reducing IPC overhead. The changes are logical and follow the description. I've found a few areas for improvement: a duplicate dependency, a simplification in a constructor, and a potential behavioral change in how video geometry is calculated that should be reviewed.
3890379 to
ff107d6
Compare
sideb0ard
left a comment
There was a problem hiding this comment.
This looks great. Do we have any measurement to show the difference in performance and IPC overhead?
Latency BreakdownThe "1ms savings" comes from the elimination of the cross-process IPC hop from the Compositor to the Browser. End-to-End Latency Comparison
Jitter & Stability
ConclusionBy moving the service to the GPU process, the architecture effectively saved ~1ms of average latency per frame. More importantly, it removed the dependency on the Browser UI thread, preventing frames from arriving late due to UI-related processing spikes. |
Awallky
left a comment
There was a problem hiding this comment.
Would it be possible to set up a cobalt-specific subclasses of content_gpu_client and gpu_service_factory?
It would make future rebases a bit easier in the future if we just subclass them instead of adding to the content layer.
Probably it's not easy as Chromium core code path has this function. Let me know if you think there is a better way to do this. |
Relocate the VideoGeometrySetterService from the browser process to the GPU process. This change instantiates the service within the CobaltContentGpuClient, allowing it to be managed directly on the GPU thread. This improves performance and reduces IPC overhead for video geometry updates by co-locating the service closer to the GPU and compositing operations. The StarboardRendererWrapper now directly subscribes to video geometry changes from this local service. Mojo communications: - Before: viz (gpu) --> browser thread --> StarboardRendererClient (media) --> StarboardRendererWrapper (gpu) - After: viz (gpu) --> StarboardRendererWrapper (gpu) Note this is called nearly per UI frame update. Issue: 405424096
ff107d6 to
6b7eab9
Compare
Relocate the VideoGeometrySetterService from the browser process to the GPU process. This change instantiates the service within the CobaltContentGpuClient, allowing it to be managed directly on the GPU thread. This improves performance and reduces IPC overhead for video geometry updates by co-locating the service closer to the GPU and compositing operations. The StarboardRendererWrapper now directly subscribes to video geometry changes from this local service. Mojo communications: - Before: viz (gpu) --> browser thread --> StarboardRendererClient (media) --> StarboardRendererWrapper (gpu) - After: viz (gpu) --> StarboardRendererWrapper (gpu) Note this is called nearly per UI frame update. Issue: 405424096 (cherry picked from commit d1376b1)
Relocate the VideoGeometrySetterService from the browser process to the GPU process. This change instantiates the service within the CobaltContentGpuClient, allowing it to be managed directly on the GPU thread. This improves performance and reduces IPC overhead for video geometry updates by co-locating the service closer to the GPU and compositing operations. The StarboardRendererWrapper now directly subscribes to video geometry changes from this local service. Mojo communications: - Before: viz (gpu) --> browser thread --> StarboardRendererClient (media) --> StarboardRendererWrapper (gpu) - After: viz (gpu) --> StarboardRendererWrapper (gpu) Note this is called nearly per UI frame update. Issue: 405424096 (cherry picked from commit d1376b1)
Relocate the VideoGeometrySetterService from the browser process to the GPU process. This change instantiates the service within the CobaltContentGpuClient, allowing it to be managed directly on the GPU thread. This improves performance and reduces IPC overhead for video geometry updates by co-locating the service closer to the GPU and compositing operations. The StarboardRendererWrapper now directly subscribes to video geometry changes from this local service. Mojo communications: - Before: viz (gpu) --> browser thread --> StarboardRendererClient (media) --> StarboardRendererWrapper (gpu) - After: viz (gpu) --> StarboardRendererWrapper (gpu) Note this is called nearly per UI frame update. Issue: 405424096 (cherry picked from commit d1376b1)
Relocate the VideoGeometrySetterService from the browser process to the GPU process. This change instantiates the service within the CobaltContentGpuClient, allowing it to be managed directly on the GPU thread. This improves performance and reduces IPC overhead for video geometry updates by co-locating the service closer to the GPU and compositing operations. The StarboardRendererWrapper now directly subscribes to video geometry changes from this local service. Mojo communications: - Before: viz (gpu) --> browser thread --> StarboardRendererClient (media) --> StarboardRendererWrapper (gpu) - After: viz (gpu) --> StarboardRendererWrapper (gpu) Note this is called nearly per UI frame update. Issue: 405424096 (cherry picked from commit d1376b1)
Relocate the VideoGeometrySetterService from the browser process to
the GPU process. This change instantiates the service within the
CobaltContentGpuClient, allowing it to be managed directly on the GPU
thread.
This improves performance and reduces IPC overhead for video geometry
updates by co-locating the service closer to the GPU and compositing
operations. The StarboardRendererWrapper now directly subscribes to
video geometry changes from this local service.
Mojo communications:
Note this is called nearly per UI frame update.
Issue: 405424096