[ui/compositor] Refactor ui::Layer to use subclasses [chromium/src : main]

1 view
Skip to first unread message

Zoraiz Naeem (Gerrit)

unread,
Jun 12, 2026, 5:59:12 PMJun 12
to Mitsuru Oshima, Achuith Bhandarkar, SLSA Policy Verification Service, AJITH KUMAR V, chromium...@chromium.org, Daniel Andersson, devtools...@chromium.org, Henrique Ferreiro, (Julie)Jeongeun Kim, Sadrul Chowdhury, Zhe Su, Ian Vollick, abigailbk...@google.com, aji...@samsung.com, alexmo...@chromium.org, arc-review...@google.com, bici...@google.com, cc-...@chromium.org, creis...@chromium.org, croissant-...@chromium.org, cros-system-ui-prod...@google.com, dtseng...@chromium.org, francisjp...@google.com, hidehik...@chromium.org, hirokisa...@chromium.org, jbauma...@chromium.org, josiah...@chromium.org, katie...@chromium.org, keithle...@chromium.org, kyungjunle...@google.com, lens-chrome...@google.com, mac-r...@chromium.org, mercer...@google.com, navigation...@chromium.org, nektar...@chromium.org, nona+...@chromium.org, oshima...@chromium.org, roblia...@chromium.org, shuche...@chromium.org, sky+...@chromium.org, stanfie...@google.com, toshikikikuchi+...@chromium.org, tote-eng...@google.com, tranbaod...@chromium.org, yhanad...@chromium.org, yhanada+...@chromium.org, yuzo+...@chromium.org
Attention needed from Mitsuru Oshima

Zoraiz Naeem voted and added 2 comments

Votes added by Zoraiz Naeem

Commit-Queue+1

2 comments

Patchset-level comments
File-level comment, Patchset 8 (Latest):
Zoraiz Naeem . resolved

PTAL.

File ui/compositor/layer.h
Line 929, Patchset 7:class COMPOSITOR_EXPORT LayerNotDrawn : public Layer {
Zoraiz Naeem . unresolved

More type based functionality will be moved to these types.

Open in Gerrit

Related details

Attention is currently required from:
  • Mitsuru Oshima
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: I0e66f19d0a527f44f491c5e898466dca0e0fdf65
Gerrit-Change-Number: 7928750
Gerrit-PatchSet: 8
Gerrit-Owner: Zoraiz Naeem <zorai...@chromium.org>
Gerrit-Reviewer: Mitsuru Oshima <osh...@chromium.org>
Gerrit-Reviewer: SLSA Policy Verification Service <devtools-gerritco...@google.com>
Gerrit-Reviewer: Zoraiz Naeem <zorai...@chromium.org>
Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
Gerrit-CC: AJITH KUMAR V <aji...@chromium.org>
Gerrit-CC: Achuith Bhandarkar <ach...@chromium.org>
Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
Gerrit-CC: Daniel Andersson <dande...@chromium.org>
Gerrit-CC: Henrique Ferreiro <hfer...@igalia.com>
Gerrit-CC: Ian Vollick <vol...@chromium.org>
Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
Gerrit-CC: Zhe Su <su...@chromium.org>
Gerrit-Attention: Mitsuru Oshima <osh...@chromium.org>
Gerrit-Comment-Date: Fri, 12 Jun 2026 21:58:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Zoraiz Naeem (Gerrit)

unread,
Jun 15, 2026, 5:56:29 PMJun 15
to SLSA Policy Verification Service, Chromium LUCI CQ, Mitsuru Oshima, Achuith Bhandarkar, AJITH KUMAR V, chromium...@chromium.org, Daniel Andersson, devtools...@chromium.org, Henrique Ferreiro, (Julie)Jeongeun Kim, Sadrul Chowdhury, Zhe Su, Ian Vollick, abigailbk...@google.com, aji...@samsung.com, alexmo...@chromium.org, arc-review...@google.com, bici...@google.com, cc-...@chromium.org, creis...@chromium.org, croissant-...@chromium.org, cros-system-ui-prod...@google.com, dtseng...@chromium.org, francisjp...@google.com, hidehik...@chromium.org, hirokisa...@chromium.org, jbauma...@chromium.org, josiah...@chromium.org, katie...@chromium.org, keithle...@chromium.org, kyungjunle...@google.com, lens-chrome...@google.com, mac-r...@chromium.org, mercer...@google.com, navigation...@chromium.org, nektar...@chromium.org, nona+...@chromium.org, oshima...@chromium.org, roblia...@chromium.org, shuche...@chromium.org, sky+...@chromium.org, stanfie...@google.com, toshikikikuchi+...@chromium.org, tote-eng...@google.com, tranbaod...@chromium.org, yhanad...@chromium.org, yhanada+...@chromium.org, yuzo+...@chromium.org
Attention needed from Mitsuru Oshima

Zoraiz Naeem added 1 comment

File ui/compositor/layer.h
Line 91, Patchset 11 (Latest): static std::unique_ptr<Layer> Create(LayerType type);
Zoraiz Naeem . unresolved

@oshima-san, let me know if you are okay with the idea. I will then proceed to fix the compilation and change a few more sematics.

Open in Gerrit

Related details

Attention is currently required from:
  • Mitsuru Oshima
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: I0e66f19d0a527f44f491c5e898466dca0e0fdf65
Gerrit-Change-Number: 7928750
Gerrit-PatchSet: 11
Gerrit-Owner: Zoraiz Naeem <zorai...@chromium.org>
Gerrit-Reviewer: Mitsuru Oshima <osh...@chromium.org>
Gerrit-Reviewer: SLSA Policy Verification Service <devtools-gerritco...@google.com>
Gerrit-Reviewer: Zoraiz Naeem <zorai...@chromium.org>
Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
Gerrit-CC: AJITH KUMAR V <aji...@chromium.org>
Gerrit-CC: Achuith Bhandarkar <ach...@chromium.org>
Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
Gerrit-CC: Daniel Andersson <dande...@chromium.org>
Gerrit-CC: Henrique Ferreiro <hfer...@igalia.com>
Gerrit-CC: Ian Vollick <vol...@chromium.org>
Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
Gerrit-CC: Zhe Su <su...@chromium.org>
Gerrit-Attention: Mitsuru Oshima <osh...@chromium.org>
Gerrit-Comment-Date: Mon, 15 Jun 2026 21:56:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Mitsuru Oshima (Gerrit)

unread,
Jun 16, 2026, 3:47:38 AMJun 16
to Zoraiz Naeem, SLSA Policy Verification Service, Chromium LUCI CQ, Achuith Bhandarkar, AJITH KUMAR V, chromium...@chromium.org, Daniel Andersson, devtools...@chromium.org, Henrique Ferreiro, (Julie)Jeongeun Kim, Sadrul Chowdhury, Zhe Su, Ian Vollick, abigailbk...@google.com, aji...@samsung.com, alexmo...@chromium.org, arc-review...@google.com, bici...@google.com, cc-...@chromium.org, creis...@chromium.org, croissant-...@chromium.org, cros-system-ui-prod...@google.com, dtseng...@chromium.org, francisjp...@google.com, hidehik...@chromium.org, hirokisa...@chromium.org, jbauma...@chromium.org, josiah...@chromium.org, katie...@chromium.org, keithle...@chromium.org, kyungjunle...@google.com, lens-chrome...@google.com, mac-r...@chromium.org, mercer...@google.com, navigation...@chromium.org, nektar...@chromium.org, nona+...@chromium.org, oshima...@chromium.org, roblia...@chromium.org, shuche...@chromium.org, sky+...@chromium.org, stanfie...@google.com, tote-eng...@google.com, tranbaod...@chromium.org, yhanad...@chromium.org, yhanada+...@chromium.org
Attention needed from Zoraiz Naeem

Mitsuru Oshima added 1 comment

File ui/compositor/layer.h
Line 91, Patchset 11 (Latest): static std::unique_ptr<Layer> Create(LayerType type);
Zoraiz Naeem . unresolved

@oshima-san, let me know if you are okay with the idea. I will then proceed to fix the compilation and change a few more sematics.

Mitsuru Oshima

Yes

Open in Gerrit

Related details

Attention is currently required from:
  • Zoraiz Naeem
Gerrit-Attention: Zoraiz Naeem <zorai...@chromium.org>
Gerrit-Comment-Date: Tue, 16 Jun 2026 07:47:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Zoraiz Naeem <zorai...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Zoraiz Naeem (Gerrit)

unread,
Jun 21, 2026, 5:57:55 PM (13 days ago) Jun 21
to SLSA Policy Verification Service, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, Mitsuru Oshima, Achuith Bhandarkar, AJITH KUMAR V, chromium...@chromium.org, Daniel Andersson, devtools...@chromium.org, Henrique Ferreiro, (Julie)Jeongeun Kim, Sadrul Chowdhury, Zhe Su, Ian Vollick, crostin...@chromium.org, yhanada+...@chromium.org, dewitt...@chromium.org, abigailbk...@google.com, aji...@samsung.com, alexmo...@chromium.org, arc-review...@google.com, bici...@google.com, cc-...@chromium.org, creis...@chromium.org, croissant-...@chromium.org, cros-system-ui-prod...@google.com, dtseng...@chromium.org, francisjp...@google.com, hidehik...@chromium.org, hirokisa...@chromium.org, jbauma...@chromium.org, josiah...@chromium.org, katie...@chromium.org, keithle...@chromium.org, kyungjunle...@google.com, lens-chrome...@google.com, mac-r...@chromium.org, mercer...@google.com, navigation...@chromium.org, nektar...@chromium.org, nona+...@chromium.org, oshima...@chromium.org, roblia...@chromium.org, shuche...@chromium.org, sky+...@chromium.org, stanfie...@google.com, tote-eng...@google.com, tranbaod...@chromium.org, yhanad...@chromium.org, yhanada+...@chromium.org
Attention needed from Mitsuru Oshima

Zoraiz Naeem voted and added 2 comments

Votes added by Zoraiz Naeem

Commit-Queue+1

2 comments

Patchset-level comments
File-level comment, Patchset 23 (Latest):
Zoraiz Naeem . resolved

PTAL again!

File ui/compositor/layer_owner.h
Line 96, Patchset 23 (Latest):
Zoraiz Naeem . unresolved

This is nessary, to keep the forward declar of Layer/LayerXXX classes declared. Otherwise, if we include ui/layer.h, it bloats the binary size by 2gb.

I can probably condense it by defining a macro.

Open in Gerrit

Related details

Attention is currently required from:
  • Mitsuru Oshima
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: I0e66f19d0a527f44f491c5e898466dca0e0fdf65
Gerrit-Change-Number: 7928750
Gerrit-PatchSet: 23
Gerrit-Owner: Zoraiz Naeem <zorai...@chromium.org>
Gerrit-Reviewer: Mitsuru Oshima <osh...@chromium.org>
Gerrit-Reviewer: SLSA Policy Verification Service <devtools-gerritco...@google.com>
Gerrit-Reviewer: Zoraiz Naeem <zorai...@chromium.org>
Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
Gerrit-CC: AJITH KUMAR V <aji...@chromium.org>
Gerrit-CC: Achuith Bhandarkar <ach...@chromium.org>
Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
Gerrit-CC: Daniel Andersson <dande...@chromium.org>
Gerrit-CC: Henrique Ferreiro <hfer...@igalia.com>
Gerrit-CC: Ian Vollick <vol...@chromium.org>
Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
Gerrit-CC: Zhe Su <su...@chromium.org>
Gerrit-Attention: Mitsuru Oshima <osh...@chromium.org>
Gerrit-Comment-Date: Sun, 21 Jun 2026 21:57:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Mitsuru Oshima (Gerrit)

unread,
Jun 26, 2026, 8:40:06 PM (8 days ago) Jun 26
to Zoraiz Naeem, Code Review Nudger, SLSA Policy Verification Service, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, Achuith Bhandarkar, AJITH KUMAR V, chromium...@chromium.org, Daniel Andersson, devtools...@chromium.org, Henrique Ferreiro, (Julie)Jeongeun Kim, Sadrul Chowdhury, Zhe Su, Ian Vollick, crostin...@chromium.org, yhanada+...@chromium.org, dewitt...@chromium.org, abigailbk...@google.com, aji...@samsung.com, alexmo...@chromium.org, arc-review...@google.com, bici...@google.com, cc-...@chromium.org, creis...@chromium.org, croissant-...@chromium.org, cros-system-ui-prod...@google.com, dtseng...@chromium.org, francisjp...@google.com, hidehik...@chromium.org, hirokisa...@chromium.org, jbauma...@chromium.org, josiah...@chromium.org, katie...@chromium.org, keithle...@chromium.org, kyungjunle...@google.com, lens-chrome...@google.com, mac-r...@chromium.org, mercer...@google.com, navigation...@chromium.org, nektar...@chromium.org, nona+...@chromium.org, oshima...@chromium.org, roblia...@chromium.org, shuche...@chromium.org, sky+...@chromium.org, stanfie...@google.com, tote-eng...@google.com, tranbaod...@chromium.org, yhanad...@chromium.org, yhanada+...@chromium.org
Attention needed from Zoraiz Naeem

Mitsuru Oshima added 3 comments

Patchset-level comments
Mitsuru Oshima . resolved

just a generic comment about the type usage.

File ash/accessibility/magnifier/docked_magnifier_controller.h
Line 209, Patchset 23 (Latest): std::unique_ptr<ui::LayerSolidColor> viewport_background_layer_;
Mitsuru Oshima . unresolved

If Layer interface is enough, just use Layer, and instantiate the specific class.

Line 124, Patchset 23 (Latest): const ui::LayerSolidColor* GetViewportMagnifierLayerForTesting() const;
Mitsuru Oshima . unresolved

do you need to expose the type for this API?

Open in Gerrit

Related details

Attention is currently required from:
  • Zoraiz Naeem
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: I0e66f19d0a527f44f491c5e898466dca0e0fdf65
Gerrit-Change-Number: 7928750
Gerrit-PatchSet: 23
Gerrit-Owner: Zoraiz Naeem <zorai...@chromium.org>
Gerrit-Reviewer: Mitsuru Oshima <osh...@chromium.org>
Gerrit-Reviewer: SLSA Policy Verification Service <devtools-gerritco...@google.com>
Gerrit-Reviewer: Zoraiz Naeem <zorai...@chromium.org>
Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
Gerrit-CC: AJITH KUMAR V <aji...@chromium.org>
Gerrit-CC: Achuith Bhandarkar <ach...@chromium.org>
Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
Gerrit-CC: Daniel Andersson <dande...@chromium.org>
Gerrit-CC: Henrique Ferreiro <hfer...@igalia.com>
Gerrit-CC: Ian Vollick <vol...@chromium.org>
Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
Gerrit-CC: Zhe Su <su...@chromium.org>
Gerrit-Attention: Zoraiz Naeem <zorai...@chromium.org>
Gerrit-Comment-Date: Sat, 27 Jun 2026 00:39:49 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Zoraiz Naeem (Gerrit)

unread,
Jun 29, 2026, 2:36:37 PM (5 days ago) Jun 29
to Robert Flack, Code Review Nudger, SLSA Policy Verification Service, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, Mitsuru Oshima, Achuith Bhandarkar, AJITH KUMAR V, chromium...@chromium.org, Daniel Andersson, devtools...@chromium.org, Henrique Ferreiro, (Julie)Jeongeun Kim, Sadrul Chowdhury, Zhe Su, Ian Vollick, crostin...@chromium.org, yhanada+...@chromium.org, dewitt...@chromium.org, abigailbk...@google.com, aji...@samsung.com, alexmo...@chromium.org, arc-review...@google.com, bici...@google.com, cc-...@chromium.org, creis...@chromium.org, croissant-...@chromium.org, cros-system-ui-prod...@google.com, dtseng...@chromium.org, francisjp...@google.com, hidehik...@chromium.org, hirokisa...@chromium.org, jbauma...@chromium.org, josiah...@chromium.org, katie...@chromium.org, keithle...@chromium.org, kyungjunle...@google.com, lens-chrome...@google.com, mac-r...@chromium.org, mercer...@google.com, navigation...@chromium.org, nektar...@chromium.org, nona+...@chromium.org, oshima...@chromium.org, roblia...@chromium.org, shuche...@chromium.org, sky+...@chromium.org, stanfie...@google.com, tote-eng...@google.com, tranbaod...@chromium.org, yhanad...@chromium.org, yhanada+...@chromium.org
Attention needed from Robert Flack

Zoraiz Naeem added 1 comment

Patchset-level comments
Zoraiz Naeem . resolved

flackr@ PTAL. Let us know if you are okay making this change in ui::Layer API? I eventually plan to move most of the type specific logic into the subclasses.

I might also introduce a new layer type that handles embedding contents. (aka a standlone wrapper around cc::SurfaceLayer)

Open in Gerrit

Related details

Attention is currently required from:
  • Robert Flack
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: I0e66f19d0a527f44f491c5e898466dca0e0fdf65
Gerrit-Change-Number: 7928750
Gerrit-PatchSet: 23
Gerrit-Owner: Zoraiz Naeem <zorai...@chromium.org>
Gerrit-Reviewer: Mitsuru Oshima <osh...@chromium.org>
Gerrit-Reviewer: Robert Flack <fla...@chromium.org>
Gerrit-Reviewer: SLSA Policy Verification Service <devtools-gerritco...@google.com>
Gerrit-Reviewer: Zoraiz Naeem <zorai...@chromium.org>
Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
Gerrit-CC: AJITH KUMAR V <aji...@chromium.org>
Gerrit-CC: Achuith Bhandarkar <ach...@chromium.org>
Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
Gerrit-CC: Daniel Andersson <dande...@chromium.org>
Gerrit-CC: Henrique Ferreiro <hfer...@igalia.com>
Gerrit-CC: Ian Vollick <vol...@chromium.org>
Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
Gerrit-CC: Zhe Su <su...@chromium.org>
Gerrit-Attention: Robert Flack <fla...@chromium.org>
Gerrit-Comment-Date: Mon, 29 Jun 2026 18:36:19 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Zoraiz Naeem (Gerrit)

unread,
Jun 29, 2026, 2:36:57 PM (5 days ago) Jun 29
to Robert Flack, Code Review Nudger, SLSA Policy Verification Service, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, Mitsuru Oshima, Achuith Bhandarkar, AJITH KUMAR V, chromium...@chromium.org, Daniel Andersson, devtools...@chromium.org, Henrique Ferreiro, (Julie)Jeongeun Kim, Sadrul Chowdhury, Zhe Su, Ian Vollick, crostin...@chromium.org, yhanada+...@chromium.org, dewitt...@chromium.org, abigailbk...@google.com, aji...@samsung.com, alexmo...@chromium.org, arc-review...@google.com, bici...@google.com, cc-...@chromium.org, creis...@chromium.org, croissant-...@chromium.org, cros-system-ui-prod...@google.com, dtseng...@chromium.org, francisjp...@google.com, hidehik...@chromium.org, hirokisa...@chromium.org, jbauma...@chromium.org, josiah...@chromium.org, katie...@chromium.org, keithle...@chromium.org, kyungjunle...@google.com, lens-chrome...@google.com, mac-r...@chromium.org, mercer...@google.com, navigation...@chromium.org, nektar...@chromium.org, nona+...@chromium.org, oshima...@chromium.org, roblia...@chromium.org, shuche...@chromium.org, sky+...@chromium.org, stanfie...@google.com, tote-eng...@google.com, tranbaod...@chromium.org, yhanad...@chromium.org, yhanada+...@chromium.org
Attention needed from Robert Flack

Zoraiz Naeem added 1 comment

Patchset-level comments
Zoraiz Naeem . unresolved

flackr@ PTAL. Let us know if you are okay making this change in ui::Layer API? I eventually plan to move most of the type specific logic into the subclasses.

I might also introduce a new layer type that handles embedding contents. (aka a standlone wrapper around cc::SurfaceLayer)

Zoraiz Naeem

.

Gerrit-Comment-Date: Mon, 29 Jun 2026 18:36:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Zoraiz Naeem <zorai...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Robert Flack (Gerrit)

unread,
Jun 30, 2026, 1:31:59 PM (4 days ago) Jun 30
to Zoraiz Naeem, Code Review Nudger, SLSA Policy Verification Service, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, Mitsuru Oshima, Achuith Bhandarkar, AJITH KUMAR V, chromium...@chromium.org, Daniel Andersson, devtools...@chromium.org, Henrique Ferreiro, (Julie)Jeongeun Kim, Sadrul Chowdhury, Zhe Su, Ian Vollick, crostin...@chromium.org, yhanada+...@chromium.org, dewitt...@chromium.org, abigailbk...@google.com, aji...@samsung.com, alexmo...@chromium.org, arc-review...@google.com, bici...@google.com, cc-...@chromium.org, creis...@chromium.org, croissant-...@chromium.org, cros-system-ui-prod...@google.com, dtseng...@chromium.org, francisjp...@google.com, hidehik...@chromium.org, hirokisa...@chromium.org, jbauma...@chromium.org, josiah...@chromium.org, katie...@chromium.org, keithle...@chromium.org, kyungjunle...@google.com, lens-chrome...@google.com, mac-r...@chromium.org, mercer...@google.com, navigation...@chromium.org, nektar...@chromium.org, nona+...@chromium.org, oshima...@chromium.org, roblia...@chromium.org, shuche...@chromium.org, sky+...@chromium.org, stanfie...@google.com, tote-eng...@google.com, tranbaod...@chromium.org, yhanad...@chromium.org, yhanada+...@chromium.org
Attention needed from Zoraiz Naeem

Robert Flack added 3 comments

Patchset-level comments
Zoraiz Naeem . unresolved

flackr@ PTAL. Let us know if you are okay making this change in ui::Layer API? I eventually plan to move most of the type specific logic into the subclasses.

I might also introduce a new layer type that handles embedding contents. (aka a standlone wrapper around cc::SurfaceLayer)

Zoraiz Naeem

.

Robert Flack

Yes, I think it's good for readability if we can reduce the size of the layer api and move the type-specific behaviors to subclasses.

File ui/compositor/layer.h
Line 115, Patchset 23 (Latest): // TODO(b:522627357): Add a templated version.
Robert Flack . unresolved

Why does clone and mirror need to be templated? Aren't the specific types subclasses of Layer? I.e. isn't this just a plain virtual function that is implemented in each of the subclasses?

Line 91, Patchset 11: static std::unique_ptr<Layer> Create(LayerType type);
Zoraiz Naeem . unresolved

@oshima-san, let me know if you are okay with the idea. I will then proceed to fix the compilation and change a few more sematics.

Mitsuru Oshima

Yes

Robert Flack

I'm not sure if I see the advantage of templating the create method over having callers call the specific create method for the layer type they want - e.g. `LayerTextured::Create()`. The latter would support having specific required parameters for some layer types if this made sense for some layer types.

Open in Gerrit

Related details

Attention is currently required from:
  • Zoraiz Naeem
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
    • requirement satisfiedSLSA-Policy-Verified
    Gerrit-Attention: Zoraiz Naeem <zorai...@chromium.org>
    Gerrit-Comment-Date: Tue, 30 Jun 2026 17:31:50 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Zoraiz Naeem <zorai...@chromium.org>
    Comment-In-Reply-To: Mitsuru Oshima <osh...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Zoraiz Naeem (Gerrit)

    unread,
    Jul 2, 2026, 6:09:29 PM (2 days ago) Jul 2
    to SLSA Policy Verification Service, Robert Flack, Code Review Nudger, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, Mitsuru Oshima, Achuith Bhandarkar, AJITH KUMAR V, chromium...@chromium.org, Daniel Andersson, devtools...@chromium.org, Henrique Ferreiro, (Julie)Jeongeun Kim, Sadrul Chowdhury, Zhe Su, Ian Vollick, crostin...@chromium.org, yhanada+...@chromium.org, dewitt...@chromium.org, abigailbk...@google.com, aji...@samsung.com, alexmo...@chromium.org, arc-review...@google.com, bici...@google.com, cc-...@chromium.org, creis...@chromium.org, croissant-...@chromium.org, cros-system-ui-prod...@google.com, dtseng...@chromium.org, francisjp...@google.com, hidehik...@chromium.org, hirokisa...@chromium.org, jbauma...@chromium.org, josiah...@chromium.org, katie...@chromium.org, keithle...@chromium.org, kyungjunle...@google.com, lens-chrome...@google.com, mac-r...@chromium.org, mercer...@google.com, navigation...@chromium.org, nektar...@chromium.org, nona+...@chromium.org, oshima...@chromium.org, roblia...@chromium.org, shuche...@chromium.org, sky+...@chromium.org, stanfie...@google.com, tote-eng...@google.com, tranbaod...@chromium.org, yhanad...@chromium.org, yhanada+...@chromium.org
    Attention needed from Mitsuru Oshima and Robert Flack

    Zoraiz Naeem added 6 comments

    Patchset-level comments
    File-level comment, Patchset 23:
    Zoraiz Naeem . resolved

    flackr@ PTAL. Let us know if you are okay making this change in ui::Layer API? I eventually plan to move most of the type specific logic into the subclasses.

    I might also introduce a new layer type that handles embedding contents. (aka a standlone wrapper around cc::SurfaceLayer)

    Zoraiz Naeem

    .

    Robert Flack

    Yes, I think it's good for readability if we can reduce the size of the layer api and move the type-specific behaviors to subclasses.

    Zoraiz Naeem

    Acknowledged

    File-level comment, Patchset 26 (Latest):
    Zoraiz Naeem . resolved

    PTAL again.

    File ash/accessibility/magnifier/docked_magnifier_controller.h
    Line 209, Patchset 23: std::unique_ptr<ui::LayerSolidColor> viewport_background_layer_;
    Mitsuru Oshima . resolved

    If Layer interface is enough, just use Layer, and instantiate the specific class.

    Zoraiz Naeem

    I will keep the the layer type explicit when defining member variables since it provides us better readability and intention of how these layer will be used.

    However if a class is storing a general reference to a layer that it does not own, I will keep it as ui::Layer most of the time.

    Line 124, Patchset 23: const ui::LayerSolidColor* GetViewportMagnifierLayerForTesting() const;
    Mitsuru Oshima . resolved

    do you need to expose the type for this API?

    Zoraiz Naeem

    As discussed offline, methods like these should returns ui::Layer as long as the Layer interface is enough.

    File ui/compositor/layer.h
    Line 115, Patchset 23: // TODO(b:522627357): Add a templated version.
    Robert Flack . unresolved

    Why does clone and mirror need to be templated? Aren't the specific types subclasses of Layer? I.e. isn't this just a plain virtual function that is implemented in each of the subclasses?

    Zoraiz Naeem

    I wanted it be a virtual method so that I clone in additional type specific properties. That was the main goal.

    I think it was nice to have Clone/mirror method to return the subclass. Hence the comment (which might not be possible)

    Line 91, Patchset 11: static std::unique_ptr<Layer> Create(LayerType type);
    Zoraiz Naeem . unresolved

    @oshima-san, let me know if you are okay with the idea. I will then proceed to fix the compilation and change a few more sematics.

    Mitsuru Oshima

    Yes

    Robert Flack

    I'm not sure if I see the advantage of templating the create method over having callers call the specific create method for the layer type they want - e.g. `LayerTextured::Create()`. The latter would support having specific required parameters for some layer types if this made sense for some layer types.

    Zoraiz Naeem

    I agree that it is better to have a factory method defined in the subclasses than templating it, given the future flexibility of supplying type specific paramters.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Mitsuru Oshima
    • Robert Flack
    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: I0e66f19d0a527f44f491c5e898466dca0e0fdf65
    Gerrit-Change-Number: 7928750
    Gerrit-PatchSet: 26
    Gerrit-Owner: Zoraiz Naeem <zorai...@chromium.org>
    Gerrit-Reviewer: Mitsuru Oshima <osh...@chromium.org>
    Gerrit-Reviewer: Robert Flack <fla...@chromium.org>
    Gerrit-Reviewer: SLSA Policy Verification Service <devtools-gerritco...@google.com>
    Gerrit-Reviewer: Zoraiz Naeem <zorai...@chromium.org>
    Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
    Gerrit-CC: AJITH KUMAR V <aji...@chromium.org>
    Gerrit-CC: Achuith Bhandarkar <ach...@chromium.org>
    Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
    Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
    Gerrit-CC: Daniel Andersson <dande...@chromium.org>
    Gerrit-CC: Henrique Ferreiro <hfer...@igalia.com>
    Gerrit-CC: Ian Vollick <vol...@chromium.org>
    Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
    Gerrit-CC: Zhe Su <su...@chromium.org>
    Gerrit-Attention: Robert Flack <fla...@chromium.org>
    Gerrit-Attention: Mitsuru Oshima <osh...@chromium.org>
    Gerrit-Comment-Date: Thu, 02 Jul 2026 22:09:14 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Zoraiz Naeem <zorai...@chromium.org>
    Comment-In-Reply-To: Robert Flack <fla...@chromium.org>
    Comment-In-Reply-To: Mitsuru Oshima <osh...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Robert Flack (Gerrit)

    unread,
    Jul 3, 2026, 11:57:34 AM (yesterday) Jul 3
    to Zoraiz Naeem, SLSA Policy Verification Service, Code Review Nudger, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, Mitsuru Oshima, Achuith Bhandarkar, AJITH KUMAR V, chromium...@chromium.org, Daniel Andersson, devtools...@chromium.org, Henrique Ferreiro, (Julie)Jeongeun Kim, Sadrul Chowdhury, Zhe Su, Ian Vollick, crostin...@chromium.org, yhanada+...@chromium.org, dewitt...@chromium.org, abigailbk...@google.com, aji...@samsung.com, alexmo...@chromium.org, arc-review...@google.com, bici...@google.com, cc-...@chromium.org, creis...@chromium.org, croissant-...@chromium.org, cros-system-ui-prod...@google.com, dtseng...@chromium.org, francisjp...@google.com, hidehik...@chromium.org, hirokisa...@chromium.org, jbauma...@chromium.org, josiah...@chromium.org, katie...@chromium.org, keithle...@chromium.org, kyungjunle...@google.com, lens-chrome...@google.com, mac-r...@chromium.org, mercer...@google.com, navigation...@chromium.org, nektar...@chromium.org, nona+...@chromium.org, oshima...@chromium.org, roblia...@chromium.org, shuche...@chromium.org, sky+...@chromium.org, stanfie...@google.com, tote-eng...@google.com, tranbaod...@chromium.org, yhanad...@chromium.org, yhanada+...@chromium.org
    Attention needed from Mitsuru Oshima and Zoraiz Naeem

    Robert Flack added 3 comments

    File ui/compositor/layer.h
    Line 209, Patchset 27 (Latest): LayerType type() const { return type_; }
    Robert Flack . unresolved

    I wonder if it would be better to make this a pure virtual function overridden in the subclasses. There's technically no need to store this as a member variable since the specific subclass vtable determines the type and making this explicit would mean no chance of those two being out of sync.

    Line 115, Patchset 23: // TODO(b:522627357): Add a templated version.
    Robert Flack . unresolved

    Why does clone and mirror need to be templated? Aren't the specific types subclasses of Layer? I.e. isn't this just a plain virtual function that is implemented in each of the subclasses?

    Zoraiz Naeem

    I wanted it be a virtual method so that I clone in additional type specific properties. That was the main goal.

    I think it was nice to have Clone/mirror method to return the subclass. Hence the comment (which might not be possible)

    Robert Flack

    Clone and Mirror should be pure virtual in the base class and overridden in the subclasses which will allow for cloning and mirroring the subclass specific properties.

    File ui/compositor/layer.cc
    Line 255, Patchset 27 (Latest):std::unique_ptr<Layer> Layer::Create(LayerType type) {
    Robert Flack . unresolved

    We should remove this and require callers invoke the specific subclass create method.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Mitsuru Oshima
    • Zoraiz Naeem
    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: I0e66f19d0a527f44f491c5e898466dca0e0fdf65
    Gerrit-Change-Number: 7928750
    Gerrit-PatchSet: 27
    Gerrit-Owner: Zoraiz Naeem <zorai...@chromium.org>
    Gerrit-Reviewer: Mitsuru Oshima <osh...@chromium.org>
    Gerrit-Reviewer: Robert Flack <fla...@chromium.org>
    Gerrit-Reviewer: SLSA Policy Verification Service <devtools-gerritco...@google.com>
    Gerrit-Reviewer: Zoraiz Naeem <zorai...@chromium.org>
    Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
    Gerrit-CC: AJITH KUMAR V <aji...@chromium.org>
    Gerrit-CC: Achuith Bhandarkar <ach...@chromium.org>
    Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
    Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
    Gerrit-CC: Daniel Andersson <dande...@chromium.org>
    Gerrit-CC: Henrique Ferreiro <hfer...@igalia.com>
    Gerrit-CC: Ian Vollick <vol...@chromium.org>
    Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
    Gerrit-CC: Zhe Su <su...@chromium.org>
    Gerrit-Attention: Zoraiz Naeem <zorai...@chromium.org>
    Gerrit-Attention: Mitsuru Oshima <osh...@chromium.org>
    Gerrit-Comment-Date: Fri, 03 Jul 2026 15:57:24 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages