[media] Update MailboxConverter test to create SI with color space [chromium/src : main]

0 views
Skip to first unread message

Saifuddin Hitawala (Gerrit)

unread,
Mar 11, 2026, 12:12:52 PMMar 11
to Vasiliy Telezhnikov, Chromium LUCI CQ, chromium...@chromium.org, chromeos-gfx-...@google.com, feature-me...@chromium.org, media-cro...@chromium.org, oshima...@chromium.org
Attention needed from Vasiliy Telezhnikov

Saifuddin Hitawala added 1 comment

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

Please take a look.

Open in Gerrit

Related details

Attention is currently required from:
  • 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: Ief101ec5611a8ccffdea8227088a4a2c2b32730f
Gerrit-Change-Number: 7652979
Gerrit-PatchSet: 5
Gerrit-Owner: Saifuddin Hitawala <hita...@chromium.org>
Gerrit-Reviewer: Saifuddin Hitawala <hita...@chromium.org>
Gerrit-Reviewer: Vasiliy Telezhnikov <vas...@chromium.org>
Gerrit-Attention: Vasiliy Telezhnikov <vas...@chromium.org>
Gerrit-Comment-Date: Wed, 11 Mar 2026 16:12:47 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Vasiliy Telezhnikov (Gerrit)

unread,
Mar 11, 2026, 1:07:41 PMMar 11
to Saifuddin Hitawala, Chromium LUCI CQ, chromium...@chromium.org, chromeos-gfx-...@google.com, feature-me...@chromium.org, media-cro...@chromium.org, oshima...@chromium.org
Attention needed from Saifuddin Hitawala

Vasiliy Telezhnikov voted and added 1 comment

Votes added by Vasiliy Telezhnikov

Code-Review+1

1 comment

Patchset-level comments
Vasiliy Telezhnikov . resolved

lgtm, thanks.

Open in Gerrit

Related details

Attention is currently required from:
  • Saifuddin Hitawala
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: Ief101ec5611a8ccffdea8227088a4a2c2b32730f
    Gerrit-Change-Number: 7652979
    Gerrit-PatchSet: 5
    Gerrit-Owner: Saifuddin Hitawala <hita...@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: Wed, 11 Mar 2026 17:07:36 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Saifuddin Hitawala (Gerrit)

    unread,
    Mar 11, 2026, 1:08:18 PMMar 11
    to Dale Curtis, Vasiliy Telezhnikov, Chromium LUCI CQ, chromium...@chromium.org, chromeos-gfx-...@google.com, feature-me...@chromium.org, media-cro...@chromium.org, oshima...@chromium.org
    Attention needed from Dale Curtis

    Saifuddin Hitawala added 1 comment

    Patchset-level comments
    Saifuddin Hitawala . resolved

    Thanks, adding Dale for owners, PTAL.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Dale Curtis
    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: Ief101ec5611a8ccffdea8227088a4a2c2b32730f
    Gerrit-Change-Number: 7652979
    Gerrit-PatchSet: 5
    Gerrit-Owner: Saifuddin Hitawala <hita...@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: Dale Curtis <dalec...@chromium.org>
    Gerrit-Comment-Date: Wed, 11 Mar 2026 17:08:12 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Saifuddin Hitawala (Gerrit)

    unread,
    Mar 11, 2026, 3:58:22 PMMar 11
    to Colin Blundell, Dale Curtis, Vasiliy Telezhnikov, Chromium LUCI CQ, chromium...@chromium.org, chromeos-gfx-...@google.com, feature-me...@chromium.org, media-cro...@chromium.org, oshima...@chromium.org
    Attention needed from Colin Blundell and Dale Curtis

    Saifuddin Hitawala added 1 comment

    Patchset-level comments
    Saifuddin Hitawala . resolved

    Looks like Dale is OOO, adding Colin for owners to take a look.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Colin Blundell
    • Dale Curtis
    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: Ief101ec5611a8ccffdea8227088a4a2c2b32730f
    Gerrit-Change-Number: 7652979
    Gerrit-PatchSet: 5
    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: Dale Curtis <dalec...@chromium.org>
    Gerrit-Comment-Date: Wed, 11 Mar 2026 19:58:18 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Colin Blundell (Gerrit)

    unread,
    Mar 12, 2026, 4:00:10 AMMar 12
    to Saifuddin Hitawala, Colin Blundell, Dale Curtis, Vasiliy Telezhnikov, Chromium LUCI CQ, chromium...@chromium.org, chromeos-gfx-...@google.com, feature-me...@chromium.org, media-cro...@chromium.org, oshima...@chromium.org
    Attention needed from Dale Curtis and Saifuddin Hitawala

    Colin Blundell added 2 comments

    Patchset-level comments
    Colin Blundell . resolved

    Thanks!

    File media/gpu/chromeos/mailbox_video_frame_converter_unittest.cc
    Line 581, Patchset 5 (Latest):// This test verifies that shared_image recreates if color space changes.
    Colin Blundell . unresolved

    Is this test still testing what the comment says it's testing? Naively it seems like it isn't since we're explicitly creating the SharedImages now, but maybe I'm missing something. Is the idea that we're going to eliminate the behavior of changing the color space on the VideoFrame and make the color space immutable?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Dale Curtis
    • Saifuddin Hitawala
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not 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: Ief101ec5611a8ccffdea8227088a4a2c2b32730f
      Gerrit-Change-Number: 7652979
      Gerrit-PatchSet: 5
      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: Thu, 12 Mar 2026 07:59:51 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Saifuddin Hitawala (Gerrit)

      unread,
      Mar 12, 2026, 9:58:50 AMMar 12
      to Colin Blundell, Dale Curtis, Vasiliy Telezhnikov, Chromium LUCI CQ, chromium...@chromium.org, chromeos-gfx-...@google.com, feature-me...@chromium.org, media-cro...@chromium.org, oshima...@chromium.org
      Attention needed from Colin Blundell and Dale Curtis

      Saifuddin Hitawala added 1 comment

      File media/gpu/chromeos/mailbox_video_frame_converter_unittest.cc
      Line 581, Patchset 5 (Latest):// This test verifies that shared_image recreates if color space changes.
      Colin Blundell . unresolved

      Is this test still testing what the comment says it's testing? Naively it seems like it isn't since we're explicitly creating the SharedImages now, but maybe I'm missing something. Is the idea that we're going to eliminate the behavior of changing the color space on the VideoFrame and make the color space immutable?

      Saifuddin Hitawala

      This test was not recreating the shared image earlier, but just setting the new color space on VideoFrame with shared image still having the old color space. While looking to add DumpWillBeCheck for mismatch I found this failing. I'm not exactly sure about the codepath flow here, maybe Vasiliy can clarify.

      Yes, we should make ColorSpace an immutable property of VideoFrame for when VideoFrame is created with SharedImage. This will then require recreating the SharedImage and hence such a VideoFrame on the client side. But right now there could be many such cases so we need to root out the ones with mismatches with DumpWillBeCheck. I found a couple places [here](https://chromium-review.googlesource.com/c/chromium/src/+/7657484) and [here](https://chromium-review.googlesource.com/c/chromium/src/+/7488606/4/media/video/video_encode_accelerator_adapter.cc) where I'm looking to recreate the SI.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Colin Blundell
      • Dale Curtis
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not 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: Ief101ec5611a8ccffdea8227088a4a2c2b32730f
      Gerrit-Change-Number: 7652979
      Gerrit-PatchSet: 5
      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: Dale Curtis <dalec...@chromium.org>
      Gerrit-Comment-Date: Thu, 12 Mar 2026 13:58:43 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Colin Blundell <blun...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Colin Blundell (Gerrit)

      unread,
      Mar 12, 2026, 10:01:33 AMMar 12
      to Saifuddin Hitawala, Colin Blundell, Dale Curtis, Vasiliy Telezhnikov, Chromium LUCI CQ, chromium...@chromium.org, chromeos-gfx-...@google.com, feature-me...@chromium.org, media-cro...@chromium.org, oshima...@chromium.org
      Attention needed from Dale Curtis and Saifuddin Hitawala

      Colin Blundell added 1 comment

      File media/gpu/chromeos/mailbox_video_frame_converter_unittest.cc
      Line 581, Patchset 5 (Latest):// This test verifies that shared_image recreates if color space changes.
      Colin Blundell . unresolved

      Is this test still testing what the comment says it's testing? Naively it seems like it isn't since we're explicitly creating the SharedImages now, but maybe I'm missing something. Is the idea that we're going to eliminate the behavior of changing the color space on the VideoFrame and make the color space immutable?

      Saifuddin Hitawala

      This test was not recreating the shared image earlier, but just setting the new color space on VideoFrame with shared image still having the old color space. While looking to add DumpWillBeCheck for mismatch I found this failing. I'm not exactly sure about the codepath flow here, maybe Vasiliy can clarify.

      Yes, we should make ColorSpace an immutable property of VideoFrame for when VideoFrame is created with SharedImage. This will then require recreating the SharedImage and hence such a VideoFrame on the client side. But right now there could be many such cases so we need to root out the ones with mismatches with DumpWillBeCheck. I found a couple places [here](https://chromium-review.googlesource.com/c/chromium/src/+/7657484) and [here](https://chromium-review.googlesource.com/c/chromium/src/+/7488606/4/media/video/video_encode_accelerator_adapter.cc) where I'm looking to recreate the SI.

      Colin Blundell

      This test was not recreating the shared image earlier, but just setting the new color space on VideoFrame with shared image still having the old color space. While looking to add DumpWillBeCheck for mismatch I found this failing. I'm not exactly sure about the codepath flow here, maybe Vasiliy can clarify.

      Hmm, so what's the utility of the test then if even before it wasn't actually testing what the test name says it was testing? i.e. is there a value to keeping this test at all at this point? or potentially scoping it down to be named as/targeted at the useful things it's actually testing?

      Yes, we should make ColorSpace an immutable property of VideoFrame for when VideoFrame is created with SharedImage. This will then require recreating the SharedImage and hence such a VideoFrame on the client side. But right now there could be many such cases so we need to root out the ones with mismatches with DumpWillBeCheck. I found a couple places [here](https://chromium-review.googlesource.com/c/chromium/src/+/7657484) and [here](https://chromium-review.googlesource.com/c/chromium/src/+/7488606/4/media/video/video_encode_accelerator_adapter.cc) where I'm looking to recreate the SI.

      That path sounds great to me!

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Dale Curtis
      • Saifuddin Hitawala
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not 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: Ief101ec5611a8ccffdea8227088a4a2c2b32730f
      Gerrit-Change-Number: 7652979
      Gerrit-PatchSet: 5
      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: Thu, 12 Mar 2026 14:01:18 +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

      Vasiliy Telezhnikov (Gerrit)

      unread,
      Mar 12, 2026, 11:16:43 AMMar 12
      to Saifuddin Hitawala, Colin Blundell, Dale Curtis, Chromium LUCI CQ, chromium...@chromium.org, chromeos-gfx-...@google.com, feature-me...@chromium.org, media-cro...@chromium.org, oshima...@chromium.org
      Attention needed from Dale Curtis and Saifuddin Hitawala

      Vasiliy Telezhnikov added 1 comment

      File media/gpu/chromeos/mailbox_video_frame_converter_unittest.cc
      Line 581, Patchset 5 (Latest):// This test verifies that shared_image recreates if color space changes.
      Colin Blundell . unresolved

      Is this test still testing what the comment says it's testing? Naively it seems like it isn't since we're explicitly creating the SharedImages now, but maybe I'm missing something. Is the idea that we're going to eliminate the behavior of changing the color space on the VideoFrame and make the color space immutable?

      Saifuddin Hitawala

      This test was not recreating the shared image earlier, but just setting the new color space on VideoFrame with shared image still having the old color space. While looking to add DumpWillBeCheck for mismatch I found this failing. I'm not exactly sure about the codepath flow here, maybe Vasiliy can clarify.

      Yes, we should make ColorSpace an immutable property of VideoFrame for when VideoFrame is created with SharedImage. This will then require recreating the SharedImage and hence such a VideoFrame on the client side. But right now there could be many such cases so we need to root out the ones with mismatches with DumpWillBeCheck. I found a couple places [here](https://chromium-review.googlesource.com/c/chromium/src/+/7657484) and [here](https://chromium-review.googlesource.com/c/chromium/src/+/7488606/4/media/video/video_encode_accelerator_adapter.cc) where I'm looking to recreate the SI.

      Colin Blundell

      This test was not recreating the shared image earlier, but just setting the new color space on VideoFrame with shared image still having the old color space. While looking to add DumpWillBeCheck for mismatch I found this failing. I'm not exactly sure about the codepath flow here, maybe Vasiliy can clarify.

      Hmm, so what's the utility of the test then if even before it wasn't actually testing what the test name says it was testing? i.e. is there a value to keeping this test at all at this point? or potentially scoping it down to be named as/targeted at the useful things it's actually testing?

      Yes, we should make ColorSpace an immutable property of VideoFrame for when VideoFrame is created with SharedImage. This will then require recreating the SharedImage and hence such a VideoFrame on the client side. But right now there could be many such cases so we need to root out the ones with mismatches with DumpWillBeCheck. I found a couple places [here](https://chromium-review.googlesource.com/c/chromium/src/+/7657484) and [here](https://chromium-review.googlesource.com/c/chromium/src/+/7488606/4/media/video/video_encode_accelerator_adapter.cc) where I'm looking to recreate the SI.

      That path sounds great to me!

      Vasiliy Telezhnikov

      Test is just very confusing, because the code flow is very confusing.

      `VideoFrameConverter`'s purpose is to convert from `FrameResource` to `VideoFrame`. `FrameResource` is abstraction of the decoded buffer on the linux in chromeos.

      MailboxVideoFrameConverter is what converts FrameResource to shared image backed VideoFrame, so it creates SharedImage from GpuMemoryBufferHandle provided by FrameResource.

      Now, that even handle didn't change, we do need to recreate shared images if color space changes and this test tries to verify it.

      To do so, test creates two `FrameResource` with different color spaces and expects MailboxVideoFrameConverter to recreate its SIs.


      The rest is test specifics, there are few different ways to create `FrameResource`, normally this flow uses NativePixmap based FrameResource. This test for simplicity creates FrameResource from VideoFrame, because only ColorSpace matters. And to do so it creates SI.

      So it looks wonky, but essentially:
      ```
      SI => VideoFrame => FrameResource => Shared Image => VideoFrame
      [ this is just test setup ][ this is what we test ]
      ```
      Gerrit-Comment-Date: Thu, 12 Mar 2026 15:16:36 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Colin Blundell (Gerrit)

      unread,
      Mar 12, 2026, 11:22:35 AMMar 12
      to Saifuddin Hitawala, Colin Blundell, Dale Curtis, Vasiliy Telezhnikov, Chromium LUCI CQ, chromium...@chromium.org, chromeos-gfx-...@google.com, feature-me...@chromium.org, media-cro...@chromium.org, oshima...@chromium.org
      Attention needed from Dale Curtis and Saifuddin Hitawala

      Colin Blundell voted and added 2 comments

      Votes added by Colin Blundell

      Code-Review+1

      2 comments

      Patchset-level comments
      File-level comment, Patchset 5 (Latest):
      Colin Blundell . resolved

      Thanks!

      File media/gpu/chromeos/mailbox_video_frame_converter_unittest.cc
      Line 581, Patchset 5 (Latest):// This test verifies that shared_image recreates if color space changes.
      Colin Blundell . resolved

      Is this test still testing what the comment says it's testing? Naively it seems like it isn't since we're explicitly creating the SharedImages now, but maybe I'm missing something. Is the idea that we're going to eliminate the behavior of changing the color space on the VideoFrame and make the color space immutable?

      Saifuddin Hitawala

      This test was not recreating the shared image earlier, but just setting the new color space on VideoFrame with shared image still having the old color space. While looking to add DumpWillBeCheck for mismatch I found this failing. I'm not exactly sure about the codepath flow here, maybe Vasiliy can clarify.

      Yes, we should make ColorSpace an immutable property of VideoFrame for when VideoFrame is created with SharedImage. This will then require recreating the SharedImage and hence such a VideoFrame on the client side. But right now there could be many such cases so we need to root out the ones with mismatches with DumpWillBeCheck. I found a couple places [here](https://chromium-review.googlesource.com/c/chromium/src/+/7657484) and [here](https://chromium-review.googlesource.com/c/chromium/src/+/7488606/4/media/video/video_encode_accelerator_adapter.cc) where I'm looking to recreate the SI.

      Colin Blundell

      This test was not recreating the shared image earlier, but just setting the new color space on VideoFrame with shared image still having the old color space. While looking to add DumpWillBeCheck for mismatch I found this failing. I'm not exactly sure about the codepath flow here, maybe Vasiliy can clarify.

      Hmm, so what's the utility of the test then if even before it wasn't actually testing what the test name says it was testing? i.e. is there a value to keeping this test at all at this point? or potentially scoping it down to be named as/targeted at the useful things it's actually testing?

      Yes, we should make ColorSpace an immutable property of VideoFrame for when VideoFrame is created with SharedImage. This will then require recreating the SharedImage and hence such a VideoFrame on the client side. But right now there could be many such cases so we need to root out the ones with mismatches with DumpWillBeCheck. I found a couple places [here](https://chromium-review.googlesource.com/c/chromium/src/+/7657484) and [here](https://chromium-review.googlesource.com/c/chromium/src/+/7488606/4/media/video/video_encode_accelerator_adapter.cc) where I'm looking to recreate the SI.

      That path sounds great to me!

      Vasiliy Telezhnikov

      Test is just very confusing, because the code flow is very confusing.

      `VideoFrameConverter`'s purpose is to convert from `FrameResource` to `VideoFrame`. `FrameResource` is abstraction of the decoded buffer on the linux in chromeos.

      MailboxVideoFrameConverter is what converts FrameResource to shared image backed VideoFrame, so it creates SharedImage from GpuMemoryBufferHandle provided by FrameResource.

      Now, that even handle didn't change, we do need to recreate shared images if color space changes and this test tries to verify it.

      To do so, test creates two `FrameResource` with different color spaces and expects MailboxVideoFrameConverter to recreate its SIs.


      The rest is test specifics, there are few different ways to create `FrameResource`, normally this flow uses NativePixmap based FrameResource. This test for simplicity creates FrameResource from VideoFrame, because only ColorSpace matters. And to do so it creates SI.

      So it looks wonky, but essentially:
      ```
      SI => VideoFrame => FrameResource => Shared Image => VideoFrame
      [ this is just test setup ][ this is what we test ]
      ```
      Colin Blundell

      Got it, thanks - it's the converter's creation of a new SI that's being verified, and whether we're using one input SI or two input SIs to trigger the "color space changed" is just a test implementation detail.

      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 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: Ief101ec5611a8ccffdea8227088a4a2c2b32730f
      Gerrit-Change-Number: 7652979
      Gerrit-PatchSet: 5
      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: Thu, 12 Mar 2026 15:22:23 +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
      open
      diffy

      Saifuddin Hitawala (Gerrit)

      unread,
      Mar 12, 2026, 11:47:15 AMMar 12
      to Colin Blundell, Dale Curtis, Vasiliy Telezhnikov, Chromium LUCI CQ, chromium...@chromium.org, chromeos-gfx-...@google.com, feature-me...@chromium.org, media-cro...@chromium.org, oshima...@chromium.org
      Attention needed from Dale Curtis

      Saifuddin Hitawala voted and added 2 comments

      Votes added by Saifuddin Hitawala

      Commit-Queue+2

      2 comments

      Patchset-level comments
      Saifuddin Hitawala . resolved

      Thanks for reviews!

      File media/gpu/chromeos/mailbox_video_frame_converter_unittest.cc
      Line 581, Patchset 5 (Latest):// This test verifies that shared_image recreates if color space changes.
      Colin Blundell . resolved

      Is this test still testing what the comment says it's testing? Naively it seems like it isn't since we're explicitly creating the SharedImages now, but maybe I'm missing something. Is the idea that we're going to eliminate the behavior of changing the color space on the VideoFrame and make the color space immutable?

      Saifuddin Hitawala

      This test was not recreating the shared image earlier, but just setting the new color space on VideoFrame with shared image still having the old color space. While looking to add DumpWillBeCheck for mismatch I found this failing. I'm not exactly sure about the codepath flow here, maybe Vasiliy can clarify.

      Yes, we should make ColorSpace an immutable property of VideoFrame for when VideoFrame is created with SharedImage. This will then require recreating the SharedImage and hence such a VideoFrame on the client side. But right now there could be many such cases so we need to root out the ones with mismatches with DumpWillBeCheck. I found a couple places [here](https://chromium-review.googlesource.com/c/chromium/src/+/7657484) and [here](https://chromium-review.googlesource.com/c/chromium/src/+/7488606/4/media/video/video_encode_accelerator_adapter.cc) where I'm looking to recreate the SI.

      Colin Blundell

      This test was not recreating the shared image earlier, but just setting the new color space on VideoFrame with shared image still having the old color space. While looking to add DumpWillBeCheck for mismatch I found this failing. I'm not exactly sure about the codepath flow here, maybe Vasiliy can clarify.

      Hmm, so what's the utility of the test then if even before it wasn't actually testing what the test name says it was testing? i.e. is there a value to keeping this test at all at this point? or potentially scoping it down to be named as/targeted at the useful things it's actually testing?

      Yes, we should make ColorSpace an immutable property of VideoFrame for when VideoFrame is created with SharedImage. This will then require recreating the SharedImage and hence such a VideoFrame on the client side. But right now there could be many such cases so we need to root out the ones with mismatches with DumpWillBeCheck. I found a couple places [here](https://chromium-review.googlesource.com/c/chromium/src/+/7657484) and [here](https://chromium-review.googlesource.com/c/chromium/src/+/7488606/4/media/video/video_encode_accelerator_adapter.cc) where I'm looking to recreate the SI.

      That path sounds great to me!

      Vasiliy Telezhnikov

      Test is just very confusing, because the code flow is very confusing.

      `VideoFrameConverter`'s purpose is to convert from `FrameResource` to `VideoFrame`. `FrameResource` is abstraction of the decoded buffer on the linux in chromeos.

      MailboxVideoFrameConverter is what converts FrameResource to shared image backed VideoFrame, so it creates SharedImage from GpuMemoryBufferHandle provided by FrameResource.

      Now, that even handle didn't change, we do need to recreate shared images if color space changes and this test tries to verify it.

      To do so, test creates two `FrameResource` with different color spaces and expects MailboxVideoFrameConverter to recreate its SIs.


      The rest is test specifics, there are few different ways to create `FrameResource`, normally this flow uses NativePixmap based FrameResource. This test for simplicity creates FrameResource from VideoFrame, because only ColorSpace matters. And to do so it creates SI.

      So it looks wonky, but essentially:
      ```
      SI => VideoFrame => FrameResource => Shared Image => VideoFrame
      [ this is just test setup ][ this is what we test ]
      ```
      Colin Blundell

      Got it, thanks - it's the converter's creation of a new SI that's being verified, and whether we're using one input SI or two input SIs to trigger the "color space changed" is just a test implementation detail.

      Saifuddin Hitawala

      Thanks, that explanation makes so much sense!

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Dale Curtis
      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: Ief101ec5611a8ccffdea8227088a4a2c2b32730f
      Gerrit-Change-Number: 7652979
      Gerrit-PatchSet: 5
      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: Dale Curtis <dalec...@chromium.org>
      Gerrit-Comment-Date: Thu, 12 Mar 2026 15:47:09 +0000
      satisfied_requirement
      open
      diffy

      Chromium LUCI CQ (Gerrit)

      unread,
      Mar 12, 2026, 12:16:22 PMMar 12
      to Saifuddin Hitawala, Colin Blundell, Dale Curtis, Vasiliy Telezhnikov, chromium...@chromium.org, chromeos-gfx-...@google.com, feature-me...@chromium.org, media-cro...@chromium.org, oshima...@chromium.org

      Chromium LUCI CQ submitted the change

      Change information

      Commit message:
      [media] Update MailboxConverter test to create SI with color space

      Update MailboxVideoFrameConverterWithUnwrappedFramesTest to create
      separate shared images and video frames for the test that creates
      a second shared image with HDR color space.
      Bug: 425634684
      Change-Id: Ief101ec5611a8ccffdea8227088a4a2c2b32730f
      Commit-Queue: Saifuddin Hitawala <hita...@chromium.org>
      Reviewed-by: Colin Blundell <blun...@chromium.org>
      Reviewed-by: Vasiliy Telezhnikov <vas...@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#1598475}
      Files:
      • M media/gpu/chromeos/mailbox_video_frame_converter_unittest.cc
      Change size: M
      Delta: 1 file changed, 48 insertions(+), 40 deletions(-)
      Branch: refs/heads/main
      Submit Requirements:
      • requirement satisfiedCode-Review: +1 by Colin Blundell, +1 by Vasiliy Telezhnikov
      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: Ief101ec5611a8ccffdea8227088a4a2c2b32730f
      Gerrit-Change-Number: 7652979
      Gerrit-PatchSet: 6
      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
      Reply all
      Reply to author
      Forward
      0 new messages