Enable GPU channel for in-process Video Capture Service. [chromium/src : main]

1 view
Skip to first unread message

Bo Liu (Gerrit)

unread,
Apr 30, 2026, 11:15:33 AMApr 30
to Sean Li, Bo Liu, vikas soni, Eugene Zemtsov, Chromium LUCI CQ, chromium...@chromium.org
Attention needed from Sean Li

Bo Liu added 1 comment

File content/browser/video_capture_service_impl.cc
Line 83, Patchset 9 (Latest): viz::Gpu::Create(std::move(gpu_remote), GetIOThreadTaskRunner({}));
Bo Liu . unresolved

browser already has a channel to the gpu process, and it's bound on the UI thread I believe:
https://source.chromium.org/chromium/chromium/src/+/main:content/browser/gpu/browser_gpu_channel_host_factory.h;drc=9381f87f8ca50194061da262b82dae609988d974;l=51

can you use that instead?

Open in Gerrit

Related details

Attention is currently required from:
  • Sean Li
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I57296b74d0317757ab4d93f8611d70e4f6933fa2
Gerrit-Change-Number: 7800745
Gerrit-PatchSet: 9
Gerrit-Owner: Sean Li <sea...@google.com>
Gerrit-Reviewer: Bo Liu <bo...@chromium.org>
Gerrit-Reviewer: Sean Li <sea...@google.com>
Gerrit-Reviewer: vikas soni <vika...@chromium.org>
Gerrit-CC: Eugene Zemtsov <eug...@chromium.org>
Gerrit-Attention: Sean Li <sea...@google.com>
Gerrit-Comment-Date: Thu, 30 Apr 2026 15:15:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Sean Li (Gerrit)

unread,
May 2, 2026, 7:51:04 AMMay 2
to Bo Liu, vikas soni, Eugene Zemtsov, Chromium LUCI CQ, chromium...@chromium.org
Attention needed from Bo Liu and vikas soni

Sean Li added 1 comment

File content/browser/video_capture_service_impl.cc
Line 83, Patchset 9 (Latest): viz::Gpu::Create(std::move(gpu_remote), GetIOThreadTaskRunner({}));
Bo Liu . unresolved

browser already has a channel to the gpu process, and it's bound on the UI thread I believe:
https://source.chromium.org/chromium/chromium/src/+/main:content/browser/gpu/browser_gpu_channel_host_factory.h;drc=9381f87f8ca50194061da262b82dae609988d974;l=51

can you use that instead?

Sean Li

Thanks for the suggestion! However, IIUC, the browser's main GPU channel is primarily dedicated to critical components like the UI Compositor and WebGL. I tried to use it for the in-process Video Capture Service but got race conditions and crashes (e.g., SharedImage mailbox not found and waiting on non-existent sync token). This happens because sharing the same GpuChannelHost and underlying SequenceId between the background Video Capture thread and the UI/Compositor thread causes interleaved deferred messages, which breaks the strict ordering of SyncToken release counts required for cross-channel synchronization with the Renderer.

To maintain proper isolation (consistent with the out-of-process path), the in-process service requires its own dedicated GPU channel, which I will establish purely within content/browser via a dedicated viz::GpuClient.

Open in Gerrit

Related details

Attention is currently required from:
  • Bo Liu
  • vikas soni
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I57296b74d0317757ab4d93f8611d70e4f6933fa2
Gerrit-Change-Number: 7800745
Gerrit-PatchSet: 9
Gerrit-Owner: Sean Li <sea...@google.com>
Gerrit-Reviewer: Bo Liu <bo...@chromium.org>
Gerrit-Reviewer: Sean Li <sea...@google.com>
Gerrit-Reviewer: vikas soni <vika...@chromium.org>
Gerrit-CC: Eugene Zemtsov <eug...@chromium.org>
Gerrit-Attention: vikas soni <vika...@chromium.org>
Gerrit-Attention: Bo Liu <bo...@chromium.org>
Gerrit-Comment-Date: Sat, 02 May 2026 11:50:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Bo Liu <bo...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Sean Li (Gerrit)

unread,
May 2, 2026, 7:55:21 AMMay 2
to Bo Liu, vikas soni, Eugene Zemtsov, Chromium LUCI CQ, chromium...@chromium.org
Attention needed from Bo Liu and vikas soni

Sean Li added 1 comment

Patchset-level comments
File-level comment, Patchset 9 (Latest):
Sean Li . unresolved

I am still working on the test failure. Some of the content or browser tests init VCS. However, we don't have GPU process in unit tests, so the test crashes and fails.

This doesn't happen in utility process path. The reason is that we don't really create a real utility process in unit tests, so the test doesn't try to create a channel to GPU process.

Gerrit-Comment-Date: Sat, 02 May 2026 11:54:49 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Sean Li (Gerrit)

unread,
May 4, 2026, 12:25:09 AMMay 4
to D' Psikorption, Bo Liu, vikas soni, Eugene Zemtsov, Chromium LUCI CQ, chromium...@chromium.org
Attention needed from Bo Liu and vikas soni

Sean Li added 1 comment

Patchset-level comments
File-level comment, Patchset 14 (Latest):
Sean Li . unresolved

One other issue:

During the Android browser test (components_browsertests and content_browsertests), tests timed out and unexpectedly deadlocked during teardown due to `ParallelExecutionFence` hanging indefinitely. The deadlock occurs because the process-lifetime or sequence-lifetime singletons (i.e., the base::NoDestructor VCS singleton and the static viz::GpuClient SequenceLocalStorageSlot) eagerly instantiate persistent, active Mojo SimpleWatchers running on background ThreadPool/IO task runners to monitor Mojo pipe health asynchronously. Since the singletons linger beyond the test body execution, the ParallelExecutionFence blocks and waits forever for these background watchers to drain.

Open in Gerrit

Related details

Attention is currently required from:
  • Bo Liu
  • vikas soni
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I57296b74d0317757ab4d93f8611d70e4f6933fa2
Gerrit-Change-Number: 7800745
Gerrit-PatchSet: 14
Gerrit-Owner: Sean Li <sea...@google.com>
Gerrit-Reviewer: Bo Liu <bo...@chromium.org>
Gerrit-Reviewer: Sean Li <sea...@google.com>
Gerrit-Reviewer: vikas soni <vika...@chromium.org>
Gerrit-CC: D' Psikorption <dpsik...@gmail.com>
Gerrit-CC: Eugene Zemtsov <eug...@chromium.org>
Gerrit-Attention: vikas soni <vika...@chromium.org>
Gerrit-Attention: Bo Liu <bo...@chromium.org>
Gerrit-Comment-Date: Mon, 04 May 2026 04:24:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Bo Liu (Gerrit)

unread,
May 4, 2026, 12:47:30 PMMay 4
to Sean Li, D' Psikorption, Bo Liu, vikas soni, Eugene Zemtsov, Chromium LUCI CQ, chromium...@chromium.org
Attention needed from Sean Li and vikas soni

Bo Liu added 5 comments

Patchset-level comments
Bo Liu . resolved

is this still supposed to be WIP?

File content/browser/video_capture_service_impl.cc
Line 83, Patchset 9: viz::Gpu::Create(std::move(gpu_remote), GetIOThreadTaskRunner({}));
Bo Liu . unresolved

browser already has a channel to the gpu process, and it's bound on the UI thread I believe:
https://source.chromium.org/chromium/chromium/src/+/main:content/browser/gpu/browser_gpu_channel_host_factory.h;drc=9381f87f8ca50194061da262b82dae609988d974;l=51

can you use that instead?

Sean Li

Thanks for the suggestion! However, IIUC, the browser's main GPU channel is primarily dedicated to critical components like the UI Compositor and WebGL. I tried to use it for the in-process Video Capture Service but got race conditions and crashes (e.g., SharedImage mailbox not found and waiting on non-existent sync token). This happens because sharing the same GpuChannelHost and underlying SequenceId between the background Video Capture thread and the UI/Compositor thread causes interleaved deferred messages, which breaks the strict ordering of SyncToken release counts required for cross-channel synchronization with the Renderer.

To maintain proper isolation (consistent with the out-of-process path), the in-process service requires its own dedicated GPU channel, which I will establish purely within content/browser via a dedicated viz::GpuClient.

Bo Liu

Thanks for the suggestion! However, IIUC, the browser's main GPU channel is primarily dedicated to critical components like the UI Compositor and WebGL. I tried to use it for the in-process Video Capture Service but got race conditions and crashes (e.g., SharedImage mailbox not found and waiting on non-existent sync token). This happens because sharing the same GpuChannelHost and underlying SequenceId between the background Video Capture thread and the UI/Compositor thread causes interleaved deferred messages, which breaks the strict ordering of SyncToken release counts required for cross-channel synchronization with the Renderer.

Do you have a concrete example of how things break? I don't really have a theory of how things would break.. but then I don't really understand what video capture service does with the gpu channel either. Perhaps there's circular wait? Which I believe gpu/viz side would detect at runtime and then generate errors, rather than actually deadlocking.


To maintain proper isolation (consistent with the out-of-process path), the in-process service requires its own dedicated GPU channel, which I will establish purely within content/browser via a dedicated viz::GpuClient.

Line 127, Patchset 14 (Latest):GetGpuClientSlot() {
Bo Liu . unresolved

there are two SequenceLocalStorageSlot in this file now, should be refactored so they are owned by the same global var

also I highly doubt the SequenceLocal of this.. I assume all of this is accessed from the same thread, and certainly don't want to create multiple gpu channels just based on the sequence, in which case just a regular NoDestructor should be fine

or can have the service be shutdown when all mojo clients go away

File content/public/browser/video_capture_service.h
Line 31, Patchset 14 (Latest):CONTENT_EXPORT void ResetVideoCaptureServiceForTesting();
Bo Liu . unresolved

don't need to be public API unless it's called from outside of content

File content/public/test/content_browser_test.cc
Line 150, Patchset 14 (Latest): // UI thread while SLS is fully alive.
Bo Liu . unresolved

what's that?

Open in Gerrit

Related details

Attention is currently required from:
  • Sean Li
  • vikas soni
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I57296b74d0317757ab4d93f8611d70e4f6933fa2
Gerrit-Change-Number: 7800745
Gerrit-PatchSet: 14
Gerrit-Owner: Sean Li <sea...@google.com>
Gerrit-Reviewer: Bo Liu <bo...@chromium.org>
Gerrit-Reviewer: Sean Li <sea...@google.com>
Gerrit-Reviewer: vikas soni <vika...@chromium.org>
Gerrit-CC: D' Psikorption <dpsik...@gmail.com>
Gerrit-CC: Eugene Zemtsov <eug...@chromium.org>
Gerrit-Attention: Sean Li <sea...@google.com>
Gerrit-Attention: vikas soni <vika...@chromium.org>
Gerrit-Comment-Date: Mon, 04 May 2026 16:47:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Sean Li <sea...@google.com>
Comment-In-Reply-To: Bo Liu <bo...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Sean Li (Gerrit)

unread,
May 11, 2026, 12:21:29 AMMay 11
to vikas soni, Bo Liu, D' Psikorption, Eugene Zemtsov, Chromium LUCI CQ, chromium...@chromium.org
Attention needed from Bo Liu and vikas soni

Sean Li added 1 comment

Patchset-level comments
Bo Liu . resolved

is this still supposed to be WIP?

Sean Li

Yes, I am still working on this to find a better solution.

Open in Gerrit

Related details

Attention is currently required from:
  • Bo Liu
  • vikas soni
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I57296b74d0317757ab4d93f8611d70e4f6933fa2
Gerrit-Change-Number: 7800745
Gerrit-PatchSet: 14
Gerrit-Owner: Sean Li <sea...@google.com>
Gerrit-Reviewer: Sean Li <sea...@google.com>
Gerrit-CC: Bo Liu <bo...@chromium.org>
Gerrit-CC: D' Psikorption <dpsik...@gmail.com>
Gerrit-CC: Eugene Zemtsov <eug...@chromium.org>
Gerrit-CC: vikas soni <vika...@chromium.org>
Gerrit-Attention: vikas soni <vika...@chromium.org>
Gerrit-Attention: Bo Liu <bo...@chromium.org>
Gerrit-Comment-Date: Mon, 11 May 2026 04:20:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Bo Liu <bo...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Sean Li (Gerrit)

unread,
May 11, 2026, 1:16:49 PMMay 11
to Rijubrata Bhaumik, chromium...@chromium.org, chfreme...@chromium.org

Sean Li has uploaded the change for review

Commit message

Enable GPU channel for in-process Video Capture Service.

This CL enables the GPU channel for the Video Capture Service when it
runs in the browser process. This allows the service to access GPU
resources (like `SharedImageInterface`) which are required for features
like Zero-Copy video capture on Android.
Bug: 507208675
Test: Manual test with zero copy on Android
Change-Id: I1ee7cab92ba18f3345e0004801f75b8820252e19

Change diff


Change information

Files:
  • M content/browser/video_capture_service_impl.cc
  • M content/public/common/content_features.cc
  • M services/video_capture/DEPS
  • M services/video_capture/video_capture_service_impl.cc
  • M services/video_capture/video_capture_service_impl.h
Change size: M
Delta: 5 files changed, 77 insertions(+), 20 deletions(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newchange
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I1ee7cab92ba18f3345e0004801f75b8820252e19
    Gerrit-Change-Number: 7836765
    Gerrit-PatchSet: 1
    Gerrit-Owner: Sean Li <sea...@google.com>
    Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Sean Li (Gerrit)

    unread,
    May 12, 2026, 2:55:46 AMMay 12
    to vikas soni, Bo Liu, D' Psikorption, Eugene Zemtsov, Chromium LUCI CQ, chromium...@chromium.org
    Attention needed from Bo Liu and vikas soni

    Sean Li added 2 comments

    File content/public/browser/video_capture_service.h
    Line 31, Patchset 14:CONTENT_EXPORT void ResetVideoCaptureServiceForTesting();
    Bo Liu . resolved

    don't need to be public API unless it's called from outside of content

    Sean Li

    Removed the API.

    File content/public/test/content_browser_test.cc
    Line 150, Patchset 14: // UI thread while SLS is fully alive.
    Bo Liu . resolved

    what's that?

    Sean Li

    Removed it.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Bo Liu
    • vikas soni
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I57296b74d0317757ab4d93f8611d70e4f6933fa2
      Gerrit-Change-Number: 7800745
      Gerrit-PatchSet: 15
      Gerrit-Owner: Sean Li <sea...@google.com>
      Gerrit-Reviewer: Sean Li <sea...@google.com>
      Gerrit-CC: Bo Liu <bo...@chromium.org>
      Gerrit-CC: D' Psikorption <dpsik...@gmail.com>
      Gerrit-CC: Eugene Zemtsov <eug...@chromium.org>
      Gerrit-CC: vikas soni <vika...@chromium.org>
      Gerrit-Attention: vikas soni <vika...@chromium.org>
      Gerrit-Attention: Bo Liu <bo...@chromium.org>
      Gerrit-Comment-Date: Tue, 12 May 2026 06:55:25 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Sean Li (Gerrit)

      unread,
      May 12, 2026, 3:07:30 AMMay 12
      to vikas soni, Bo Liu, D' Psikorption, Eugene Zemtsov, Chromium LUCI CQ, chromium...@chromium.org
      Attention needed from Bo Liu and vikas soni

      Sean Li added 1 comment

      File content/browser/video_capture_service_impl.cc
      Line 83, Patchset 9: viz::Gpu::Create(std::move(gpu_remote), GetIOThreadTaskRunner({}));
      Bo Liu . unresolved

      browser already has a channel to the gpu process, and it's bound on the UI thread I believe:
      https://source.chromium.org/chromium/chromium/src/+/main:content/browser/gpu/browser_gpu_channel_host_factory.h;drc=9381f87f8ca50194061da262b82dae609988d974;l=51

      can you use that instead?

      Sean Li

      Thanks for the suggestion! However, IIUC, the browser's main GPU channel is primarily dedicated to critical components like the UI Compositor and WebGL. I tried to use it for the in-process Video Capture Service but got race conditions and crashes (e.g., SharedImage mailbox not found and waiting on non-existent sync token). This happens because sharing the same GpuChannelHost and underlying SequenceId between the background Video Capture thread and the UI/Compositor thread causes interleaved deferred messages, which breaks the strict ordering of SyncToken release counts required for cross-channel synchronization with the Renderer.

      To maintain proper isolation (consistent with the out-of-process path), the in-process service requires its own dedicated GPU channel, which I will establish purely within content/browser via a dedicated viz::GpuClient.

      Bo Liu

      Thanks for the suggestion! However, IIUC, the browser's main GPU channel is primarily dedicated to critical components like the UI Compositor and WebGL. I tried to use it for the in-process Video Capture Service but got race conditions and crashes (e.g., SharedImage mailbox not found and waiting on non-existent sync token). This happens because sharing the same GpuChannelHost and underlying SequenceId between the background Video Capture thread and the UI/Compositor thread causes interleaved deferred messages, which breaks the strict ordering of SyncToken release counts required for cross-channel synchronization with the Renderer.

      Do you have a concrete example of how things break? I don't really have a theory of how things would break.. but then I don't really understand what video capture service does with the gpu channel either. Perhaps there's circular wait? Which I believe gpu/viz side would detect at runtime and then generate errors, rather than actually deadlocking.


      To maintain proper isolation (consistent with the out-of-process path), the in-process service requires its own dedicated GPU channel, which I will establish purely within content/browser via a dedicated viz::GpuClient.

      Sean Li

      Hi Bo,

      Thanks for the suggestion again. My previous implementation is wrong, and [7836765](https://chromium-review.git.corp.google.com/c/chromium/src/+/7836765) works.

      I think why we can't use `viz::Gpu` for in-process path is because viz::Gpu doesn't destroy the channel to gpu in destructor. Even it has cleanup in destructor, its owner(VideoCaptureServiceImpl) is a NoDestructor, there is no a good timing to destory the channel and make the test failing.

      And for [7836765](https://chromium-review.git.corp.google.com/c/chromium/src/+/7836765), the TODO is to check the recoverable issue when the gpu channel is broken unexpectedly(GPU process crashes). Besides, the lifetime of `VideoCaptureServiceImpl` is longer than the GPU channel in `BrowserGpuChannelHostFactory`. It means that we have to handle the case when the channel is not available.

      Gerrit-Comment-Date: Tue, 12 May 2026 07:07:02 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Bo Liu (Gerrit)

      unread,
      May 12, 2026, 7:11:45 AMMay 12
      to Sean Li, vikas soni, Bo Liu, D' Psikorption, Eugene Zemtsov, Chromium LUCI CQ, chromium...@chromium.org
      Attention needed from Sean Li and vikas soni

      Bo Liu added 1 comment

      Patchset-level comments
      File-level comment, Patchset 15 (Latest):
      Bo Liu . resolved

      is this ready for review now?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Sean Li
      • vikas soni
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I57296b74d0317757ab4d93f8611d70e4f6933fa2
      Gerrit-Change-Number: 7800745
      Gerrit-PatchSet: 15
      Gerrit-Owner: Sean Li <sea...@google.com>
      Gerrit-Reviewer: Sean Li <sea...@google.com>
      Gerrit-CC: Bo Liu <bo...@chromium.org>
      Gerrit-CC: D' Psikorption <dpsik...@gmail.com>
      Gerrit-CC: Eugene Zemtsov <eug...@chromium.org>
      Gerrit-CC: vikas soni <vika...@chromium.org>
      Gerrit-Attention: Sean Li <sea...@google.com>
      Gerrit-Attention: vikas soni <vika...@chromium.org>
      Gerrit-Comment-Date: Tue, 12 May 2026 11:11:41 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Sean Li (Gerrit)

      unread,
      May 13, 2026, 2:10:17 AMMay 13
      to vikas soni, Bo Liu, D' Psikorption, Eugene Zemtsov, Chromium LUCI CQ, chromium...@chromium.org
      Attention needed from Bo Liu and vikas soni

      Sean Li added 4 comments

      Patchset-level comments

      I am still working on the test failure. Some of the content or browser tests init VCS. However, we don't have GPU process in unit tests, so the test crashes and fails.

      This doesn't happen in utility process path. The reason is that we don't really create a real utility process in unit tests, so the test doesn't try to create a channel to GPU process.

      Sean Li

      Done

      One other issue:

      During the Android browser test (components_browsertests and content_browsertests), tests timed out and unexpectedly deadlocked during teardown due to `ParallelExecutionFence` hanging indefinitely. The deadlock occurs because the process-lifetime or sequence-lifetime singletons (i.e., the base::NoDestructor VCS singleton and the static viz::GpuClient SequenceLocalStorageSlot) eagerly instantiate persistent, active Mojo SimpleWatchers running on background ThreadPool/IO task runners to monitor Mojo pipe health asynchronously. Since the singletons linger beyond the test body execution, the ParallelExecutionFence blocks and waits forever for these background watchers to drain.

      Sean Li

      Disable the feature in test.

      File content/browser/video_capture_service_impl.cc
      Line 83, Patchset 9: viz::Gpu::Create(std::move(gpu_remote), GetIOThreadTaskRunner({}));
      Bo Liu . resolved

      browser already has a channel to the gpu process, and it's bound on the UI thread I believe:
      https://source.chromium.org/chromium/chromium/src/+/main:content/browser/gpu/browser_gpu_channel_host_factory.h;drc=9381f87f8ca50194061da262b82dae609988d974;l=51

      can you use that instead?

      Sean Li

      Thanks for the suggestion! However, IIUC, the browser's main GPU channel is primarily dedicated to critical components like the UI Compositor and WebGL. I tried to use it for the in-process Video Capture Service but got race conditions and crashes (e.g., SharedImage mailbox not found and waiting on non-existent sync token). This happens because sharing the same GpuChannelHost and underlying SequenceId between the background Video Capture thread and the UI/Compositor thread causes interleaved deferred messages, which breaks the strict ordering of SyncToken release counts required for cross-channel synchronization with the Renderer.

      To maintain proper isolation (consistent with the out-of-process path), the in-process service requires its own dedicated GPU channel, which I will establish purely within content/browser via a dedicated viz::GpuClient.

      Bo Liu

      Thanks for the suggestion! However, IIUC, the browser's main GPU channel is primarily dedicated to critical components like the UI Compositor and WebGL. I tried to use it for the in-process Video Capture Service but got race conditions and crashes (e.g., SharedImage mailbox not found and waiting on non-existent sync token). This happens because sharing the same GpuChannelHost and underlying SequenceId between the background Video Capture thread and the UI/Compositor thread causes interleaved deferred messages, which breaks the strict ordering of SyncToken release counts required for cross-channel synchronization with the Renderer.

      Do you have a concrete example of how things break? I don't really have a theory of how things would break.. but then I don't really understand what video capture service does with the gpu channel either. Perhaps there's circular wait? Which I believe gpu/viz side would detect at runtime and then generate errors, rather than actually deadlocking.


      To maintain proper isolation (consistent with the out-of-process path), the in-process service requires its own dedicated GPU channel, which I will establish purely within content/browser via a dedicated viz::GpuClient.

      Sean Li

      Hi Bo,

      Thanks for the suggestion again. My previous implementation is wrong, and [7836765](https://chromium-review.git.corp.google.com/c/chromium/src/+/7836765) works.

      I think why we can't use `viz::Gpu` for in-process path is because viz::Gpu doesn't destroy the channel to gpu in destructor. Even it has cleanup in destructor, its owner(VideoCaptureServiceImpl) is a NoDestructor, there is no a good timing to destory the channel and make the test failing.

      And for [7836765](https://chromium-review.git.corp.google.com/c/chromium/src/+/7836765), the TODO is to check the recoverable issue when the gpu channel is broken unexpectedly(GPU process crashes). Besides, the lifetime of `VideoCaptureServiceImpl` is longer than the GPU channel in `BrowserGpuChannelHostFactory`. It means that we have to handle the case when the channel is not available.

      Sean Li

      The life time of existing client(compositor) is shorter than VideoCaptureServiceImpl. I need more time to check whether it can cause a conflict.

      In the same time, [GPU channel establishment is not sync in android](https://source.chromium.org/chromium/chromium/src/+/main:content/browser/gpu/browser_gpu_channel_host_factory.cc;l=325-329;drc=221b0bad9f1ea388055800ebb48f8eff365a89ab). In this case, if gpu channel broken during camera is streaming, the service can be broken. Therefore, I prefer the current implementation and add a TODO here. Thanks.

      Line 127, Patchset 14:GetGpuClientSlot() {
      Bo Liu . resolved

      there are two SequenceLocalStorageSlot in this file now, should be refactored so they are owned by the same global var

      also I highly doubt the SequenceLocal of this.. I assume all of this is accessed from the same thread, and certainly don't want to create multiple gpu channels just based on the sequence, in which case just a regular NoDestructor should be fine

      or can have the service be shutdown when all mojo clients go away

      Sean Li

      I removed them and use NoDestructor instead.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Bo Liu
      • vikas soni
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I57296b74d0317757ab4d93f8611d70e4f6933fa2
        Gerrit-Change-Number: 7800745
        Gerrit-PatchSet: 16
        Gerrit-Owner: Sean Li <sea...@google.com>
        Gerrit-Reviewer: Bo Liu <bo...@chromium.org>
        Gerrit-Reviewer: Sean Li <sea...@google.com>
        Gerrit-Reviewer: vikas soni <vika...@chromium.org>
        Gerrit-CC: D' Psikorption <dpsik...@gmail.com>
        Gerrit-CC: Eugene Zemtsov <eug...@chromium.org>
        Gerrit-Attention: vikas soni <vika...@chromium.org>
        Gerrit-Attention: Bo Liu <bo...@chromium.org>
        Gerrit-Comment-Date: Wed, 13 May 2026 06:09:54 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Dave Tapuska (Gerrit)

        unread,
        May 13, 2026, 9:59:50 AMMay 13
        to Sean Li, vikas soni, Bo Liu, D' Psikorption, Eugene Zemtsov, Chromium LUCI CQ, chromium...@chromium.org
        Attention needed from Bo Liu, Sean Li and vikas soni

        Dave Tapuska added 1 comment

        File content/public/test/browser_test_base.cc
        Line 282, Patchset 17 (Latest): scoped_feature_list_.InitAndDisableFeature(
        Dave Tapuska . unresolved

        This feature is disabled by default already, see https://source.chromium.org/chromium/chromium/src/+/main:media/base/media_switches.cc;l=1128;drc=470d96df224c921a642f6d0d4f623ced20754b2e;bpv=1;bpt=1.

        I don't really care for adding scoped feature lists at the base class here. If we are running into a han on shutdown we should use the TearDown method of this class to clean up anything that we think would hang further test execution.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Bo Liu
        • Sean Li
        • vikas soni
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I57296b74d0317757ab4d93f8611d70e4f6933fa2
          Gerrit-Change-Number: 7800745
          Gerrit-PatchSet: 17
          Gerrit-Owner: Sean Li <sea...@google.com>
          Gerrit-Reviewer: Bo Liu <bo...@chromium.org>
          Gerrit-Reviewer: Dave Tapuska <dtap...@chromium.org>
          Gerrit-Reviewer: Sean Li <sea...@google.com>
          Gerrit-Reviewer: vikas soni <vika...@chromium.org>
          Gerrit-CC: D' Psikorption <dpsik...@gmail.com>
          Gerrit-CC: Eugene Zemtsov <eug...@chromium.org>
          Gerrit-Attention: Sean Li <sea...@google.com>
          Gerrit-Attention: vikas soni <vika...@chromium.org>
          Gerrit-Attention: Bo Liu <bo...@chromium.org>
          Gerrit-Comment-Date: Wed, 13 May 2026 13:59:41 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Bo Liu (Gerrit)

          unread,
          May 13, 2026, 3:47:41 PMMay 13
          to Sean Li, Markus Handell, Dave Tapuska, vikas soni, Bo Liu, D' Psikorption, Eugene Zemtsov, Chromium LUCI CQ, chromium...@chromium.org
          Attention needed from Markus Handell, Sean Li and vikas soni

          Bo Liu added 4 comments

          Patchset-level comments
          File-level comment, Patchset 17 (Latest):
          Bo Liu . resolved

          +handellm to help answer some the questions wrt to VideoCaptureService in open comments

          looking around the actual service code, looks like it calls synchronous establish channel:
          https://source.chromium.org/chromium/chromium/src/+/main:services/video_capture/video_capture_service_impl.cc;drc=eda1bdbd0694acebc51f1e1a7321c72c6e9421ed;l=184

          I think that's just going to deadlock (unless a channel is already created) regardless of which way to go. So sounds like this needs some VideoCaptureService changes required anyway.

          File content/browser/video_capture_service_impl.cc
          Line 81, Patchset 17 (Latest): viz::Gpu::Create(std::move(gpu_remote), GetIOThreadTaskRunner({}));
          Bo Liu . unresolved

          why bind this to IO thread? seems like the service itself is bound to UI thread?

          Line 83, Patchset 9: viz::Gpu::Create(std::move(gpu_remote), GetIOThreadTaskRunner({}));
          Bo Liu . unresolved

          browser already has a channel to the gpu process, and it's bound on the UI thread I believe:
          https://source.chromium.org/chromium/chromium/src/+/main:content/browser/gpu/browser_gpu_channel_host_factory.h;drc=9381f87f8ca50194061da262b82dae609988d974;l=51

          can you use that instead?

          Sean Li

          Thanks for the suggestion! However, IIUC, the browser's main GPU channel is primarily dedicated to critical components like the UI Compositor and WebGL. I tried to use it for the in-process Video Capture Service but got race conditions and crashes (e.g., SharedImage mailbox not found and waiting on non-existent sync token). This happens because sharing the same GpuChannelHost and underlying SequenceId between the background Video Capture thread and the UI/Compositor thread causes interleaved deferred messages, which breaks the strict ordering of SyncToken release counts required for cross-channel synchronization with the Renderer.

          To maintain proper isolation (consistent with the out-of-process path), the in-process service requires its own dedicated GPU channel, which I will establish purely within content/browser via a dedicated viz::GpuClient.

          Bo Liu

          Thanks for the suggestion! However, IIUC, the browser's main GPU channel is primarily dedicated to critical components like the UI Compositor and WebGL. I tried to use it for the in-process Video Capture Service but got race conditions and crashes (e.g., SharedImage mailbox not found and waiting on non-existent sync token). This happens because sharing the same GpuChannelHost and underlying SequenceId between the background Video Capture thread and the UI/Compositor thread causes interleaved deferred messages, which breaks the strict ordering of SyncToken release counts required for cross-channel synchronization with the Renderer.

          Do you have a concrete example of how things break? I don't really have a theory of how things would break.. but then I don't really understand what video capture service does with the gpu channel either. Perhaps there's circular wait? Which I believe gpu/viz side would detect at runtime and then generate errors, rather than actually deadlocking.


          To maintain proper isolation (consistent with the out-of-process path), the in-process service requires its own dedicated GPU channel, which I will establish purely within content/browser via a dedicated viz::GpuClient.

          Sean Li

          Hi Bo,

          Thanks for the suggestion again. My previous implementation is wrong, and [7836765](https://chromium-review.git.corp.google.com/c/chromium/src/+/7836765) works.

          I think why we can't use `viz::Gpu` for in-process path is because viz::Gpu doesn't destroy the channel to gpu in destructor. Even it has cleanup in destructor, its owner(VideoCaptureServiceImpl) is a NoDestructor, there is no a good timing to destory the channel and make the test failing.

          And for [7836765](https://chromium-review.git.corp.google.com/c/chromium/src/+/7836765), the TODO is to check the recoverable issue when the gpu channel is broken unexpectedly(GPU process crashes). Besides, the lifetime of `VideoCaptureServiceImpl` is longer than the GPU channel in `BrowserGpuChannelHostFactory`. It means that we have to handle the case when the channel is not available.

          Sean Li

          The life time of existing client(compositor) is shorter than VideoCaptureServiceImpl. I need more time to check whether it can cause a conflict.

          In the same time, [GPU channel establishment is not sync in android](https://source.chromium.org/chromium/chromium/src/+/main:content/browser/gpu/browser_gpu_channel_host_factory.cc;l=325-329;drc=221b0bad9f1ea388055800ebb48f8eff365a89ab). In this case, if gpu channel broken during camera is streaming, the service can be broken. Therefore, I prefer the current implementation and add a TODO here. Thanks.

          Bo Liu

          its owner(VideoCaptureServiceImpl) is a NoDestructor, there is no a good timing to destory the channel and make the test failing.

          Trying to accommodate tests is not a good reason to decide one way or another. One way is don't leak the service, and actually destroy it when no longer needed. Or have the test do a clean up.

          And for 7836765, the TODO is to check the recoverable issue when the gpu channel is broken unexpectedly(GPU process crashes). Besides, the lifetime of VideoCaptureServiceImpl is longer than the GPU channel in BrowserGpuChannelHostFactory. It means that we have to handle the case when the channel is not available.

          Any client that uses the GPU has to be ready to handle GPU process going away due to a crash or whatever. That doesn't change whether creating a new channel or reusing the existing one.

          The life time of existing client(compositor) is shorter than VideoCaptureServiceImpl. I need more time to check whether it can cause a conflict.

          You get a scoped_refptr<GpuChannel>, so just don't drop the ref and it's fine.

          In the same time, GPU channel establishment is not sync in android. In this case, if gpu channel broken during camera is streaming, the service can be broken.

          What does that have to do with sync vs async? And again, you'll have to deal with GPU crash either way.

          ------

          I'm not saying you have to reuse the existing channel. But I'd at least want some valid reason to reuse or not reuse.

          Line 166, Patchset 17 (Latest): &BindInProcessInstance, std::move(receiver), std::move(gpu_remote));
          Bo Liu . unresolved

          if viz_gpu_bound is already true, then this is just an empty remote?

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Markus Handell
          • Sean Li
          • vikas soni
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I57296b74d0317757ab4d93f8611d70e4f6933fa2
          Gerrit-Change-Number: 7800745
          Gerrit-PatchSet: 17
          Gerrit-Owner: Sean Li <sea...@google.com>
          Gerrit-Reviewer: Bo Liu <bo...@chromium.org>
          Gerrit-Reviewer: Dave Tapuska <dtap...@chromium.org>
          Gerrit-Reviewer: Markus Handell <hand...@google.com>
          Gerrit-Reviewer: Sean Li <sea...@google.com>
          Gerrit-Reviewer: vikas soni <vika...@chromium.org>
          Gerrit-CC: D' Psikorption <dpsik...@gmail.com>
          Gerrit-CC: Eugene Zemtsov <eug...@chromium.org>
          Gerrit-Attention: Sean Li <sea...@google.com>
          Gerrit-Attention: vikas soni <vika...@chromium.org>
          Gerrit-Attention: Markus Handell <hand...@google.com>
          Gerrit-Comment-Date: Wed, 13 May 2026 19:47:31 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Sean Li (Gerrit)

          unread,
          May 14, 2026, 3:53:43 AMMay 14
          to Markus Handell, Dave Tapuska, vikas soni, Bo Liu, D' Psikorption, Eugene Zemtsov, Chromium LUCI CQ, chromium...@chromium.org
          Attention needed from Bo Liu, Dave Tapuska, Markus Handell and vikas soni

          Sean Li added 5 comments

          Patchset-level comments
          Bo Liu . resolved

          +handellm to help answer some the questions wrt to VideoCaptureService in open comments

          looking around the actual service code, looks like it calls synchronous establish channel:
          https://source.chromium.org/chromium/chromium/src/+/main:services/video_capture/video_capture_service_impl.cc;drc=eda1bdbd0694acebc51f1e1a7321c72c6e9421ed;l=184

          I think that's just going to deadlock (unless a channel is already created) regardless of which way to go. So sounds like this needs some VideoCaptureService changes required anyway.

          Sean Li

          I tried it offline on ChromeOS and Android. I kill GPU process and can see GPU channel can be re-establish directly.

          looking around the actual service code, looks like it calls synchronous establish channel

          Yes, currently Video capture service use sync call. If we want to use async call, we have to redefine the state and handling when the gpu channel is broken and reestablish.

          File content/browser/video_capture_service_impl.cc
          Line 81, Patchset 17: viz::Gpu::Create(std::move(gpu_remote), GetIOThreadTaskRunner({}));
          Bo Liu . resolved

          why bind this to IO thread? seems like the service itself is bound to UI thread?

          Sean Li

          IIUC, the internal service side in `viz::Gpu` need an IO thread.

          Sean Li

          Trying to accommodate tests is not a good reason to decide one way or another. One way is don't leak the service, and actually destroy it when no longer needed. Or have the test do a clean up.

          I use a cleanup function for testing instead.

          Any client that uses the GPU has to be ready to handle GPU process going away due to a crash or whatever. That doesn't change whether creating a new channel or reusing the existing one.

          What does that have to do with sync vs async? And again, you'll have to deal with GPU crash either way.

          I think the main issue is, for existing gpu channel for compositor, it's not allowed to be created as sync. Not sure about the context, maybe it's now allowed to block the thread when browser is bringing up in a early stage.

          However, the gpu channel establishment designed for VCS, it's a sync call. And VCS relies on it to do the implementation. If we want to reuse the existing gpu channel for compositor, maybe we have to redefine the behavior when GPU channel is broken.

          Line 166, Patchset 17: &BindInProcessInstance, std::move(receiver), std::move(gpu_remote));
          Bo Liu . resolved

          if viz_gpu_bound is already true, then this is just an empty remote?

          Sean Li

          Yes. I use this to avoid multiple call on `SetVizGpu()`.

          File content/public/test/browser_test_base.cc
          Line 282, Patchset 17: scoped_feature_list_.InitAndDisableFeature(
          Dave Tapuska . resolved

          This feature is disabled by default already, see https://source.chromium.org/chromium/chromium/src/+/main:media/base/media_switches.cc;l=1128;drc=470d96df224c921a642f6d0d4f623ced20754b2e;bpv=1;bpt=1.

          I don't really care for adding scoped feature lists at the base class here. If we are running into a han on shutdown we should use the TearDown method of this class to clean up anything that we think would hang further test execution.

          Attention is currently required from:
          • Bo Liu
          • Dave Tapuska
          • Markus Handell
          • vikas soni
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I57296b74d0317757ab4d93f8611d70e4f6933fa2
          Gerrit-Change-Number: 7800745
          Gerrit-PatchSet: 19
          Gerrit-Owner: Sean Li <sea...@google.com>
          Gerrit-Reviewer: Bo Liu <bo...@chromium.org>
          Gerrit-Reviewer: Dave Tapuska <dtap...@chromium.org>
          Gerrit-Reviewer: Markus Handell <hand...@google.com>
          Gerrit-Reviewer: Sean Li <sea...@google.com>
          Gerrit-Reviewer: vikas soni <vika...@chromium.org>
          Gerrit-CC: D' Psikorption <dpsik...@gmail.com>
          Gerrit-CC: Eugene Zemtsov <eug...@chromium.org>
          Gerrit-Attention: vikas soni <vika...@chromium.org>
          Gerrit-Attention: Markus Handell <hand...@google.com>
          Gerrit-Attention: Bo Liu <bo...@chromium.org>
          Gerrit-Attention: Dave Tapuska <dtap...@chromium.org>
          Gerrit-Comment-Date: Thu, 14 May 2026 07:53:29 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Sean Li <sea...@google.com>
          Comment-In-Reply-To: Bo Liu <bo...@chromium.org>
          Comment-In-Reply-To: Dave Tapuska <dtap...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Sean Li (Gerrit)

          unread,
          May 20, 2026, 7:15:31 AMMay 20
          to Ilya Nikolaevskiy, Dave Tapuska, vikas soni, Bo Liu, D' Psikorption, Eugene Zemtsov, Chromium LUCI CQ, chromium...@chromium.org

          Sean Li abandoned this change.

          View Change

          Abandoned Use 7812614 instead.

          Sean Li abandoned this change

          Related details

          Attention set is empty
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: abandon
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I57296b74d0317757ab4d93f8611d70e4f6933fa2
          Gerrit-Change-Number: 7800745
          Gerrit-PatchSet: 19
          Gerrit-Owner: Sean Li <sea...@google.com>
          Gerrit-Reviewer: Bo Liu <bo...@chromium.org>
          Gerrit-Reviewer: Dave Tapuska <dtap...@chromium.org>
          Gerrit-Reviewer: Ilya Nikolaevskiy <il...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Ilya Nikolaevskiy (Gerrit)

          unread,
          May 20, 2026, 9:43:36 AMMay 20
          to Sean Li, Bo Liu, Henrik Boström, Chromium LUCI CQ, chromium...@chromium.org, Rijubrata Bhaumik, feature-me...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org, chfreme...@chromium.org
          Attention needed from Bo Liu, Henrik Boström and Sean Li

          Ilya Nikolaevskiy added 3 comments

          Patchset-level comments
          File-level comment, Patchset 11 (Latest):
          Ilya Nikolaevskiy . unresolved

          Why is this done differently from other platforms?
          Can you make use of media/capture/video/video_capture_gpu_channel_host.cc?

          The comment states that it's already enabled: https://source.chromium.org/chromium/chromium/src/+/main:services/video_capture/video_capture_service_impl.cc;l=301;drc=3a644a3bda5c62358d9af9bc0705e049d3017375

          File content/browser/video_capture_service_impl.cc
          Line 24, Patchset 11 (Latest):#if BUILDFLAG(IS_ANDROID) && BUILDFLAG(ENABLE_GPU_CHANNEL_MEDIA_CAPTURE)
          Ilya Nikolaevskiy . unresolved

          Do we need it as a build flag? I suggest removing it. The code should be behind some flag, e.g. `kAndroidZeroCopyVideoCapture`.

          Line 83, Patchset 11 (Latest): if (!is_gpu_channel_set) {
          Ilya Nikolaevskiy . unresolved

          This is essentially `if (false)`. The bool is assigned in the previous line. Or am I misreading the code?

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Bo Liu
          • Henrik Boström
          • Sean Li
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I1ee7cab92ba18f3345e0004801f75b8820252e19
          Gerrit-Change-Number: 7836765
          Gerrit-PatchSet: 11
          Gerrit-Owner: Sean Li <sea...@google.com>
          Gerrit-Reviewer: Bo Liu <bo...@chromium.org>
          Gerrit-Reviewer: Henrik Boström <hb...@chromium.org>
          Gerrit-Reviewer: Ilya Nikolaevskiy <il...@chromium.org>
          Gerrit-Reviewer: Sean Li <sea...@google.com>
          Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
          Gerrit-Attention: Sean Li <sea...@google.com>
          Gerrit-Attention: Henrik Boström <hb...@chromium.org>
          Gerrit-Attention: Bo Liu <bo...@chromium.org>
          Gerrit-Comment-Date: Wed, 20 May 2026 13:43:19 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Bo Liu (Gerrit)

          unread,
          May 20, 2026, 12:11:09 PMMay 20
          to Sean Li, Bo Liu, Henrik Boström, Ilya Nikolaevskiy, Chromium LUCI CQ, chromium...@chromium.org, Rijubrata Bhaumik, feature-me...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org, chfreme...@chromium.org
          Attention needed from Henrik Boström and Sean Li

          Bo Liu added 2 comments

          Patchset-level comments
          Ilya Nikolaevskiy . unresolved

          Why is this done differently from other platforms?
          Can you make use of media/capture/video/video_capture_gpu_channel_host.cc?

          The comment states that it's already enabled: https://source.chromium.org/chromium/chromium/src/+/main:services/video_capture/video_capture_service_impl.cc;l=301;drc=3a644a3bda5c62358d9af9bc0705e049d3017375

          Bo Liu

          one technical difficulty is synchronous establish channel here I assume from the browser UI thread:
          https://source.chromium.org/chromium/chromium/src/+/main:services/video_capture/video_capture_service_impl.cc;drc=6921036f402c9e2fecd9f01ea498bb836934a72a;l=186

          is definitely going to deadlock on android *if* it involves starting the GPU process in the call. (It's fine if GPU process is already running, which is probably most cases). That's why it's NOTREACHED for android here:
          https://source.chromium.org/chromium/chromium/src/+/main:content/browser/gpu/browser_gpu_channel_host_factory.cc;drc=6921036f402c9e2fecd9f01ea498bb836934a72a;l=328

          File-level comment, Patchset 12 (Latest):
          Bo Liu . unresolved

          ok, I didn't expect to abandon https://chromium-review.googlesource.com/c/chromium/src/+/7800745 and to have this written

          I expect a discussion of the questions (not necessarily concerns) raised

          the initial question is can and should this service share gpu channel with the compositor or create its own when it's in the browser; I guess this CL answers yes it can, but should it?

          and then need to address the synchronous establish channel for android, regardless of which path to take

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Henrik Boström
          • Sean Li
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I1ee7cab92ba18f3345e0004801f75b8820252e19
          Gerrit-Change-Number: 7836765
          Gerrit-PatchSet: 12
          Gerrit-Owner: Sean Li <sea...@google.com>
          Gerrit-Reviewer: Bo Liu <bo...@chromium.org>
          Gerrit-Reviewer: Henrik Boström <hb...@chromium.org>
          Gerrit-Reviewer: Ilya Nikolaevskiy <il...@chromium.org>
          Gerrit-Reviewer: Sean Li <sea...@google.com>
          Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
          Gerrit-Attention: Sean Li <sea...@google.com>
          Gerrit-Attention: Henrik Boström <hb...@chromium.org>
          Gerrit-Comment-Date: Wed, 20 May 2026 16:11:04 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Ilya Nikolaevskiy <il...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Sean Li (Gerrit)

          unread,
          May 20, 2026, 1:11:54 PMMay 20
          to Bo Liu, Henrik Boström, Ilya Nikolaevskiy, Chromium LUCI CQ, chromium...@chromium.org, Rijubrata Bhaumik, feature-me...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org, chfreme...@chromium.org
          Attention needed from Bo Liu, Henrik Boström and Ilya Nikolaevskiy

          Sean Li added 3 comments

          Patchset-level comments
          Ilya Nikolaevskiy . unresolved

          Why is this done differently from other platforms?
          Can you make use of media/capture/video/video_capture_gpu_channel_host.cc?

          The comment states that it's already enabled: https://source.chromium.org/chromium/chromium/src/+/main:services/video_capture/video_capture_service_impl.cc;l=301;drc=3a644a3bda5c62358d9af9bc0705e049d3017375

          Bo Liu

          one technical difficulty is synchronous establish channel here I assume from the browser UI thread:
          https://source.chromium.org/chromium/chromium/src/+/main:services/video_capture/video_capture_service_impl.cc;drc=6921036f402c9e2fecd9f01ea498bb836934a72a;l=186

          is definitely going to deadlock on android *if* it involves starting the GPU process in the call. (It's fine if GPU process is already running, which is probably most cases). That's why it's NOTREACHED for android here:
          https://source.chromium.org/chromium/chromium/src/+/main:content/browser/gpu/browser_gpu_channel_host_factory.cc;drc=6921036f402c9e2fecd9f01ea498bb836934a72a;l=328

          Sean Li

          Hi Team,

          `VizGpuContextProvider` and `viz::Gpu` was designed for the VCS utility process. I tried to init it in browser process in [7800745](https://chromium-review.git.corp.google.com/c/chromium/src/+/7800745) and it did work in Clank, but failed in tests.

          It failed due to 2 following reasons.
          1. It build the GPU channel synchronously and cause deadlock in tests. [Example run](https://ci.chromium.org/ui/p/chromium/builders/try/android-x86-rel/b8681274751681750625/test-results?q=ExactID%3A%3A%2F%2Fcontent%2Ftest%5C%3Acontent_browsertests%21gtest%3A%3ANetworkServiceBrowserSimpleCacheTest%23HttpCacheWrittenToDiskOnApplicationStateChange+VHash%3A32316f6899274cc2&clean=).
          2. It doesn't release GPU channel and the test watcher regard it as a violation. Even we add them to the destructor, it will not be triggered since the VCS in browser process is a NonDestructor. We have to have some cleanup functions in every tests which will init the VCS.

          Therefore, I think this CL may be a more suitable way to have a GPU channel for VCS in browser process.

          ok, I didn't expect to abandon https://chromium-review.googlesource.com/c/chromium/src/+/7800745 and to have this written

          I expect a discussion of the questions (not necessarily concerns) raised

          the initial question is can and should this service share gpu channel with the compositor or create its own when it's in the browser; I guess this CL answers yes it can, but should it?

          and then need to address the synchronous establish channel for android, regardless of which path to take

          Sean Li

          Hi Bo,

          Sorry for not providing enough context. I think both of the CLs do work but I can't resolve the testing issue in [7800745](https://chromium-review.googlesource.com/c/chromium/src/+/7800745). Therefore, I choose to implement it by reusing the channel in browser process and make Android Video Capture Device adapt the async channel build. I put my conclusion in the other thread.

          File content/browser/video_capture_service_impl.cc
          Line 83, Patchset 11: if (!is_gpu_channel_set) {
          Ilya Nikolaevskiy . resolved

          This is essentially `if (false)`. The bool is assigned in the previous line. Or am I misreading the code?

          Sean Li

          Thanks for the catch.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Bo Liu
          • Henrik Boström
          • Ilya Nikolaevskiy
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I1ee7cab92ba18f3345e0004801f75b8820252e19
          Gerrit-Change-Number: 7836765
          Gerrit-PatchSet: 13
          Gerrit-Owner: Sean Li <sea...@google.com>
          Gerrit-Reviewer: Bo Liu <bo...@chromium.org>
          Gerrit-Reviewer: Henrik Boström <hb...@chromium.org>
          Gerrit-Reviewer: Ilya Nikolaevskiy <il...@chromium.org>
          Gerrit-Reviewer: Sean Li <sea...@google.com>
          Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
          Gerrit-Attention: Henrik Boström <hb...@chromium.org>
          Gerrit-Attention: Bo Liu <bo...@chromium.org>
          Gerrit-Attention: Ilya Nikolaevskiy <il...@chromium.org>
          Gerrit-Comment-Date: Wed, 20 May 2026 17:11:21 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Bo Liu <bo...@chromium.org>
          Comment-In-Reply-To: Ilya Nikolaevskiy <il...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Bo Liu (Gerrit)

          unread,
          May 20, 2026, 4:15:07 PMMay 20
          to Sean Li, Bo Liu, Henrik Boström, Ilya Nikolaevskiy, Chromium LUCI CQ, chromium...@chromium.org, Rijubrata Bhaumik, feature-me...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org, chfreme...@chromium.org
          Attention needed from Henrik Boström, Ilya Nikolaevskiy and Sean Li

          Bo Liu added 1 comment

          Patchset-level comments
          Ilya Nikolaevskiy . unresolved

          Why is this done differently from other platforms?
          Can you make use of media/capture/video/video_capture_gpu_channel_host.cc?

          The comment states that it's already enabled: https://source.chromium.org/chromium/chromium/src/+/main:services/video_capture/video_capture_service_impl.cc;l=301;drc=3a644a3bda5c62358d9af9bc0705e049d3017375

          Bo Liu

          one technical difficulty is synchronous establish channel here I assume from the browser UI thread:
          https://source.chromium.org/chromium/chromium/src/+/main:services/video_capture/video_capture_service_impl.cc;drc=6921036f402c9e2fecd9f01ea498bb836934a72a;l=186

          is definitely going to deadlock on android *if* it involves starting the GPU process in the call. (It's fine if GPU process is already running, which is probably most cases). That's why it's NOTREACHED for android here:
          https://source.chromium.org/chromium/chromium/src/+/main:content/browser/gpu/browser_gpu_channel_host_factory.cc;drc=6921036f402c9e2fecd9f01ea498bb836934a72a;l=328

          Sean Li

          Hi Team,

          `VizGpuContextProvider` and `viz::Gpu` was designed for the VCS utility process. I tried to init it in browser process in [7800745](https://chromium-review.git.corp.google.com/c/chromium/src/+/7800745) and it did work in Clank, but failed in tests.

          It failed due to 2 following reasons.
          1. It build the GPU channel synchronously and cause deadlock in tests. [Example run](https://ci.chromium.org/ui/p/chromium/builders/try/android-x86-rel/b8681274751681750625/test-results?q=ExactID%3A%3A%2F%2Fcontent%2Ftest%5C%3Acontent_browsertests%21gtest%3A%3ANetworkServiceBrowserSimpleCacheTest%23HttpCacheWrittenToDiskOnApplicationStateChange+VHash%3A32316f6899274cc2&clean=).
          2. It doesn't release GPU channel and the test watcher regard it as a violation. Even we add them to the destructor, it will not be triggered since the VCS in browser process is a NonDestructor. We have to have some cleanup functions in every tests which will init the VCS.

          Therefore, I think this CL may be a more suitable way to have a GPU channel for VCS in browser process.

          Bo Liu

          neither should affect the decision to share gpu channel or not

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Henrik Boström
          • Ilya Nikolaevskiy
          • Sean Li
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I1ee7cab92ba18f3345e0004801f75b8820252e19
          Gerrit-Change-Number: 7836765
          Gerrit-PatchSet: 13
          Gerrit-Owner: Sean Li <sea...@google.com>
          Gerrit-Reviewer: Bo Liu <bo...@chromium.org>
          Gerrit-Reviewer: Henrik Boström <hb...@chromium.org>
          Gerrit-Reviewer: Ilya Nikolaevskiy <il...@chromium.org>
          Gerrit-Reviewer: Sean Li <sea...@google.com>
          Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
          Gerrit-Attention: Sean Li <sea...@google.com>
          Gerrit-Attention: Henrik Boström <hb...@chromium.org>
          Gerrit-Attention: Ilya Nikolaevskiy <il...@chromium.org>
          Gerrit-Comment-Date: Wed, 20 May 2026 20:15:00 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Sean Li <sea...@google.com>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Sean Li (Gerrit)

          unread,
          May 21, 2026, 1:29:05 AMMay 21
          to vikas soni, Bo Liu, Henrik Boström, Ilya Nikolaevskiy, Chromium LUCI CQ, chromium...@chromium.org, Rijubrata Bhaumik, feature-me...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org, chfreme...@chromium.org
          Attention needed from Bo Liu, Henrik Boström and Ilya Nikolaevskiy

          Sean Li added 1 comment

          Patchset-level comments
          Ilya Nikolaevskiy . unresolved

          Why is this done differently from other platforms?
          Can you make use of media/capture/video/video_capture_gpu_channel_host.cc?

          The comment states that it's already enabled: https://source.chromium.org/chromium/chromium/src/+/main:services/video_capture/video_capture_service_impl.cc;l=301;drc=3a644a3bda5c62358d9af9bc0705e049d3017375

          Bo Liu

          one technical difficulty is synchronous establish channel here I assume from the browser UI thread:
          https://source.chromium.org/chromium/chromium/src/+/main:services/video_capture/video_capture_service_impl.cc;drc=6921036f402c9e2fecd9f01ea498bb836934a72a;l=186

          is definitely going to deadlock on android *if* it involves starting the GPU process in the call. (It's fine if GPU process is already running, which is probably most cases). That's why it's NOTREACHED for android here:
          https://source.chromium.org/chromium/chromium/src/+/main:content/browser/gpu/browser_gpu_channel_host_factory.cc;drc=6921036f402c9e2fecd9f01ea498bb836934a72a;l=328

          Sean Li

          Hi Team,

          `VizGpuContextProvider` and `viz::Gpu` was designed for the VCS utility process. I tried to init it in browser process in [7800745](https://chromium-review.git.corp.google.com/c/chromium/src/+/7800745) and it did work in Clank, but failed in tests.

          It failed due to 2 following reasons.
          1. It build the GPU channel synchronously and cause deadlock in tests. [Example run](https://ci.chromium.org/ui/p/chromium/builders/try/android-x86-rel/b8681274751681750625/test-results?q=ExactID%3A%3A%2F%2Fcontent%2Ftest%5C%3Acontent_browsertests%21gtest%3A%3ANetworkServiceBrowserSimpleCacheTest%23HttpCacheWrittenToDiskOnApplicationStateChange+VHash%3A32316f6899274cc2&clean=).
          2. It doesn't release GPU channel and the test watcher regard it as a violation. Even we add them to the destructor, it will not be triggered since the VCS in browser process is a NonDestructor. We have to have some cleanup functions in every tests which will init the VCS.

          Therefore, I think this CL may be a more suitable way to have a GPU channel for VCS in browser process.

          Bo Liu

          neither should affect the decision to share gpu channel or not

          Sean Li

          Hi @vika...@chromium.org,

          Do you know if there is any side effect to share a gpu channel. Thanks.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Bo Liu
          • Henrik Boström
          • Ilya Nikolaevskiy
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I1ee7cab92ba18f3345e0004801f75b8820252e19
          Gerrit-Change-Number: 7836765
          Gerrit-PatchSet: 13
          Gerrit-Owner: Sean Li <sea...@google.com>
          Gerrit-Reviewer: Bo Liu <bo...@chromium.org>
          Gerrit-Reviewer: Henrik Boström <hb...@chromium.org>
          Gerrit-Reviewer: Ilya Nikolaevskiy <il...@chromium.org>
          Gerrit-Reviewer: Sean Li <sea...@google.com>
          Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
          Gerrit-CC: vikas soni <vika...@chromium.org>
          Gerrit-Attention: Henrik Boström <hb...@chromium.org>
          Gerrit-Attention: Bo Liu <bo...@chromium.org>
          Gerrit-Attention: Ilya Nikolaevskiy <il...@chromium.org>
          Gerrit-Comment-Date: Thu, 21 May 2026 05:28:43 +0000
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Ilya Nikolaevskiy (Gerrit)

          unread,
          May 21, 2026, 5:11:12 AMMay 21
          to Sean Li, vikas soni, Bo Liu, Henrik Boström, Chromium LUCI CQ, chromium...@chromium.org, Rijubrata Bhaumik, feature-me...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org, chfreme...@chromium.org
          Attention needed from Bo Liu, Henrik Boström and Sean Li

          Ilya Nikolaevskiy added 2 comments

          Patchset-level comments
          Ilya Nikolaevskiy . unresolved

          Why is this done differently from other platforms?
          Can you make use of media/capture/video/video_capture_gpu_channel_host.cc?

          The comment states that it's already enabled: https://source.chromium.org/chromium/chromium/src/+/main:services/video_capture/video_capture_service_impl.cc;l=301;drc=3a644a3bda5c62358d9af9bc0705e049d3017375

          Bo Liu

          one technical difficulty is synchronous establish channel here I assume from the browser UI thread:
          https://source.chromium.org/chromium/chromium/src/+/main:services/video_capture/video_capture_service_impl.cc;drc=6921036f402c9e2fecd9f01ea498bb836934a72a;l=186

          is definitely going to deadlock on android *if* it involves starting the GPU process in the call. (It's fine if GPU process is already running, which is probably most cases). That's why it's NOTREACHED for android here:
          https://source.chromium.org/chromium/chromium/src/+/main:content/browser/gpu/browser_gpu_channel_host_factory.cc;drc=6921036f402c9e2fecd9f01ea498bb836934a72a;l=328

          Sean Li

          Hi Team,

          `VizGpuContextProvider` and `viz::Gpu` was designed for the VCS utility process. I tried to init it in browser process in [7800745](https://chromium-review.git.corp.google.com/c/chromium/src/+/7800745) and it did work in Clank, but failed in tests.

          It failed due to 2 following reasons.
          1. It build the GPU channel synchronously and cause deadlock in tests. [Example run](https://ci.chromium.org/ui/p/chromium/builders/try/android-x86-rel/b8681274751681750625/test-results?q=ExactID%3A%3A%2F%2Fcontent%2Ftest%5C%3Acontent_browsertests%21gtest%3A%3ANetworkServiceBrowserSimpleCacheTest%23HttpCacheWrittenToDiskOnApplicationStateChange+VHash%3A32316f6899274cc2&clean=).
          2. It doesn't release GPU channel and the test watcher regard it as a violation. Even we add them to the destructor, it will not be triggered since the VCS in browser process is a NonDestructor. We have to have some cleanup functions in every tests which will init the VCS.

          Therefore, I think this CL may be a more suitable way to have a GPU channel for VCS in browser process.

          Bo Liu

          neither should affect the decision to share gpu channel or not

          Sean Li

          Hi @vika...@chromium.org,

          Do you know if there is any side effect to share a gpu channel. Thanks.

          Ilya Nikolaevskiy

          Ok, it makes sence, but please document that in a comment. Note that because the capture service is run from the browser process instead of an utility, like on other platforms, a different way of establishing the GPU channel is needed.

          File-level comment, Patchset 13 (Latest):
          Ilya Nikolaevskiy . resolved

          I don't have a strong opinion on which GP

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Bo Liu
          • Henrik Boström
          • Sean Li
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I1ee7cab92ba18f3345e0004801f75b8820252e19
          Gerrit-Change-Number: 7836765
          Gerrit-PatchSet: 13
          Gerrit-Owner: Sean Li <sea...@google.com>
          Gerrit-Reviewer: Bo Liu <bo...@chromium.org>
          Gerrit-Reviewer: Henrik Boström <hb...@chromium.org>
          Gerrit-Reviewer: Ilya Nikolaevskiy <il...@chromium.org>
          Gerrit-Reviewer: Sean Li <sea...@google.com>
          Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
          Gerrit-CC: vikas soni <vika...@chromium.org>
          Gerrit-Attention: Sean Li <sea...@google.com>
          Gerrit-Attention: Henrik Boström <hb...@chromium.org>
          Gerrit-Attention: Bo Liu <bo...@chromium.org>
          Gerrit-Comment-Date: Thu, 21 May 2026 09:10:55 +0000
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          vikas soni (Gerrit)

          unread,
          May 21, 2026, 6:05:07 PMMay 21
          to Sean Li, Bo Liu, Henrik Boström, Ilya Nikolaevskiy, Chromium LUCI CQ, chromium...@chromium.org, Rijubrata Bhaumik, feature-me...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org, chfreme...@chromium.org
          Attention needed from Bo Liu, Henrik Boström and Sean Li

          vikas soni added 1 comment

          Patchset-level comments
          vikas soni

          sorry for the late reply.

          I think sharing a gpu channel seems fine to me. with sharing there will be probably less overhead of creating 2 gpu channels. also mojo should be efficient enough to handle and multiplex tasks from various clients.

          @bo...@chromium.org -> Do you have any particular concerns in sharing the gpu channel. Are there any specific side effects or hidden edge cases we aren't aware of.

          Also establishing the GPU channel asynchronously seems to be the only feasible design for Android to prevent UI thread blocking and eventual deadlocks.

          Overall this CL approach seems fine to me % Bo's concrens.

          Gerrit-Comment-Date: Thu, 21 May 2026 22:04:58 +0000
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Bo Liu (Gerrit)

          unread,
          May 26, 2026, 3:58:10 PMMay 26
          to Sean Li, Code Review Nudger, vikas soni, Bo Liu, Henrik Boström, Ilya Nikolaevskiy, Chromium LUCI CQ, chromium...@chromium.org, Rijubrata Bhaumik, feature-me...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org, chfreme...@chromium.org
          Attention needed from Henrik Boström and Sean Li

          Bo Liu added 1 comment

          File content/browser/video_capture_service_impl.cc
          Line 78, Patchset 13 (Latest): static bool is_gpu_channel_set = false;
          Bo Liu . unresolved

          this reads wrong but that's mostly because of the existing code.. it makes no sense that if this is called a second time, that we simply drop the receiver. but looking at the code, it won't happen because the other side is in a SequenceLocalStorageSlot (so still broken if it's called from multiple threads).. but if there are two global-ish things, then they should really just be merged into one global-ish thing to avoid lifetime issues like this

          for this change, might make sense for service to take gpu::GpuChannelEstablishFactory, which an interface that works in both browser and renderer processes, then have service handle establish channel internally

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Henrik Boström
          • Sean Li
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I1ee7cab92ba18f3345e0004801f75b8820252e19
          Gerrit-Change-Number: 7836765
          Gerrit-PatchSet: 13
          Gerrit-Owner: Sean Li <sea...@google.com>
          Gerrit-Reviewer: Bo Liu <bo...@chromium.org>
          Gerrit-Reviewer: Henrik Boström <hb...@chromium.org>
          Gerrit-Reviewer: Ilya Nikolaevskiy <il...@chromium.org>
          Gerrit-Reviewer: Sean Li <sea...@google.com>
          Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
          Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
          Gerrit-CC: vikas soni <vika...@chromium.org>
          Gerrit-Attention: Sean Li <sea...@google.com>
          Gerrit-Attention: Henrik Boström <hb...@chromium.org>
          Gerrit-Comment-Date: Tue, 26 May 2026 19:58:05 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Sean Li (Gerrit)

          unread,
          Jun 9, 2026, 1:24:43 PMJun 9
          to Code Review Nudger, vikas soni, Bo Liu, Henrik Boström, Ilya Nikolaevskiy, Chromium LUCI CQ, chromium...@chromium.org, Rijubrata Bhaumik, feature-me...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org, chfreme...@chromium.org
          Attention needed from Bo Liu, Henrik Boström, Ilya Nikolaevskiy and Sean Li

          Message from Sean Li

          Set Ready For Review

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Bo Liu
          • Henrik Boström
          • Ilya Nikolaevskiy
          • Sean Li
          Gerrit-Attention: Bo Liu <bo...@chromium.org>
          Gerrit-Attention: Ilya Nikolaevskiy <il...@chromium.org>
          Gerrit-Comment-Date: Tue, 09 Jun 2026 17:24:09 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Sean Li (Gerrit)

          unread,
          Jun 9, 2026, 1:31:34 PMJun 9
          to Code Review Nudger, vikas soni, Bo Liu, Henrik Boström, Ilya Nikolaevskiy, Chromium LUCI CQ, chromium...@chromium.org, Rijubrata Bhaumik, feature-me...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org, chfreme...@chromium.org
          Attention needed from Bo Liu, Henrik Boström and Ilya Nikolaevskiy

          Sean Li added 1 comment

          File content/browser/video_capture_service_impl.cc
          Line 78, Patchset 13 (Latest): static bool is_gpu_channel_set = false;
          Bo Liu . unresolved

          this reads wrong but that's mostly because of the existing code.. it makes no sense that if this is called a second time, that we simply drop the receiver. but looking at the code, it won't happen because the other side is in a SequenceLocalStorageSlot (so still broken if it's called from multiple threads).. but if there are two global-ish things, then they should really just be merged into one global-ish thing to avoid lifetime issues like this

          for this change, might make sense for service to take gpu::GpuChannelEstablishFactory, which an interface that works in both browser and renderer processes, then have service handle establish channel internally

          Sean Li

          Yes, I did consider this.

          However, [gpu_workarounds](https://source.chromium.org/chromium/chromium/src/+/main:services/video_capture/video_capture_service_impl.cc;l=324-333?q=video_capture%2Fvideo_capture_service_impl.cc&ss=chromium%2Fchromium%2Fsrc) have to be ready before we create the VCD factory. If we let service take gpu::GpuChannelEstablishFactory and get `gpu_channel_host` async in the service, there can be a race condition.

          Therefore, the implementation here is to make sure `gpu_channel_host` always ready when VideoCaptureService is created.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Bo Liu
          • Henrik Boström
          • Ilya Nikolaevskiy
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I1ee7cab92ba18f3345e0004801f75b8820252e19
          Gerrit-Change-Number: 7836765
          Gerrit-PatchSet: 13
          Gerrit-Owner: Sean Li <sea...@google.com>
          Gerrit-Reviewer: Bo Liu <bo...@chromium.org>
          Gerrit-Reviewer: Henrik Boström <hb...@chromium.org>
          Gerrit-Reviewer: Ilya Nikolaevskiy <il...@chromium.org>
          Gerrit-Reviewer: Sean Li <sea...@google.com>
          Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
          Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
          Gerrit-CC: vikas soni <vika...@chromium.org>
          Gerrit-Attention: Henrik Boström <hb...@chromium.org>
          Gerrit-Attention: Bo Liu <bo...@chromium.org>
          Gerrit-Attention: Ilya Nikolaevskiy <il...@chromium.org>
          Gerrit-Comment-Date: Tue, 09 Jun 2026 17:30:49 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Bo Liu <bo...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Bo Liu (Gerrit)

          unread,
          Jun 10, 2026, 4:29:49 PMJun 10
          to Sean Li, Code Review Nudger, vikas soni, Bo Liu, Henrik Boström, Ilya Nikolaevskiy, Chromium LUCI CQ, chromium...@chromium.org, Rijubrata Bhaumik, feature-me...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org, chfreme...@chromium.org
          Attention needed from Henrik Boström, Ilya Nikolaevskiy and Sean Li

          Bo Liu added 1 comment

          File content/browser/video_capture_service_impl.cc
          Line 78, Patchset 13 (Latest): static bool is_gpu_channel_set = false;
          Bo Liu . unresolved

          this reads wrong but that's mostly because of the existing code.. it makes no sense that if this is called a second time, that we simply drop the receiver. but looking at the code, it won't happen because the other side is in a SequenceLocalStorageSlot (so still broken if it's called from multiple threads).. but if there are two global-ish things, then they should really just be merged into one global-ish thing to avoid lifetime issues like this

          for this change, might make sense for service to take gpu::GpuChannelEstablishFactory, which an interface that works in both browser and renderer processes, then have service handle establish channel internally

          Sean Li

          Yes, I did consider this.

          However, [gpu_workarounds](https://source.chromium.org/chromium/chromium/src/+/main:services/video_capture/video_capture_service_impl.cc;l=324-333?q=video_capture%2Fvideo_capture_service_impl.cc&ss=chromium%2Fchromium%2Fsrc) have to be ready before we create the VCD factory. If we let service take gpu::GpuChannelEstablishFactory and get `gpu_channel_host` async in the service, there can be a race condition.

          Therefore, the implementation here is to make sure `gpu_channel_host` always ready when VideoCaptureService is created.

          Bo Liu

          gpu info can change though, and it is handled (but on win only? odd..)
          https://source.chromium.org/chromium/chromium/src/+/main:services/video_capture/video_capture_service_impl.cc;drc=d635c024a266e5abb2e1b8a68fe6a4fa7f7c5755;l=393

          but maybe having no GpuChannelHost and invalid gpu info/workaround is a new state for service, but it sounds easier to manage than having creation of the initial channel here, but then have service handle creation on gpu crash?

          maybe video pcature owners want to chime in here?

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Henrik Boström
          • Ilya Nikolaevskiy
          • Sean Li
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I1ee7cab92ba18f3345e0004801f75b8820252e19
          Gerrit-Change-Number: 7836765
          Gerrit-PatchSet: 13
          Gerrit-Owner: Sean Li <sea...@google.com>
          Gerrit-Reviewer: Bo Liu <bo...@chromium.org>
          Gerrit-Reviewer: Henrik Boström <hb...@chromium.org>
          Gerrit-Reviewer: Ilya Nikolaevskiy <il...@chromium.org>
          Gerrit-Reviewer: Sean Li <sea...@google.com>
          Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
          Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
          Gerrit-CC: vikas soni <vika...@chromium.org>
          Gerrit-Attention: Sean Li <sea...@google.com>
          Gerrit-Attention: Henrik Boström <hb...@chromium.org>
          Gerrit-Attention: Ilya Nikolaevskiy <il...@chromium.org>
          Gerrit-Comment-Date: Wed, 10 Jun 2026 20:29:29 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Sean Li (Gerrit)

          unread,
          Jun 24, 2026, 8:12:31 PMJun 24
          to Code Review Nudger, vikas soni, Bo Liu, Henrik Boström, Ilya Nikolaevskiy, Chromium LUCI CQ, chromium...@chromium.org, Rijubrata Bhaumik, feature-me...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org, chfreme...@chromium.org
          Attention needed from Bo Liu, Henrik Boström and Ilya Nikolaevskiy

          Sean Li added 1 comment

          File content/browser/video_capture_service_impl.cc
          Line 78, Patchset 13 (Latest): static bool is_gpu_channel_set = false;
          Bo Liu . unresolved

          this reads wrong but that's mostly because of the existing code.. it makes no sense that if this is called a second time, that we simply drop the receiver. but looking at the code, it won't happen because the other side is in a SequenceLocalStorageSlot (so still broken if it's called from multiple threads).. but if there are two global-ish things, then they should really just be merged into one global-ish thing to avoid lifetime issues like this

          for this change, might make sense for service to take gpu::GpuChannelEstablishFactory, which an interface that works in both browser and renderer processes, then have service handle establish channel internally

          Sean Li

          Yes, I did consider this.

          However, [gpu_workarounds](https://source.chromium.org/chromium/chromium/src/+/main:services/video_capture/video_capture_service_impl.cc;l=324-333?q=video_capture%2Fvideo_capture_service_impl.cc&ss=chromium%2Fchromium%2Fsrc) have to be ready before we create the VCD factory. If we let service take gpu::GpuChannelEstablishFactory and get `gpu_channel_host` async in the service, there can be a race condition.

          Therefore, the implementation here is to make sure `gpu_channel_host` always ready when VideoCaptureService is created.

          Bo Liu

          gpu info can change though, and it is handled (but on win only? odd..)
          https://source.chromium.org/chromium/chromium/src/+/main:services/video_capture/video_capture_service_impl.cc;drc=d635c024a266e5abb2e1b8a68fe6a4fa7f7c5755;l=393

          but maybe having no GpuChannelHost and invalid gpu info/workaround is a new state for service, but it sounds easier to manage than having creation of the initial channel here, but then have service handle creation on gpu crash?

          maybe video pcature owners want to chime in here?

          Sean Li

          Hi Ilya,

          Do you have any concern on the behavior of this CL? I think maybe we can land this CL with a TODO and add a new state for invalid gpu info later?

          Thanks!

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Bo Liu
          • Henrik Boström
          • Ilya Nikolaevskiy
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I1ee7cab92ba18f3345e0004801f75b8820252e19
          Gerrit-Change-Number: 7836765
          Gerrit-PatchSet: 13
          Gerrit-Owner: Sean Li <sea...@google.com>
          Gerrit-Reviewer: Bo Liu <bo...@chromium.org>
          Gerrit-Reviewer: Henrik Boström <hb...@chromium.org>
          Gerrit-Reviewer: Ilya Nikolaevskiy <il...@chromium.org>
          Gerrit-Reviewer: Sean Li <sea...@google.com>
          Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
          Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
          Gerrit-CC: vikas soni <vika...@chromium.org>
          Gerrit-Attention: Henrik Boström <hb...@chromium.org>
          Gerrit-Attention: Bo Liu <bo...@chromium.org>
          Gerrit-Attention: Ilya Nikolaevskiy <il...@chromium.org>
          Gerrit-Comment-Date: Thu, 25 Jun 2026 00:11:54 +0000
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Ilya Nikolaevskiy (Gerrit)

          unread,
          Jun 25, 2026, 4:19:28 AMJun 25
          to Sean Li, Code Review Nudger, vikas soni, Bo Liu, Henrik Boström, Chromium LUCI CQ, chromium...@chromium.org, Rijubrata Bhaumik, feature-me...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org, chfreme...@chromium.org
          Attention needed from Bo Liu, Henrik Boström and Sean Li

          Ilya Nikolaevskiy added 1 comment

          File content/browser/video_capture_service_impl.cc
          Line 78, Patchset 13 (Latest): static bool is_gpu_channel_set = false;
          Bo Liu . unresolved

          this reads wrong but that's mostly because of the existing code.. it makes no sense that if this is called a second time, that we simply drop the receiver. but looking at the code, it won't happen because the other side is in a SequenceLocalStorageSlot (so still broken if it's called from multiple threads).. but if there are two global-ish things, then they should really just be merged into one global-ish thing to avoid lifetime issues like this

          for this change, might make sense for service to take gpu::GpuChannelEstablishFactory, which an interface that works in both browser and renderer processes, then have service handle establish channel internally

          Sean Li

          Yes, I did consider this.

          However, [gpu_workarounds](https://source.chromium.org/chromium/chromium/src/+/main:services/video_capture/video_capture_service_impl.cc;l=324-333?q=video_capture%2Fvideo_capture_service_impl.cc&ss=chromium%2Fchromium%2Fsrc) have to be ready before we create the VCD factory. If we let service take gpu::GpuChannelEstablishFactory and get `gpu_channel_host` async in the service, there can be a race condition.

          Therefore, the implementation here is to make sure `gpu_channel_host` always ready when VideoCaptureService is created.

          Bo Liu

          gpu info can change though, and it is handled (but on win only? odd..)
          https://source.chromium.org/chromium/chromium/src/+/main:services/video_capture/video_capture_service_impl.cc;drc=d635c024a266e5abb2e1b8a68fe6a4fa7f7c5755;l=393

          but maybe having no GpuChannelHost and invalid gpu info/workaround is a new state for service, but it sounds easier to manage than having creation of the initial channel here, but then have service handle creation on gpu crash?

          maybe video pcature owners want to chime in here?

          Sean Li

          Hi Ilya,

          Do you have any concern on the behavior of this CL? I think maybe we can land this CL with a TODO and add a new state for invalid gpu info later?

          Thanks!

          Ilya Nikolaevskiy

          The gpuinfo change is handled on windows because there's no GPU connection there. Yet the capturer produces textures, so it has to be informed about possible GPU Adapter change.

          If we have the connection to he GPU service in the VideoCaptureService, there's no need to inform it about the change externally. It can monitor the context loss internally for GPU infor change. However, if it uses SharedImageInterface instead of managing textures itself, there's no need to even monitor the GPUInfo change. The GPU service owns SIs, so capture doesn't need to do anything: it will just call SI methods and images will be created on the apropriate adapter inside GPU service. Some SIs would become invalid and some error handling will be needed, but that's a small issue.

          Since the end goal of this project is to use SharedImageInterface, I think all we have to do is ensure that the connection is reestablished on the context loss.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Bo Liu
          • Henrik Boström
          • Sean Li
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I1ee7cab92ba18f3345e0004801f75b8820252e19
          Gerrit-Change-Number: 7836765
          Gerrit-PatchSet: 13
          Gerrit-Owner: Sean Li <sea...@google.com>
          Gerrit-Reviewer: Bo Liu <bo...@chromium.org>
          Gerrit-Reviewer: Henrik Boström <hb...@chromium.org>
          Gerrit-Reviewer: Ilya Nikolaevskiy <il...@chromium.org>
          Gerrit-Reviewer: Sean Li <sea...@google.com>
          Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
          Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
          Gerrit-CC: vikas soni <vika...@chromium.org>
          Gerrit-Attention: Sean Li <sea...@google.com>
          Gerrit-Attention: Henrik Boström <hb...@chromium.org>
          Gerrit-Attention: Bo Liu <bo...@chromium.org>
          Gerrit-Comment-Date: Thu, 25 Jun 2026 08:19:10 +0000
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Sean Li (Gerrit)

          unread,
          Jun 26, 2026, 3:45:49 AM (13 days ago) Jun 26
          to Code Review Nudger, vikas soni, Bo Liu, Henrik Boström, Ilya Nikolaevskiy, Chromium LUCI CQ, chromium...@chromium.org, Rijubrata Bhaumik, feature-me...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org, chfreme...@chromium.org
          Attention needed from Bo Liu, Henrik Boström and Ilya Nikolaevskiy

          Sean Li added 1 comment

          File content/browser/video_capture_service_impl.cc
          Line 78, Patchset 13 (Latest): static bool is_gpu_channel_set = false;
          Bo Liu . unresolved

          this reads wrong but that's mostly because of the existing code.. it makes no sense that if this is called a second time, that we simply drop the receiver. but looking at the code, it won't happen because the other side is in a SequenceLocalStorageSlot (so still broken if it's called from multiple threads).. but if there are two global-ish things, then they should really just be merged into one global-ish thing to avoid lifetime issues like this

          for this change, might make sense for service to take gpu::GpuChannelEstablishFactory, which an interface that works in both browser and renderer processes, then have service handle establish channel internally

          Sean Li

          Yes, I did consider this.

          However, [gpu_workarounds](https://source.chromium.org/chromium/chromium/src/+/main:services/video_capture/video_capture_service_impl.cc;l=324-333?q=video_capture%2Fvideo_capture_service_impl.cc&ss=chromium%2Fchromium%2Fsrc) have to be ready before we create the VCD factory. If we let service take gpu::GpuChannelEstablishFactory and get `gpu_channel_host` async in the service, there can be a race condition.

          Therefore, the implementation here is to make sure `gpu_channel_host` always ready when VideoCaptureService is created.

          Bo Liu

          gpu info can change though, and it is handled (but on win only? odd..)
          https://source.chromium.org/chromium/chromium/src/+/main:services/video_capture/video_capture_service_impl.cc;drc=d635c024a266e5abb2e1b8a68fe6a4fa7f7c5755;l=393

          but maybe having no GpuChannelHost and invalid gpu info/workaround is a new state for service, but it sounds easier to manage than having creation of the initial channel here, but then have service handle creation on gpu crash?

          maybe video pcature owners want to chime in here?

          Sean Li

          Hi Ilya,

          Do you have any concern on the behavior of this CL? I think maybe we can land this CL with a TODO and add a new state for invalid gpu info later?

          Thanks!

          Ilya Nikolaevskiy

          The gpuinfo change is handled on windows because there's no GPU connection there. Yet the capturer produces textures, so it has to be informed about possible GPU Adapter change.

          If we have the connection to he GPU service in the VideoCaptureService, there's no need to inform it about the change externally. It can monitor the context loss internally for GPU infor change. However, if it uses SharedImageInterface instead of managing textures itself, there's no need to even monitor the GPUInfo change. The GPU service owns SIs, so capture doesn't need to do anything: it will just call SI methods and images will be created on the apropriate adapter inside GPU service. Some SIs would become invalid and some error handling will be needed, but that's a small issue.

          Since the end goal of this project is to use SharedImageInterface, I think all we have to do is ensure that the connection is reestablished on the context loss.

          Sean Li

          Thanks for the context. Currently Android VCD doesn't use GPUInfo, so we only need to reset SharedImageInterface when gpu channel lost.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Bo Liu
          • Henrik Boström
          • Ilya Nikolaevskiy
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I1ee7cab92ba18f3345e0004801f75b8820252e19
          Gerrit-Change-Number: 7836765
          Gerrit-PatchSet: 13
          Gerrit-Owner: Sean Li <sea...@google.com>
          Gerrit-Reviewer: Bo Liu <bo...@chromium.org>
          Gerrit-Reviewer: Henrik Boström <hb...@chromium.org>
          Gerrit-Reviewer: Ilya Nikolaevskiy <il...@chromium.org>
          Gerrit-Reviewer: Sean Li <sea...@google.com>
          Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
          Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
          Gerrit-CC: vikas soni <vika...@chromium.org>
          Gerrit-Attention: Henrik Boström <hb...@chromium.org>
          Gerrit-Attention: Bo Liu <bo...@chromium.org>
          Gerrit-Attention: Ilya Nikolaevskiy <il...@chromium.org>
          Gerrit-Comment-Date: Fri, 26 Jun 2026 07:45:15 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Sean Li <sea...@google.com>
          Comment-In-Reply-To: Bo Liu <bo...@chromium.org>
          Comment-In-Reply-To: Ilya Nikolaevskiy <il...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Sean Li (Gerrit)

          unread,
          Jun 26, 2026, 6:27:06 AM (13 days ago) Jun 26
          to Code Review Nudger, vikas soni, Bo Liu, Henrik Boström, Ilya Nikolaevskiy, Chromium LUCI CQ, chromium...@chromium.org, Rijubrata Bhaumik, feature-me...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org, chfreme...@chromium.org
          Attention needed from Bo Liu, Henrik Boström, Ilya Nikolaevskiy and vikas soni

          Sean Li added 3 comments

          Patchset-level comments
          File-level comment, Patchset 11:
          Ilya Nikolaevskiy . resolved
          Sean Li

          Done

          File content/browser/video_capture_service_impl.cc
          Line 24, Patchset 11:#if BUILDFLAG(IS_ANDROID) && BUILDFLAG(ENABLE_GPU_CHANNEL_MEDIA_CAPTURE)
          Ilya Nikolaevskiy . resolved

          Do we need it as a build flag? I suggest removing it. The code should be behind some flag, e.g. `kAndroidZeroCopyVideoCapture`.

          Sean Li

          Hi Ilya,

          Are you refer to `ENABLE_GPU_CHANNEL_MEDIA_CAPTURE`? If so, I think we still need it, because IIUC, some OS(e.g. cast OS) doesn't support gpu channel and it will cause a compile error.

          Line 78, Patchset 13: static bool is_gpu_channel_set = false;
          Bo Liu . resolved

          this reads wrong but that's mostly because of the existing code.. it makes no sense that if this is called a second time, that we simply drop the receiver. but looking at the code, it won't happen because the other side is in a SequenceLocalStorageSlot (so still broken if it's called from multiple threads).. but if there are two global-ish things, then they should really just be merged into one global-ish thing to avoid lifetime issues like this

          for this change, might make sense for service to take gpu::GpuChannelEstablishFactory, which an interface that works in both browser and renderer processes, then have service handle establish channel internally

          Sean Li

          Yes, I did consider this.

          However, [gpu_workarounds](https://source.chromium.org/chromium/chromium/src/+/main:services/video_capture/video_capture_service_impl.cc;l=324-333?q=video_capture%2Fvideo_capture_service_impl.cc&ss=chromium%2Fchromium%2Fsrc) have to be ready before we create the VCD factory. If we let service take gpu::GpuChannelEstablishFactory and get `gpu_channel_host` async in the service, there can be a race condition.

          Therefore, the implementation here is to make sure `gpu_channel_host` always ready when VideoCaptureService is created.

          Bo Liu

          gpu info can change though, and it is handled (but on win only? odd..)
          https://source.chromium.org/chromium/chromium/src/+/main:services/video_capture/video_capture_service_impl.cc;drc=d635c024a266e5abb2e1b8a68fe6a4fa7f7c5755;l=393

          but maybe having no GpuChannelHost and invalid gpu info/workaround is a new state for service, but it sounds easier to manage than having creation of the initial channel here, but then have service handle creation on gpu crash?

          maybe video pcature owners want to chime in here?

          Sean Li

          Hi Ilya,

          Do you have any concern on the behavior of this CL? I think maybe we can land this CL with a TODO and add a new state for invalid gpu info later?

          Thanks!

          Ilya Nikolaevskiy

          The gpuinfo change is handled on windows because there's no GPU connection there. Yet the capturer produces textures, so it has to be informed about possible GPU Adapter change.

          If we have the connection to he GPU service in the VideoCaptureService, there's no need to inform it about the change externally. It can monitor the context loss internally for GPU infor change. However, if it uses SharedImageInterface instead of managing textures itself, there's no need to even monitor the GPUInfo change. The GPU service owns SIs, so capture doesn't need to do anything: it will just call SI methods and images will be created on the apropriate adapter inside GPU service. Some SIs would become invalid and some error handling will be needed, but that's a small issue.

          Since the end goal of this project is to use SharedImageInterface, I think all we have to do is ensure that the connection is reestablished on the context loss.

          Sean Li

          Thanks for the context. Currently Android VCD doesn't use GPUInfo, so we only need to reset SharedImageInterface when gpu channel lost.

          Sean Li

          Added 2 TODOs.

          1. The lifetime issue of the in-process VCS.
          2. Make Android VCD adapt to asynchronously fetching `gpu_workarounds` so that we can handle all GPU channel initialization internally within the service.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Bo Liu
          • Henrik Boström
          • Ilya Nikolaevskiy
          • vikas soni
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement is not satisfiedCode-Owners
            • requirement is not satisfiedCode-Review
            • requirement is not satisfiedReview-Enforcement
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: I1ee7cab92ba18f3345e0004801f75b8820252e19
            Gerrit-Change-Number: 7836765
            Gerrit-PatchSet: 14
            Gerrit-Owner: Sean Li <sea...@google.com>
            Gerrit-Reviewer: Bo Liu <bo...@chromium.org>
            Gerrit-Reviewer: Henrik Boström <hb...@chromium.org>
            Gerrit-Reviewer: Ilya Nikolaevskiy <il...@chromium.org>
            Gerrit-Reviewer: Sean Li <sea...@google.com>
            Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
            Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
            Gerrit-CC: vikas soni <vika...@chromium.org>
            Gerrit-Attention: vikas soni <vika...@chromium.org>
            Gerrit-Attention: Henrik Boström <hb...@chromium.org>
            Gerrit-Attention: Bo Liu <bo...@chromium.org>
            Gerrit-Attention: Ilya Nikolaevskiy <il...@chromium.org>
            Gerrit-Comment-Date: Fri, 26 Jun 2026 10:26:30 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Sean Li <sea...@google.com>
            Comment-In-Reply-To: vikas soni <vika...@chromium.org>
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Ilya Nikolaevskiy (Gerrit)

            unread,
            Jul 7, 2026, 4:09:40 AM (2 days ago) Jul 7
            to Sean Li, Eugene Zemtsov, Code Review Nudger, vikas soni, Bo Liu, Henrik Boström, Chromium LUCI CQ, chromium...@chromium.org, Rijubrata Bhaumik, feature-me...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org, chfreme...@chromium.org
            Attention needed from Bo Liu, Henrik Boström, Sean Li and vikas soni

            Ilya Nikolaevskiy voted Code-Review+1

            Code-Review+1
            Open in Gerrit

            Related details

            Attention is currently required from:
            • Bo Liu
            • Henrik Boström
            • Sean Li
            • vikas soni
            Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement is not satisfiedCode-Owners
              • requirement satisfiedCode-Review
              • requirement satisfiedReview-Enforcement
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: comment
              Gerrit-Project: chromium/src
              Gerrit-Branch: main
              Gerrit-Change-Id: I1ee7cab92ba18f3345e0004801f75b8820252e19
              Gerrit-Change-Number: 7836765
              Gerrit-PatchSet: 16
              Gerrit-Owner: Sean Li <sea...@google.com>
              Gerrit-Reviewer: Bo Liu <bo...@chromium.org>
              Gerrit-Reviewer: Henrik Boström <hb...@chromium.org>
              Gerrit-Reviewer: Ilya Nikolaevskiy <il...@chromium.org>
              Gerrit-Reviewer: Sean Li <sea...@google.com>
              Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
              Gerrit-CC: Eugene Zemtsov <eug...@chromium.org>
              Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
              Gerrit-CC: vikas soni <vika...@chromium.org>
              Gerrit-Attention: Sean Li <sea...@google.com>
              Gerrit-Attention: vikas soni <vika...@chromium.org>
              Gerrit-Attention: Henrik Boström <hb...@chromium.org>
              Gerrit-Attention: Bo Liu <bo...@chromium.org>
              Gerrit-Comment-Date: Tue, 07 Jul 2026 08:09:22 +0000
              Gerrit-HasComments: No
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Sean Li (Gerrit)

              unread,
              6:57 AM (7 hours ago) 6:57 AM
              to Daniel Cheng, Avi Drissman, Ilya Nikolaevskiy, Eugene Zemtsov, Code Review Nudger, vikas soni, Bo Liu, Chromium LUCI CQ, chromium...@chromium.org, Rijubrata Bhaumik, feature-me...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org, chfreme...@chromium.org
              Attention needed from Avi Drissman, Bo Liu, Daniel Cheng and vikas soni

              Sean Li added 1 comment

              Patchset-level comments
              File-level comment, Patchset 16 (Latest):
              Sean Li . resolved

              Hi Daniel and Avi,

              Could you help to take a look since Henrik is on a parental leave? Thanks!

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Avi Drissman
              • Bo Liu
              • Daniel Cheng
              • vikas soni
              Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement is not satisfiedCode-Owners
              • requirement satisfiedCode-Review
              • requirement satisfiedReview-Enforcement
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: comment
              Gerrit-Project: chromium/src
              Gerrit-Branch: main
              Gerrit-Change-Id: I1ee7cab92ba18f3345e0004801f75b8820252e19
              Gerrit-Change-Number: 7836765
              Gerrit-PatchSet: 16
              Gerrit-Owner: Sean Li <sea...@google.com>
              Gerrit-Reviewer: Avi Drissman <a...@chromium.org>
              Gerrit-Reviewer: Bo Liu <bo...@chromium.org>
              Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
              Gerrit-Reviewer: Ilya Nikolaevskiy <il...@chromium.org>
              Gerrit-Reviewer: Sean Li <sea...@google.com>
              Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
              Gerrit-CC: Eugene Zemtsov <eug...@chromium.org>
              Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
              Gerrit-CC: vikas soni <vika...@chromium.org>
              Gerrit-Attention: vikas soni <vika...@chromium.org>
              Gerrit-Attention: Avi Drissman <a...@chromium.org>
              Gerrit-Attention: Bo Liu <bo...@chromium.org>
              Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
              Gerrit-Comment-Date: Thu, 09 Jul 2026 10:57:22 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Avi Drissman (Gerrit)

              unread,
              12:02 PM (2 hours ago) 12:02 PM
              to Sean Li, Avi Drissman, Daniel Cheng, Ilya Nikolaevskiy, Eugene Zemtsov, Code Review Nudger, vikas soni, Bo Liu, Chromium LUCI CQ, chromium...@chromium.org, Rijubrata Bhaumik, feature-me...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org, chfreme...@chromium.org
              Attention needed from Bo Liu, Daniel Cheng, Sean Li and vikas soni

              Avi Drissman voted and added 1 comment

              Votes added by Avi Drissman

              Code-Review+1

              1 comment

              Patchset-level comments
              Avi Drissman . resolved

              stamp experts

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Bo Liu
              • Daniel Cheng
              • Sean Li
              • vikas soni
              Gerrit-Attention: Sean Li <sea...@google.com>
              Gerrit-Attention: vikas soni <vika...@chromium.org>
              Gerrit-Attention: Bo Liu <bo...@chromium.org>
              Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
              Gerrit-Comment-Date: Thu, 09 Jul 2026 16:01:53 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Daniel Cheng (Gerrit)

              unread,
              12:50 PM (1 hour ago) 12:50 PM
              to Sean Li, Daniel Cheng, Avi Drissman, Ilya Nikolaevskiy, Eugene Zemtsov, Code Review Nudger, vikas soni, Bo Liu, Chromium LUCI CQ, chromium...@chromium.org, Rijubrata Bhaumik, feature-me...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org, chfreme...@chromium.org
              Attention needed from Bo Liu, Sean Li and vikas soni

              Daniel Cheng voted and added 2 comments

              Votes added by Daniel Cheng

              Code-Review+1

              2 comments

              Patchset-level comments
              Daniel Cheng . resolved

              Mostly a stamp but with one request for comments.

              File services/video_capture/video_capture_service_impl.cc
              Line 244, Patchset 16 (Latest):// internally within the service.
              Daniel Cheng . unresolved

              Nit: it looks like this class lives on multiple threads; it would be nice if there was a class that described the lifetime/threading requirements for this class

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Bo Liu
              • Sean Li
              • vikas soni
              Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement satisfiedCode-Owners
              • requirement satisfiedCode-Review
              • requirement is not satisfiedNo-Unresolved-Comments
              • requirement satisfiedReview-Enforcement
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: comment
              Gerrit-Project: chromium/src
              Gerrit-Branch: main
              Gerrit-Change-Id: I1ee7cab92ba18f3345e0004801f75b8820252e19
              Gerrit-Change-Number: 7836765
              Gerrit-PatchSet: 16
              Gerrit-Owner: Sean Li <sea...@google.com>
              Gerrit-Reviewer: Avi Drissman <a...@chromium.org>
              Gerrit-Reviewer: Bo Liu <bo...@chromium.org>
              Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
              Gerrit-Reviewer: Ilya Nikolaevskiy <il...@chromium.org>
              Gerrit-Reviewer: Sean Li <sea...@google.com>
              Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
              Gerrit-CC: Eugene Zemtsov <eug...@chromium.org>
              Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
              Gerrit-CC: vikas soni <vika...@chromium.org>
              Gerrit-Attention: Sean Li <sea...@google.com>
              Gerrit-Attention: vikas soni <vika...@chromium.org>
              Gerrit-Attention: Bo Liu <bo...@chromium.org>
              Gerrit-Comment-Date: Thu, 09 Jul 2026 16:50:13 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy
              Reply all
              Reply to author
              Forward
              0 new messages