Repository navigation
Description
src/fl/channels/channel.h:190:
/// P2 binds profiles only. P6 changes this to true when the streaming
/// transform is actually installed in the output path.
bool isColorManaged() const FL_NO_EXCEPT { return false; }P6 (#4040) has landed. Channel::mPipeline is built in reconcileColorProfile and consumed in showPixels, and the transform demonstrably runs. The accessor was never updated, so it returns false on every channel, unconditionally, forever.
#4034's decision digest lists this as one of the things a caller is promised:
Driver-only chipsets with no profile fall back to the legacy path with: one-time warning, queryable
isColorManaged(), fallback flag in channel events/telemetry, and opt-in global strict mode that upgrades fallback to a hard error.
The whole point of the accessor is to let a caller tell whether management is active. It cannot.
Measured
A channel bound to an sRGB-primaries emitter profile with unit luminances, fed sRGB red/green/blue at full, encoded through WS2812 (no gamma anywhere on that path):
| input | drive out | expected |
|---|---|---|
CRGB(255,0,0) |
54 | 0.2126 x 255 = 54 |
CRGB(0,255,0) |
182 | 0.7152 x 255 = 182 |
CRGB(0,0,255) |
18 | 0.0722 x 255 = 18 |
Those are sRGB's luminance coefficients, exactly. The device's emitters each produce luminance 1.0 at full drive, so reproducing sRGB red's Y = 0.2126 requires drive 0.2126 — the pipeline is doing precisely the right thing, which is the point: colour management is unambiguously active.
isColorManaged() reports false on that channel before and after the show.
An unbound channel on the same path passes 127 through as 127, so the transform is real and not a coincidence of the fixture.
Fix
Return whether the transform is installed:
bool isColorManaged() const FL_NO_EXCEPT { return mPipeline != nullptr; }guarded for FL_COLOR_PROFILE_RUNTIME, where the member exists.
Note that hasColorProfile() and isColorManaged() are then genuinely different: a binding can be accepted and still fail to build a usable pipeline, which leaves the channel on the legacy path. That distinction is the reason both accessors exist.
Knock-on
tests/fl/channels/color_profile.cpp has a case named "Channel profile binding owns fixture calibration without activating P6 rendering" asserting FL_CHECK_FALSE(channel->isColorManaged()). That expectation is stale — it passes only because the accessor is a constant. It needs to be re-read against what the channel now actually does, not adjusted to keep it green.
🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
test(channels): drop the isColorManaged assertion this PR only borrowed
test(channels): first coverage for the Channels UCS7604 encode path (#…
fix(channels): isColorManaged() reports the transform, not a constant (…