[XR] Extend XrSceneCoreSessionManager to allow creating spatial panels and sufraces [chromium/src : main]

0 views
Skip to first unread message

Nick Mondello (Gerrit)

unread,
Mar 23, 2026, 6:13:01 PM (19 hours ago) Mar 23
to Oleh Desiatyrikov (xWF), Gurmeet Kalra, Chromium LUCI CQ, chromium...@chromium.org, feature-v...@chromium.org
Attention needed from Gurmeet Kalra and Oleh Desiatyrikov (xWF)

Nick Mondello added 3 comments

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Nick Mondello . resolved

Clean CL! Nice to see the DFM structure working out.

File chrome/android/modules/xr/internal/java/src/org/chromium/chrome/browser/xr/scenecore/XrSurfaceEntityHolderImpl.java
Line 206, Patchset 1 (Latest): if (mIsDisposed) return;
Nick Mondello . unresolved

Is there a reason that assertDisposed() isn't called here similar to the other setter methods?

File ui/android/java/src/org/chromium/ui/xr/scenecore/XrSceneCoreSessionManager.java
Line 85, Patchset 1 (Latest): void setKeyEntity(XrEntityHolder entityHolder);
Nick Mondello . unresolved

nit: I noticed some of the functions add @param through all these interfaces, can you keep it uniform across all interfaces? Unless you had some reasoning

Open in Gerrit

Related details

Attention is currently required from:
  • Gurmeet Kalra
  • Oleh Desiatyrikov (xWF)
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement 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: I5e9f63f2f68a17637d8ce6f0c45b2077b3793c8c
Gerrit-Change-Number: 7693878
Gerrit-PatchSet: 1
Gerrit-Owner: Oleh Desiatyrikov (xWF) <desiat...@google.com>
Gerrit-Reviewer: Gurmeet Kalra <gurm...@google.com>
Gerrit-Reviewer: Nick Mondello <mond...@google.com>
Gerrit-Reviewer: Oleh Desiatyrikov (xWF) <desiat...@google.com>
Gerrit-Attention: Gurmeet Kalra <gurm...@google.com>
Gerrit-Attention: Oleh Desiatyrikov (xWF) <desiat...@google.com>
Gerrit-Comment-Date: Mon, 23 Mar 2026 22:12:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Gurmeet Kalra (Gerrit)

unread,
Mar 23, 2026, 6:33:49 PM (18 hours ago) Mar 23
to Oleh Desiatyrikov (xWF), Nick Mondello, Chromium LUCI CQ, chromium...@chromium.org, feature-v...@chromium.org
Attention needed from Oleh Desiatyrikov (xWF)

Gurmeet Kalra added 5 comments

Patchset-level comments
Gurmeet Kalra . unresolved

This cls focuses on adding just new APIs. A change of this size adding tests is crucial to ensure correctness and prevent future regressions. I would recommend adding unit tests for the new implementation classes in chrome/android/modules/xr/internal/java/src/org/chromium/chrome/browser/xr/scenecore/.

File chrome/android/modules/xr/internal/java/src/org/chromium/chrome/browser/xr/scenecore/XrMovableComponentImpl.java
Line 41, Patchset 1 (Latest): List<MovableComponent> components = mEntity.getComponentsOfType(MovableComponent.class);
Gurmeet Kalra . unresolved

The `detachFromEntity()` method is called right before this, which handles the removal of the component managed by this class. This loop is redundant and could unintentionally remove `MovableComponent` instances added by other parts of the code. It's better to only manage the component owned by this class. Recommend remove this loop.

File chrome/android/modules/xr/internal/java/src/org/chromium/chrome/browser/xr/scenecore/XrResizableComponentImpl.java
Line 58, Patchset 1 (Latest): List<ResizableComponent> components = mEntity.getComponentsOfType(ResizableComponent.class);
Gurmeet Kalra . unresolved

AI suggested: `detachFromEntity()` is already called before this, which should handle removing the component managed by this class. This loop seems redundant and could remove `ResizableComponent`s added by other parts of the application, leading to unexpected behavior. Please remove it.

File chrome/android/modules/xr/internal/java/src/org/chromium/chrome/browser/xr/scenecore/XrSurfaceEntityHolderImpl.java
Line 206, Patchset 1 (Latest): if (mIsDisposed) return;
Gurmeet Kalra . unresolved

For consistency with other methods in this class and its superclass, any reason why `assertDisposed()` not called here? This ensures that use-after-dispose errors are caught early.

Line 219, Patchset 1 (Latest): super.dispose();
Gurmeet Kalra . unresolved

The `mMovableComponent` and `mResizableComponent` are not being disposed of here, which could lead to resource leaks. Please add `mMovableComponent.dispose()` and `mResizableComponent.dispose()` before the call to `super.dispose()`.

Open in Gerrit

Related details

Attention is currently required from:
  • Oleh Desiatyrikov (xWF)
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement 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: I5e9f63f2f68a17637d8ce6f0c45b2077b3793c8c
Gerrit-Change-Number: 7693878
Gerrit-PatchSet: 1
Gerrit-Owner: Oleh Desiatyrikov (xWF) <desiat...@google.com>
Gerrit-Reviewer: Gurmeet Kalra <gurm...@google.com>
Gerrit-Reviewer: Nick Mondello <mond...@google.com>
Gerrit-Reviewer: Oleh Desiatyrikov (xWF) <desiat...@google.com>
Gerrit-Attention: Oleh Desiatyrikov (xWF) <desiat...@google.com>
Gerrit-Comment-Date: Mon, 23 Mar 2026 22:33:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Nick Mondello (Gerrit)

unread,
Mar 23, 2026, 6:37:42 PM (18 hours ago) Mar 23
to Oleh Desiatyrikov (xWF), Gurmeet Kalra, Chromium LUCI CQ, chromium...@chromium.org, feature-v...@chromium.org
Attention needed from Oleh Desiatyrikov (xWF)

Nick Mondello added 1 comment

Patchset-level comments
Gurmeet Kalra . unresolved

This cls focuses on adding just new APIs. A change of this size adding tests is crucial to ensure correctness and prevent future regressions. I would recommend adding unit tests for the new implementation classes in chrome/android/modules/xr/internal/java/src/org/chromium/chrome/browser/xr/scenecore/.

Nick Mondello

How testable is scenecore? I know with GTV there were many blockers that prevented compose unit testing other than basic checks to see if the proper functions were called

Gerrit-Comment-Date: Mon, 23 Mar 2026 22:37:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Gurmeet Kalra <gurm...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Oleh Desiatyrikov (xWF) (Gerrit)

unread,
Mar 23, 2026, 7:26:03 PM (18 hours ago) Mar 23
to Gurmeet Kalra, Nick Mondello, Chromium LUCI CQ, chromium...@chromium.org, feature-v...@chromium.org
Attention needed from Gurmeet Kalra and Nick Mondello

Oleh Desiatyrikov (xWF) added 6 comments

File chrome/android/modules/xr/internal/java/src/org/chromium/chrome/browser/xr/scenecore/XrMovableComponentImpl.java
Line 41, Patchset 1: List<MovableComponent> components = mEntity.getComponentsOfType(MovableComponent.class);
Gurmeet Kalra . resolved

The `detachFromEntity()` method is called right before this, which handles the removal of the component managed by this class. This loop is redundant and could unintentionally remove `MovableComponent` instances added by other parts of the code. It's better to only manage the component owned by this class. Recommend remove this loop.

Oleh Desiatyrikov (xWF)

Done

File chrome/android/modules/xr/internal/java/src/org/chromium/chrome/browser/xr/scenecore/XrResizableComponentImpl.java
Line 58, Patchset 1: List<ResizableComponent> components = mEntity.getComponentsOfType(ResizableComponent.class);
Gurmeet Kalra . resolved

AI suggested: `detachFromEntity()` is already called before this, which should handle removing the component managed by this class. This loop seems redundant and could remove `ResizableComponent`s added by other parts of the application, leading to unexpected behavior. Please remove it.

Oleh Desiatyrikov (xWF)

Done

File chrome/android/modules/xr/internal/java/src/org/chromium/chrome/browser/xr/scenecore/XrSurfaceEntityHolderImpl.java
Line 206, Patchset 1: if (mIsDisposed) return;
Nick Mondello . resolved

Is there a reason that assertDisposed() isn't called here similar to the other setter methods?

Oleh Desiatyrikov (xWF)

Done

Line 206, Patchset 1: if (mIsDisposed) return;
Gurmeet Kalra . resolved

For consistency with other methods in this class and its superclass, any reason why `assertDisposed()` not called here? This ensures that use-after-dispose errors are caught early.

Oleh Desiatyrikov (xWF)

Done

Line 219, Patchset 1: super.dispose();
Gurmeet Kalra . resolved

The `mMovableComponent` and `mResizableComponent` are not being disposed of here, which could lead to resource leaks. Please add `mMovableComponent.dispose()` and `mResizableComponent.dispose()` before the call to `super.dispose()`.

Oleh Desiatyrikov (xWF)

Done

File ui/android/java/src/org/chromium/ui/xr/scenecore/XrSceneCoreSessionManager.java
Line 85, Patchset 1: void setKeyEntity(XrEntityHolder entityHolder);
Nick Mondello . resolved

nit: I noticed some of the functions add @param through all these interfaces, can you keep it uniform across all interfaces? Unless you had some reasoning

Oleh Desiatyrikov (xWF)

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Gurmeet Kalra
  • Nick Mondello
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement 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: I5e9f63f2f68a17637d8ce6f0c45b2077b3793c8c
Gerrit-Change-Number: 7693878
Gerrit-PatchSet: 2
Gerrit-Owner: Oleh Desiatyrikov (xWF) <desiat...@google.com>
Gerrit-Reviewer: Gurmeet Kalra <gurm...@google.com>
Gerrit-Reviewer: Nick Mondello <mond...@google.com>
Gerrit-Reviewer: Oleh Desiatyrikov (xWF) <desiat...@google.com>
Gerrit-Attention: Gurmeet Kalra <gurm...@google.com>
Gerrit-Attention: Nick Mondello <mond...@google.com>
Gerrit-Comment-Date: Mon, 23 Mar 2026 23:25:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Gurmeet Kalra <gurm...@google.com>
Comment-In-Reply-To: Nick Mondello <mond...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Oleh Desiatyrikov (xWF) (Gerrit)

unread,
Mar 23, 2026, 8:02:10 PM (17 hours ago) Mar 23
to Gurmeet Kalra, Nick Mondello, Chromium LUCI CQ, chromium...@chromium.org, feature-v...@chromium.org
Attention needed from Gurmeet Kalra and Nick Mondello

Oleh Desiatyrikov (xWF) added 1 comment

Patchset-level comments
Gurmeet Kalra . unresolved

This cls focuses on adding just new APIs. A change of this size adding tests is crucial to ensure correctness and prevent future regressions. I would recommend adding unit tests for the new implementation classes in chrome/android/modules/xr/internal/java/src/org/chromium/chrome/browser/xr/scenecore/.

Nick Mondello

How testable is scenecore? I know with GTV there were many blockers that prevented compose unit testing other than basic checks to see if the proper functions were called

Oleh Desiatyrikov (xWF)

I see there is a androidx.xr.scenecore:scenecore-testing package. [link](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:xr/scenecore/scenecore-testing/src/main/kotlin/androidx/xr/scenecore/testing/)

I'll try to add some basic unit tests to cover the API but this will probably land as a separate CL.

Gerrit-Comment-Date: Tue, 24 Mar 2026 00:02:01 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Nick Mondello (Gerrit)

unread,
Mar 23, 2026, 8:40:46 PM (16 hours ago) Mar 23
to Oleh Desiatyrikov (xWF), Gurmeet Kalra, Chromium LUCI CQ, chromium...@chromium.org, feature-v...@chromium.org
Attention needed from Gurmeet Kalra and Oleh Desiatyrikov (xWF)

Nick Mondello voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Gurmeet Kalra
  • Oleh Desiatyrikov (xWF)
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement is not 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: I5e9f63f2f68a17637d8ce6f0c45b2077b3793c8c
    Gerrit-Change-Number: 7693878
    Gerrit-PatchSet: 2
    Gerrit-Owner: Oleh Desiatyrikov (xWF) <desiat...@google.com>
    Gerrit-Reviewer: Gurmeet Kalra <gurm...@google.com>
    Gerrit-Reviewer: Nick Mondello <mond...@google.com>
    Gerrit-Reviewer: Oleh Desiatyrikov (xWF) <desiat...@google.com>
    Gerrit-Attention: Gurmeet Kalra <gurm...@google.com>
    Gerrit-Attention: Oleh Desiatyrikov (xWF) <desiat...@google.com>
    Gerrit-Comment-Date: Tue, 24 Mar 2026 00:40:28 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Gurmeet Kalra (Gerrit)

    unread,
    1:50 AM (11 hours ago) 1:50 AM
    to Oleh Desiatyrikov (xWF), Nick Mondello, Chromium LUCI CQ, chromium...@chromium.org, feature-v...@chromium.org
    Attention needed from Oleh Desiatyrikov (xWF)

    Gurmeet Kalra voted and added 2 comments

    Votes added by Gurmeet Kalra

    Code-Review+1

    2 comments

    Patchset-level comments
    Gurmeet Kalra . unresolved

    This cls focuses on adding just new APIs. A change of this size adding tests is crucial to ensure correctness and prevent future regressions. I would recommend adding unit tests for the new implementation classes in chrome/android/modules/xr/internal/java/src/org/chromium/chrome/browser/xr/scenecore/.

    Nick Mondello

    How testable is scenecore? I know with GTV there were many blockers that prevented compose unit testing other than basic checks to see if the proper functions were called

    Oleh Desiatyrikov (xWF)

    I see there is a androidx.xr.scenecore:scenecore-testing package. [link](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:xr/scenecore/scenecore-testing/src/main/kotlin/androidx/xr/scenecore/testing/)

    I'll try to add some basic unit tests to cover the API but this will probably land as a separate CL.

    Gurmeet Kalra

    Please create a P1 bug and add a TODO in each of the Impl classed so that the tests are added.

    File-level comment, Patchset 2 (Latest):
    Gurmeet Kalra . resolved

    LGTM

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Oleh Desiatyrikov (xWF)
    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: I5e9f63f2f68a17637d8ce6f0c45b2077b3793c8c
      Gerrit-Change-Number: 7693878
      Gerrit-PatchSet: 2
      Gerrit-Owner: Oleh Desiatyrikov (xWF) <desiat...@google.com>
      Gerrit-Reviewer: Gurmeet Kalra <gurm...@google.com>
      Gerrit-Reviewer: Nick Mondello <mond...@google.com>
      Gerrit-Reviewer: Oleh Desiatyrikov (xWF) <desiat...@google.com>
      Gerrit-Attention: Oleh Desiatyrikov (xWF) <desiat...@google.com>
      Gerrit-Comment-Date: Tue, 24 Mar 2026 05:49:55 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Gurmeet Kalra <gurm...@google.com>
      Comment-In-Reply-To: Nick Mondello <mond...@google.com>
      Comment-In-Reply-To: Oleh Desiatyrikov (xWF) <desiat...@google.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Oleh Desiatyrikov (xWF) (Gerrit)

      unread,
      11:21 AM (2 hours ago) 11:21 AM
      to Gurmeet Kalra, Nick Mondello, Chromium LUCI CQ, chromium...@chromium.org, feature-v...@chromium.org
      Attention needed from Gurmeet Kalra and Nick Mondello

      Oleh Desiatyrikov (xWF) added 1 comment

      Patchset-level comments
      File-level comment, Patchset 1:
      Gurmeet Kalra . resolved

      This cls focuses on adding just new APIs. A change of this size adding tests is crucial to ensure correctness and prevent future regressions. I would recommend adding unit tests for the new implementation classes in chrome/android/modules/xr/internal/java/src/org/chromium/chrome/browser/xr/scenecore/.

      Nick Mondello

      How testable is scenecore? I know with GTV there were many blockers that prevented compose unit testing other than basic checks to see if the proper functions were called

      Oleh Desiatyrikov (xWF)

      I see there is a androidx.xr.scenecore:scenecore-testing package. [link](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:xr/scenecore/scenecore-testing/src/main/kotlin/androidx/xr/scenecore/testing/)

      I'll try to add some basic unit tests to cover the API but this will probably land as a separate CL.

      Gurmeet Kalra

      Please create a P1 bug and add a TODO in each of the Impl classed so that the tests are added.

      Oleh Desiatyrikov (xWF)
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Gurmeet Kalra
      • Nick Mondello
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement 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: I5e9f63f2f68a17637d8ce6f0c45b2077b3793c8c
        Gerrit-Change-Number: 7693878
        Gerrit-PatchSet: 5
        Gerrit-Owner: Oleh Desiatyrikov (xWF) <desiat...@google.com>
        Gerrit-Reviewer: Gurmeet Kalra <gurm...@google.com>
        Gerrit-Reviewer: Nick Mondello <mond...@google.com>
        Gerrit-Reviewer: Oleh Desiatyrikov (xWF) <desiat...@google.com>
        Gerrit-Attention: Gurmeet Kalra <gurm...@google.com>
        Gerrit-Attention: Nick Mondello <mond...@google.com>
        Gerrit-Comment-Date: Tue, 24 Mar 2026 15:21:09 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages