Skip to content

drm: add PrepareDrmObjectProperties trait - #1107

Merged
mahkoh merged 9 commits into
masterfrom
jorth-drm-property-value
Jul 18, 2026
Merged

drm: add PrepareDrmObjectProperties trait#1107
mahkoh merged 9 commits into
masterfrom
jorth-drm-property-value

Conversation

@mahkoh

@mahkoh mahkoh commented Jul 18, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings July 18, 2026 17:30
github-actions[bot]
github-actions Bot previously approved these changes Jul 18, 2026

Copilot AI 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.

Pull request overview

This PR introduces a reusable mechanism for tracking, updating, diffing, and emitting DRM object property changes (with optional logging), and refactors the Metal DRM backend to use it, reducing bespoke per-object property handling.

Changes:

  • Add DrmPropertyValue<T>, PrepareDrmObjectProperties / PrepareDrmObjectProperty, and logging helpers for preparing atomic DRM property changes.
  • Refactor Metal DRM state structs to store property IDs + typed values in *StateProps and generate updates/changes via #[derive(PrepareDrmObjectProperties)].
  • Relax Reset to no longer require Default, and update BoxCache bounds accordingly.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/video/drm.rs Adds generic property/value wrapper, property-prep traits, logging support, and extends DRM object/value conversion helpers.
src/utils/reset.rs Changes Reset trait semantics (drops Default supertrait) and expands numeric impls via macro.
src/utils/box_cache.rs Updates BoxReset cache usage to require Default explicitly where construction is needed.
src/backends/metal/video.rs Refactors property collection/storage to use DrmPropertyValue and new *StateProps structs.
src/backends/metal/transaction.rs Refactors transaction diff/prepare logic to use PrepareDrmObjectProperties derive and reset() instead of Default.
src/backends/metal/present.rs Updates runtime plane-property mutation to use DrmPropertyValue { id, value } layout.
jay-proc/src/lib.rs Exposes the new #[derive(PrepareDrmObjectProperties)] proc-macro.
jay-proc/src/drm_object_properties.rs Implements proc-macro that generates property update/diff/prepare + a specialized reset for property-holder structs.
algorithms/src/triangles.rs Adds a targeted Clippy suppression for a small loop.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/video/drm.rs
@mahkoh
mahkoh merged commit 2054f83 into master Jul 18, 2026
13 checks passed
@mahkoh
mahkoh deleted the jorth-drm-property-value branch July 18, 2026 17:43
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