Skip to content

refactor(waylib): rename ColorContentsMode to ColorLoadPolicy - #1735

Merged
zccrs merged 1 commit into
linuxdeepin:masterfrom
zccrs:zccrs/rename-color-load-policy
Nov 30, 2026
Merged

zccrs merged 1 commit into
linuxdeepin:masterfrom
zccrs:zccrs/rename-color-load-policy

Conversation

@zccrs

@zccrs zccrs commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

Rename WGlobal::ColorContentsMode to ColorLoadPolicy, including all
derived property/accessor/signal names, for naming consistency across
the enum type and its accessors:

  • ColorContentsMode -> ColorLoadPolicy
  • colorContentsMode() -> colorLoadPolicy()
  • setColorContentsMode() -> setColorLoadPolicy()
  • colorContentsModeChanged -> colorLoadPolicyChanged
  • resolveColorContentsMode() -> resolveColorLoadPolicy()

No behavior change. Split out of #1275 at its request, so that PR
only carries damage-tracking changes.

Test plan:

  • Full rebuild (cmake --build --preset ci -j16): clean, no errors
  • ctest --preset ci: 99/100 passed (1 pre-existing unrelated timeout
    in test_wayland_ext_session_lock_v1, not touching this enum;
    test_drm skipped, no hardware)

Summary by Sourcery

Enhancements:

  • Rename the color contents mode API to color load policy across rendering, layer, and viewport interfaces without changing behavior.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @zccrs, this pull request is too large to review

It changes 22,537 lines. Sourcery can review pull requests with up to 20,000 changed lines.

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: zccrs

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@zccrs
zccrs force-pushed the zccrs/rename-color-load-policy branch from 5bc5e3a to 03b60b0 Compare November 30, 2026 08:12
@sourcery-ai

sourcery-ai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

API

Rename the public enum and the output layer and viewport properties, accessors, and change signals that expose it.

  • waylib/src/server/kernel/wglobal.h L183, L188
  • waylib/src/server/qtquick/woutputlayer.h L25, L56-57, L79
  • waylib/src/server/qtquick/woutputviewport.h L27, L69-70, L114

Uses of the API

Update rendering and output code to use the renamed policy and keep the existing render behavior and scheduling connections.

  • waylib/src/server/qtquick/private/wbufferrenderer.cpp L334, L432
  • waylib/src/server/qtquick/private/wbufferrenderer_p.h L96, L133
  • waylib/src/server/qtquick/private/woutputviewport_p.h L24, L85
  • waylib/src/server/qtquick/woutputlayer.cpp L43, L180-192
  • waylib/src/server/qtquick/woutputrenderwindow.cpp L772-778 (+5 small edits)
  • waylib/src/server/qtquick/woutputviewport.cpp L271-283
  • waylib/src/server/qtquick/wrenderhelper.cpp L139-152, L664, L673-674
  • waylib/src/server/qtquick/wrenderhelper.h L62

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@zccrs
zccrs force-pushed the zccrs/rename-color-load-policy branch from 03b60b0 to 239e5d5 Compare November 30, 2026 08:29
1. Rename WGlobal::ColorContentsMode enum and all derived
   property/accessor/signal names for naming consistency.
2. colorContentsMode()/setColorContentsMode() become
   colorLoadPolicy()/setColorLoadPolicy(); colorContentsModeChanged
   becomes colorLoadPolicyChanged; resolveColorContentsMode()
   becomes resolveColorLoadPolicy().
3. No behavior change; split out of linuxdeepin#1275 so that PR only carries
   damage-tracking changes.

refactor: 将 ColorContentsMode 重命名为 ColorLoadPolicy

1. 重命名 WGlobal::ColorContentsMode 枚举及其所有派生的
   属性/访问器/信号名称,保持命名一致。
2. colorContentsMode()/setColorContentsMode() 改为
   colorLoadPolicy()/setColorLoadPolicy();colorContentsModeChanged
   改为 colorLoadPolicyChanged;resolveColorContentsMode() 改为
   resolveColorLoadPolicy()。
3. 无行为变化;从 linuxdeepin#1275 中拆出,使该 PR 只保留 damage 跟踪相关改动。

Log: 重命名 ColorContentsMode 枚举及其访问器为 ColorLoadPolicy,
  统一命名风格,无用户可见变化。
Influence:
  1. 全量重新编译(cmake --build --preset ci)确认无编译错误
  2. 搜索全仓库确认无残留的 ColorContentsMode/colorContentsMode 引用
  3. 运行 ctest --preset ci 确认现有单测全部通过(无新增失败)
  4. 检查 moc 生成代码中 Q_PROPERTY/Q_ENUM 反射信息是否随新名称正确更新
PMS:
@zccrs
zccrs force-pushed the zccrs/rename-color-load-policy branch from 239e5d5 to 0e4722f Compare November 30, 2026 08:38
@zccrs
zccrs merged commit 5486f6b into linuxdeepin:master Nov 30, 2026
10 checks passed
@zccrs
zccrs deleted the zccrs/rename-color-load-policy branch November 30, 2026 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants