Following up on How can I render mixed-colour text in DirectWrite?, what's the best practice to handle device loss when passing a device-dependent resource — e.g. an ID2D1LinearGradientBrush
or any other ID2D1Brush
— as the first parameter of IDWriteTextLayout::SetDrawingEffect
?
To the best of my knowledge, I think IDWriteTextLayout
was a device-independent resource.