Skip to content

[codex] Fix Simulator PhotosCrop black canvas#302

Merged
muukii merged 1 commit into
v5from
codex/fix-simulator-photoscrop-black-canvas
Jun 16, 2026
Merged

[codex] Fix Simulator PhotosCrop black canvas#302
muukii merged 1 commit into
v5from
codex/fix-simulator-photoscrop-black-canvas

Conversation

@muukii

@muukii muukii commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes PhotosCrop rendering as a black canvas on iOS Simulator while keeping the 10-bit Display-P3 drawable path on real devices.

Root Cause

The editing canvas drawable pixel format was changed to .bgr10a2Unorm for the wide-gamut Display-P3 canvas path. That works on device, but recent iOS Simulator runtimes can create the MTKView and still present the drawable as black.

Changes

  • Use .bgra8Unorm for the editing canvas drawable on Simulator builds.
  • Keep .bgr10a2Unorm for device builds.
  • Add a regression test that locks the intended platform-specific drawable format while preserving the existing wide-gamut color math tests.

Verification

  • Reproduced the black PhotosCrop canvas in SwiftUIDemo on iPhone 17 Pro, iOS 26.5 Simulator before the fix.
  • Verified the same PhotosCrop Horizontal screen renders the image after the fix.
  • Ran BrightroomEngineTests/EditingCanvasColorContractTests: 3 passed.
  • Built and launched SwiftUIDemo successfully on the same Simulator.

@muukii muukii marked this pull request as ready for review June 16, 2026 17:32
@muukii muukii merged commit 4748adc into v5 Jun 16, 2026
2 checks passed
@muukii muukii deleted the codex/fix-simulator-photoscrop-black-canvas branch June 16, 2026 17:32
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.

1 participant