[media] Avoid resource reuse in RenderableMappableSIVFPool if lost [chromium/src : main]

0 views
Skip to first unread message

Saifuddin Hitawala (Gerrit)

unread,
Mar 20, 2026, 9:49:31 AM (3 days ago) Mar 20
to Vasiliy Telezhnikov, Dale Curtis, Colin Blundell, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org
Attention needed from Colin Blundell, Dale Curtis and Vasiliy Telezhnikov

Saifuddin Hitawala added 1 comment

Patchset-level comments
File-level comment, Patchset 8 (Latest):
Saifuddin Hitawala . resolved

Please take a look.

Open in Gerrit

Related details

Attention is currently required from:
  • Colin Blundell
  • Dale Curtis
  • Vasiliy Telezhnikov
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: I66ecd855f9877c4a0aa76e8ad89f64718084ac31
Gerrit-Change-Number: 7681879
Gerrit-PatchSet: 8
Gerrit-Owner: Saifuddin Hitawala <hita...@chromium.org>
Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Saifuddin Hitawala <hita...@chromium.org>
Gerrit-Reviewer: Vasiliy Telezhnikov <vas...@chromium.org>
Gerrit-Attention: Colin Blundell <blun...@chromium.org>
Gerrit-Attention: Vasiliy Telezhnikov <vas...@chromium.org>
Gerrit-Attention: Dale Curtis <dalec...@chromium.org>
Gerrit-Comment-Date: Fri, 20 Mar 2026 13:49:26 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Colin Blundell (Gerrit)

unread,
Mar 20, 2026, 10:18:11 AM (3 days ago) Mar 20
to Saifuddin Hitawala, Vasiliy Telezhnikov, Dale Curtis, Colin Blundell, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org
Attention needed from Dale Curtis, Saifuddin Hitawala and Vasiliy Telezhnikov

Colin Blundell added 3 comments

Commit Message
Line 22, Patchset 8 (Latest):This change fixes it by plumbing a lost resource signal from the
Colin Blundell . unresolved

I don't quite follow the description here: the above paragraph indicates that the bug is that the client is writing to the SI while the DisplayCompositor is still reading from it, but this paragraph outlines the fix as plumbing through a signal that the DisplayCompositor sends only as part of its callback indicating that it is *done* with its read?

File media/base/video_frame.cc
Line 386, Patchset 8 (Latest): if (shared_image_release_cb) {
Colin Blundell . unresolved

Why this change?

Line 468, Patchset 8 (Latest): if (shared_image_release_cb) {
Colin Blundell . unresolved

Why this change?

Open in Gerrit

Related details

Attention is currently required from:
  • Dale Curtis
  • Saifuddin Hitawala
  • Vasiliy Telezhnikov
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: I66ecd855f9877c4a0aa76e8ad89f64718084ac31
    Gerrit-Change-Number: 7681879
    Gerrit-PatchSet: 8
    Gerrit-Owner: Saifuddin Hitawala <hita...@chromium.org>
    Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
    Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
    Gerrit-Reviewer: Saifuddin Hitawala <hita...@chromium.org>
    Gerrit-Reviewer: Vasiliy Telezhnikov <vas...@chromium.org>
    Gerrit-Attention: Saifuddin Hitawala <hita...@chromium.org>
    Gerrit-Attention: Vasiliy Telezhnikov <vas...@chromium.org>
    Gerrit-Attention: Dale Curtis <dalec...@chromium.org>
    Gerrit-Comment-Date: Fri, 20 Mar 2026 14:17:58 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Colin Blundell (Gerrit)

    unread,
    Mar 20, 2026, 10:18:21 AM (3 days ago) Mar 20
    to Saifuddin Hitawala, Vasiliy Telezhnikov, Dale Curtis, Colin Blundell, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org
    Attention needed from Dale Curtis, Saifuddin Hitawala and Vasiliy Telezhnikov

    Colin Blundell added 1 comment

    Patchset-level comments
    Colin Blundell . resolved

    Thanks for working on this!

    Gerrit-Comment-Date: Fri, 20 Mar 2026 14:18:09 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Saifuddin Hitawala (Gerrit)

    unread,
    Mar 20, 2026, 10:47:03 AM (3 days ago) Mar 20
    to Vasiliy Telezhnikov, Dale Curtis, Colin Blundell, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org
    Attention needed from Colin Blundell, Dale Curtis and Vasiliy Telezhnikov

    Saifuddin Hitawala added 2 comments

    Commit Message
    Line 22, Patchset 8 (Latest):This change fixes it by plumbing a lost resource signal from the
    Colin Blundell . unresolved

    I don't quite follow the description here: the above paragraph indicates that the bug is that the client is writing to the SI while the DisplayCompositor is still reading from it, but this paragraph outlines the fix as plumbing through a signal that the DisplayCompositor sends only as part of its callback indicating that it is *done* with its read?

    Saifuddin Hitawala

    Sorry for the confusion. I believe before the frame resource is reused, it is marked as lost resource by the Display Compositor after Display Compositor is done with it. But I am actually not sure if the Display Compositor is really done with it? Maybe it is still being used somewhere in the viz pipeline. @vas...@chromium.org do you know?

    And then when it is added back to reuse it is overwritten.

    File media/base/video_frame.cc
    Line 386, Patchset 8 (Latest): if (shared_image_release_cb) {
    Colin Blundell . unresolved

    Why this change?

    Saifuddin Hitawala

    I needed this because now it goes through the overloaded `SetReleaseMailboxCB` which adapts and returns a non-null wrapper on L#1438 always and so it is set. And so I was hitting the `DCHECK(release_mailbox_cb)`. I could instead just move this inside SetReleaseMailboxCB.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Colin Blundell
    • Dale Curtis
    • Vasiliy Telezhnikov
    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: I66ecd855f9877c4a0aa76e8ad89f64718084ac31
    Gerrit-Change-Number: 7681879
    Gerrit-PatchSet: 8
    Gerrit-Owner: Saifuddin Hitawala <hita...@chromium.org>
    Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
    Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
    Gerrit-Reviewer: Saifuddin Hitawala <hita...@chromium.org>
    Gerrit-Reviewer: Vasiliy Telezhnikov <vas...@chromium.org>
    Gerrit-Attention: Colin Blundell <blun...@chromium.org>
    Gerrit-Attention: Vasiliy Telezhnikov <vas...@chromium.org>
    Gerrit-Attention: Dale Curtis <dalec...@chromium.org>
    Gerrit-Comment-Date: Fri, 20 Mar 2026 14:46:58 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Colin Blundell <blun...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Vasiliy Telezhnikov (Gerrit)

    unread,
    Mar 20, 2026, 11:04:00 AM (3 days ago) Mar 20
    to Saifuddin Hitawala, Dale Curtis, Colin Blundell, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org
    Attention needed from Colin Blundell, Dale Curtis and Saifuddin Hitawala

    Vasiliy Telezhnikov added 2 comments

    Patchset-level comments
    Vasiliy Telezhnikov . resolved

    (didn't look at the cl in details yet, just answering comment)

    Commit Message
    Line 22, Patchset 8 (Latest):This change fixes it by plumbing a lost resource signal from the
    Colin Blundell . unresolved

    I don't quite follow the description here: the above paragraph indicates that the bug is that the client is writing to the SI while the DisplayCompositor is still reading from it, but this paragraph outlines the fix as plumbing through a signal that the DisplayCompositor sends only as part of its callback indicating that it is *done* with its read?

    Saifuddin Hitawala

    Sorry for the confusion. I believe before the frame resource is reused, it is marked as lost resource by the Display Compositor after Display Compositor is done with it. But I am actually not sure if the Display Compositor is really done with it? Maybe it is still being used somewhere in the viz pipeline. @vas...@chromium.org do you know?

    And then when it is added back to reuse it is overwritten.

    Vasiliy Telezhnikov

    So when we export resource to display compositor, we pass callback which usually says that display compositor is done with the resource. Callback is carefully threaded through a long pipeline.

    But there are cases when we unable to receive callback, e.g if we are about to close mojo channel that is used to deliver this callback from the gpu process. There are other cases when we close the window for example.

    When it happens, it's our last chance to tell client that things are gone, but due to asynchronous nature of the display compositor, it can't stop using resources immediately, so we can't force it.

    That lead to the situation where display compositor is still using the resource, but it's unable to tell when it's done anymore. To live with it, there is concept of lost resources. We tell clients that "We are unable to determine when this resource will be safe to re-use, so don't reuse it".

    This signal wasn't plumbed through the video frame, which wasn't a problem until we started rendering to it.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Colin Blundell
    • Dale Curtis
    • Saifuddin Hitawala
    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: I66ecd855f9877c4a0aa76e8ad89f64718084ac31
    Gerrit-Change-Number: 7681879
    Gerrit-PatchSet: 8
    Gerrit-Owner: Saifuddin Hitawala <hita...@chromium.org>
    Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
    Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
    Gerrit-Reviewer: Saifuddin Hitawala <hita...@chromium.org>
    Gerrit-Reviewer: Vasiliy Telezhnikov <vas...@chromium.org>
    Gerrit-Attention: Saifuddin Hitawala <hita...@chromium.org>
    Gerrit-Attention: Colin Blundell <blun...@chromium.org>
    Gerrit-Attention: Dale Curtis <dalec...@chromium.org>
    Gerrit-Comment-Date: Fri, 20 Mar 2026 15:03:55 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Saifuddin Hitawala <hita...@chromium.org>
    Comment-In-Reply-To: Colin Blundell <blun...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Colin Blundell (Gerrit)

    unread,
    Mar 20, 2026, 11:17:11 AM (3 days ago) Mar 20
    to Saifuddin Hitawala, Colin Blundell, Vasiliy Telezhnikov, Dale Curtis, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org
    Attention needed from Dale Curtis and Saifuddin Hitawala

    Colin Blundell voted and added 4 comments

    Votes added by Colin Blundell

    Code-Review+1

    4 comments

    Patchset-level comments
    Colin Blundell . resolved

    Thanks!

    Commit Message
    Line 22, Patchset 8 (Latest):This change fixes it by plumbing a lost resource signal from the
    Colin Blundell . unresolved

    I don't quite follow the description here: the above paragraph indicates that the bug is that the client is writing to the SI while the DisplayCompositor is still reading from it, but this paragraph outlines the fix as plumbing through a signal that the DisplayCompositor sends only as part of its callback indicating that it is *done* with its read?

    Saifuddin Hitawala

    Sorry for the confusion. I believe before the frame resource is reused, it is marked as lost resource by the Display Compositor after Display Compositor is done with it. But I am actually not sure if the Display Compositor is really done with it? Maybe it is still being used somewhere in the viz pipeline. @vas...@chromium.org do you know?

    And then when it is added back to reuse it is overwritten.

    Vasiliy Telezhnikov

    So when we export resource to display compositor, we pass callback which usually says that display compositor is done with the resource. Callback is carefully threaded through a long pipeline.

    But there are cases when we unable to receive callback, e.g if we are about to close mojo channel that is used to deliver this callback from the gpu process. There are other cases when we close the window for example.

    When it happens, it's our last chance to tell client that things are gone, but due to asynchronous nature of the display compositor, it can't stop using resources immediately, so we can't force it.

    That lead to the situation where display compositor is still using the resource, but it's unable to tell when it's done anymore. To live with it, there is concept of lost resources. We tell clients that "We are unable to determine when this resource will be safe to re-use, so don't reuse it".

    This signal wasn't plumbed through the video frame, which wasn't a problem until we started rendering to it.

    Colin Blundell

    Ah got it, thanks. `lost_resource` here is really "resource is lost to YOU (the client) because I (display compositor) am not done with it *now* and will no longer be able to inform you when I *am* done with it". Worth extending the CL description with this info.

    File media/base/video_frame.cc
    Line 386, Patchset 8 (Latest): if (shared_image_release_cb) {
    Colin Blundell . resolved

    Why this change?

    Saifuddin Hitawala

    I needed this because now it goes through the overloaded `SetReleaseMailboxCB` which adapts and returns a non-null wrapper on L#1438 always and so it is set. And so I was hitting the `DCHECK(release_mailbox_cb)`. I could instead just move this inside SetReleaseMailboxCB.

    Colin Blundell

    Thanks, that makes sense! Leaving it here sounds good.

    Line 468, Patchset 8 (Latest): if (shared_image_release_cb) {
    Colin Blundell . resolved

    Why this change?

    Colin Blundell

    Acknowledged

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Dale Curtis
    • Saifuddin Hitawala
    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: I66ecd855f9877c4a0aa76e8ad89f64718084ac31
    Gerrit-Change-Number: 7681879
    Gerrit-PatchSet: 8
    Gerrit-Owner: Saifuddin Hitawala <hita...@chromium.org>
    Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
    Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
    Gerrit-Reviewer: Saifuddin Hitawala <hita...@chromium.org>
    Gerrit-Reviewer: Vasiliy Telezhnikov <vas...@chromium.org>
    Gerrit-Attention: Saifuddin Hitawala <hita...@chromium.org>
    Gerrit-Attention: Dale Curtis <dalec...@chromium.org>
    Gerrit-Comment-Date: Fri, 20 Mar 2026 15:16:54 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Saifuddin Hitawala <hita...@chromium.org>
    Comment-In-Reply-To: Colin Blundell <blun...@chromium.org>
    Comment-In-Reply-To: Vasiliy Telezhnikov <vas...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Saifuddin Hitawala (Gerrit)

    unread,
    Mar 20, 2026, 11:47:45 AM (3 days ago) Mar 20
    to Colin Blundell, Vasiliy Telezhnikov, Dale Curtis, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org
    Attention needed from Dale Curtis and Vasiliy Telezhnikov

    Saifuddin Hitawala voted and added 2 comments

    Votes added by Saifuddin Hitawala

    Commit-Queue+2

    2 comments

    Patchset-level comments
    File-level comment, Patchset 9 (Latest):
    Saifuddin Hitawala . resolved

    Thanks for the review!

    Commit Message
    Line 22, Patchset 8:This change fixes it by plumbing a lost resource signal from the
    Colin Blundell . resolved

    I don't quite follow the description here: the above paragraph indicates that the bug is that the client is writing to the SI while the DisplayCompositor is still reading from it, but this paragraph outlines the fix as plumbing through a signal that the DisplayCompositor sends only as part of its callback indicating that it is *done* with its read?

    Saifuddin Hitawala

    Sorry for the confusion. I believe before the frame resource is reused, it is marked as lost resource by the Display Compositor after Display Compositor is done with it. But I am actually not sure if the Display Compositor is really done with it? Maybe it is still being used somewhere in the viz pipeline. @vas...@chromium.org do you know?

    And then when it is added back to reuse it is overwritten.

    Vasiliy Telezhnikov

    So when we export resource to display compositor, we pass callback which usually says that display compositor is done with the resource. Callback is carefully threaded through a long pipeline.

    But there are cases when we unable to receive callback, e.g if we are about to close mojo channel that is used to deliver this callback from the gpu process. There are other cases when we close the window for example.

    When it happens, it's our last chance to tell client that things are gone, but due to asynchronous nature of the display compositor, it can't stop using resources immediately, so we can't force it.

    That lead to the situation where display compositor is still using the resource, but it's unable to tell when it's done anymore. To live with it, there is concept of lost resources. We tell clients that "We are unable to determine when this resource will be safe to re-use, so don't reuse it".

    This signal wasn't plumbed through the video frame, which wasn't a problem until we started rendering to it.

    Colin Blundell

    Ah got it, thanks. `lost_resource` here is really "resource is lost to YOU (the client) because I (display compositor) am not done with it *now* and will no longer be able to inform you when I *am* done with it". Worth extending the CL description with this info.

    Saifuddin Hitawala

    Thanks for the details! Yes that all makes sense, there's just too many callbacks to keep track of here. I've updated the description with an extra paragraph on this and how lost resource is tracked.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Dale Curtis
    • Vasiliy Telezhnikov
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement 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: I66ecd855f9877c4a0aa76e8ad89f64718084ac31
      Gerrit-Change-Number: 7681879
      Gerrit-PatchSet: 9
      Gerrit-Owner: Saifuddin Hitawala <hita...@chromium.org>
      Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
      Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
      Gerrit-Reviewer: Saifuddin Hitawala <hita...@chromium.org>
      Gerrit-Reviewer: Vasiliy Telezhnikov <vas...@chromium.org>
      Gerrit-Attention: Vasiliy Telezhnikov <vas...@chromium.org>
      Gerrit-Attention: Dale Curtis <dalec...@chromium.org>
      Gerrit-Comment-Date: Fri, 20 Mar 2026 15:47:38 +0000
      satisfied_requirement
      open
      diffy

      Chromium LUCI CQ (Gerrit)

      unread,
      Mar 20, 2026, 11:51:04 AM (3 days ago) Mar 20
      to Saifuddin Hitawala, Colin Blundell, Vasiliy Telezhnikov, Dale Curtis, chromium...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org

      Chromium LUCI CQ submitted the change

      Unreviewed changes

      8 is the latest approved patch-set.
      No files were changed between the latest approved patch-set and the submitted one.

      Change information

      Commit message:
      [media] Avoid resource reuse in RenderableMappableSIVFPool if lost

      On Google Meet with background effects and a Picture-in-Picture
      extension, the video flickers due to a race condition in how the
      VideoFrames are recycled.

      With background effects, VideoFrames use RenderableMappableSIVFPool
      which reuses SharedImages for performance. The issue arises when a
      VideoFrame is returned to the pool because the VideoFrameSubmitter
      and VideoResourceUpdater are destroyed (PiP extension stops sending
      frames if Meet is also on on same window), while the Display
      Compositor is still reading from it. If the SharedImage is reused by
      the pool, it gets overwritten and then there's a mix of old and new
      frame data being displayed which causes flickering.

      Display Compositor usually sends a callback to clients which says it
      is done with the resource. But sometimes the callback is not run
      because of breakages in pipeline (mojo channel lost etc.). In such
      cases DisplayCompositor tells the clients that the SharedImage resource
      is lost and not to reuse it. This tells the clients to not reuse the
      resource, but the DisplayCompositor might be still using it and the
      display Compositor will not be able to tell the clients anymore about
      when it will be done with it. This becomes a problem as VideoFrame is
      reused for rendering and overwriting the resource for Meet effects in
      RenderableMappableSIVFPool.

      This change fixes it by plumbing the lost resource signal from the
      Display Compositor to the RenderableMappableSIVFPool to prevent its
      reuse. A tracking lost resource member is added on VideoFrame which is
      set on ReuseTexture which is a callback that is run by viz Display
      Compositor. This is then plumbed over new
      ReleaseMailboxCBWithLostResource callback type to the
      RenderableMappableSIVFPool which checks if resource is lost before
      reusing it in OnVideoFrameDestroyed.

      Tested locally on mac with PiP extension making sure the fix works
      as expected.
      Bug: 465745561
      Change-Id: I66ecd855f9877c4a0aa76e8ad89f64718084ac31
      Reviewed-by: Colin Blundell <blun...@chromium.org>
      Commit-Queue: Saifuddin Hitawala <hita...@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#1602650}
      Files:
      • M media/base/video_frame.cc
      • M media/base/video_frame.h
      • M media/renderers/video_resource_updater.cc
      • M media/renderers/video_resource_updater.h
      • M media/video/renderable_mappable_shared_image_video_frame_pool.cc
      Change size: M
      Delta: 5 files changed, 82 insertions(+), 35 deletions(-)
      Branch: refs/heads/main
      Submit Requirements:
      • requirement satisfiedCode-Review: +1 by Colin Blundell
      Open in Gerrit
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: merged
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I66ecd855f9877c4a0aa76e8ad89f64718084ac31
      Gerrit-Change-Number: 7681879
      Gerrit-PatchSet: 10
      Gerrit-Owner: Saifuddin Hitawala <hita...@chromium.org>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
      Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
      Gerrit-Reviewer: Saifuddin Hitawala <hita...@chromium.org>
      Gerrit-Reviewer: Vasiliy Telezhnikov <vas...@chromium.org>
      open
      diffy
      satisfied_requirement

      Dale Curtis (Gerrit)

      unread,
      Mar 22, 2026, 4:43:39 PM (yesterday) Mar 22
      to Saifuddin Hitawala, Chromium LUCI CQ, Colin Blundell, Vasiliy Telezhnikov, chromium...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org
      Attention needed from Saifuddin Hitawala

      Dale Curtis added 2 comments

      File media/base/video_frame.cc
      Line 1460, Patchset 10 (Latest):void VideoFrame::SetLostSharedImageResource(bool lost_si_resource) {
      Dale Curtis . unresolved

      How is this thread safe? We usually try to avoid mutable carrying state on VideoFrame since it may be held in many places at once.y7

      File media/video/renderable_mappable_shared_image_video_frame_pool.cc
      Line 354, Patchset 10 (Latest): if (lost_shared_image_resource) {
      Dale Curtis . unresolved

      Seems like there should be a way for the pool to get this information directly since it created the SharedImage in the first place?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Saifuddin Hitawala
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement 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: I66ecd855f9877c4a0aa76e8ad89f64718084ac31
      Gerrit-Change-Number: 7681879
      Gerrit-PatchSet: 10
      Gerrit-Owner: Saifuddin Hitawala <hita...@chromium.org>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
      Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
      Gerrit-Reviewer: Saifuddin Hitawala <hita...@chromium.org>
      Gerrit-Reviewer: Vasiliy Telezhnikov <vas...@chromium.org>
      Gerrit-Attention: Saifuddin Hitawala <hita...@chromium.org>
      Gerrit-Comment-Date: Sun, 22 Mar 2026 20:43:28 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      open
      diffy

      Saifuddin Hitawala (Gerrit)

      unread,
      10:05 AM (9 hours ago) 10:05 AM
      to Chromium LUCI CQ, Colin Blundell, Vasiliy Telezhnikov, Dale Curtis, chromium...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org

      Saifuddin Hitawala added 2 comments

      File media/base/video_frame.cc
      Line 1460, Patchset 10 (Latest):void VideoFrame::SetLostSharedImageResource(bool lost_si_resource) {
      Dale Curtis . unresolved

      How is this thread safe? We usually try to avoid mutable carrying state on VideoFrame since it may be held in many places at once.y7

      Saifuddin Hitawala

      Sorry about that, I didn't realize this needed to be thread-safe as its only used from the destructor. I can look into adding a base::Lock on `lost_shared_image_resource_` in a follow-up.

      File media/video/renderable_mappable_shared_image_video_frame_pool.cc
      Line 354, Patchset 10 (Latest): if (lost_shared_image_resource) {
      Dale Curtis . unresolved

      Seems like there should be a way for the pool to get this information directly since it created the SharedImage in the first place?

      Saifuddin Hitawala

      This seems possible as we currently set the bool on VideoFrame but instead could do it on the ClientSharedImage as this should only happen in cases where VideoFrame is backed by SharedImage.

      I chatted with @vas...@chromium.org about this and it seems more involved because of the callback mechanism currently plumbed through VideoFrame and VideoResourceUpdater, and how it works with ClientResourceProvider. Maybe we could update this as part of SharedImagePool support.

      Open in Gerrit

      Related details

      Attention set is empty
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement 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: I66ecd855f9877c4a0aa76e8ad89f64718084ac31
      Gerrit-Change-Number: 7681879
      Gerrit-PatchSet: 10
      Gerrit-Owner: Saifuddin Hitawala <hita...@chromium.org>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
      Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
      Gerrit-Reviewer: Saifuddin Hitawala <hita...@chromium.org>
      Gerrit-Reviewer: Vasiliy Telezhnikov <vas...@chromium.org>
      Gerrit-Comment-Date: Mon, 23 Mar 2026 14:04:58 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Dale Curtis <dalec...@chromium.org>
      satisfied_requirement
      open
      diffy

      Dale Curtis (Gerrit)

      unread,
      12:41 PM (7 hours ago) 12:41 PM
      to Saifuddin Hitawala, Chromium LUCI CQ, Colin Blundell, Vasiliy Telezhnikov, chromium...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org
      Attention needed from Saifuddin Hitawala

      Dale Curtis added 2 comments

      File media/base/video_frame.cc
      Line 1460, Patchset 10 (Latest):void VideoFrame::SetLostSharedImageResource(bool lost_si_resource) {
      Dale Curtis . unresolved

      How is this thread safe? We usually try to avoid mutable carrying state on VideoFrame since it may be held in many places at once.y7

      Saifuddin Hitawala

      Sorry about that, I didn't realize this needed to be thread-safe as its only used from the destructor. I can look into adding a base::Lock on `lost_shared_image_resource_` in a follow-up.

      Dale Curtis

      Ah, that's likely okay then, but seems fragile in case someone tries to use the value elsewhere. I'd at least add a comment to the bool that it's only safe to read in the destructor.

      File media/video/renderable_mappable_shared_image_video_frame_pool.cc
      Line 354, Patchset 10 (Latest): if (lost_shared_image_resource) {
      Dale Curtis . resolved

      Seems like there should be a way for the pool to get this information directly since it created the SharedImage in the first place?

      Saifuddin Hitawala

      This seems possible as we currently set the bool on VideoFrame but instead could do it on the ClientSharedImage as this should only happen in cases where VideoFrame is backed by SharedImage.

      I chatted with @vas...@chromium.org about this and it seems more involved because of the callback mechanism currently plumbed through VideoFrame and VideoResourceUpdater, and how it works with ClientResourceProvider. Maybe we could update this as part of SharedImagePool support.

      Dale Curtis

      Defer to your expertise, but definitely is a bit weird!

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Saifuddin Hitawala
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement 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: I66ecd855f9877c4a0aa76e8ad89f64718084ac31
      Gerrit-Change-Number: 7681879
      Gerrit-PatchSet: 10
      Gerrit-Owner: Saifuddin Hitawala <hita...@chromium.org>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
      Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
      Gerrit-Reviewer: Saifuddin Hitawala <hita...@chromium.org>
      Gerrit-Reviewer: Vasiliy Telezhnikov <vas...@chromium.org>
      Gerrit-Attention: Saifuddin Hitawala <hita...@chromium.org>
      Gerrit-Comment-Date: Mon, 23 Mar 2026 16:41:26 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Saifuddin Hitawala <hita...@chromium.org>
      Comment-In-Reply-To: Dale Curtis <dalec...@chromium.org>
      satisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages