ExternalTexture API
Declared by <huxerui/external_texture.h>.
Shared ownership
Section titled “Shared ownership”ExternalTexture is an abstract, non-copyable object. Construct a supported platform subclass and share it as std::shared_ptr<ExternalTexture>. A null pointer represents absence; there is no default value handle or HasValue() method.
Image(texture) and the corresponding PaintContext::DrawImage/DrawImageRect overloads consume that shared pointer. Static ImageFill sources remain image/vector assets, not live textures.
Observation
Section titled “Observation”IntrinsicSize(): immutable finite, positive logical size in DIPs, independent of the published frame’s pixel dimensions.Revision(): monotonically increasing publication revision, not a GPU handle or a frame timestamp.IsActive(): whether a committed RenderScene currently displays this identity. It is a production hint, not ownership or guaranteed visibility.
A new frame schedules repaint without recomposing the View or rerecording its PaintSequence. Change ordinary State for playback/error controls, not for every frame.
Producers
Section titled “Producers”Platform subclasses own mailbox format, synchronization, and publication. Their Finish() stops further publication while retaining the last frame. Publication after finish is invalid. Choose a new texture identity when logical size changes.
Subclassing the shared class does not automatically teach a renderer a new GPU format; the renderer must explicitly support the concrete mailbox type. Prefer the provided platform types and follow their thread and ownership contracts.

