On 5 November 2016 at 22:12, Nikolay Sivov nsivov@codeweavers.com wrote:
@@ -1574,14 +1575,89 @@ static HRESULT STDMETHODCALLTYPE d2d_text_renderer_DrawGlyphRun(IDWriteTextRende
if (desc) WARN("Ignoring glyph run description %p.\n", desc);
- if (context->options & ~D2D1_DRAW_TEXT_OPTIONS_NO_SNAP)
- if (context->options & ~(D2D1_DRAW_TEXT_OPTIONS_NO_SNAP|D2D1_DRAW_TEXT_OPTIONS_ENABLE_COLOR_FONT)) FIXME("Ignoring options %#x.\n", context->options);
"D2D1_DRAW_TEXT_OPTIONS_NO_SNAP | D2D1_DRAW_TEXT_OPTIONS_ENABLE_COLOR_FONT"
if (FAILED(hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, &IID_IDWriteFactory2,
(IUnknown **)&dwrite_factory)))
{
ERR("Failed to create dwrite factory, hr %#x.\n", hr);
return hr;
This leaks "brush".
hr = IDWriteFactory2_TranslateColorGlyphRun(dwrite_factory, baseline_origin_x, baseline_origin_y,
glyph_run, desc, measuring_mode, (DWRITE_MATRIX *)&render_target->drawing_state.transform, 0, &layers);
IDWriteFactory2_Release(dwrite_factory);
if (FAILED(hr))
{
ERR("Failed to create color glyph run enumerator, hr %#x.\n", hr);
return hr;
}
Likewise.
while (1)
for (;;)
if (color_run->paletteIndex == 0xffff)
color_brush = brush;
else
ID2D1RenderTarget_CreateSolidColorBrush(&render_target->ID2D1RenderTarget_iface,
&color_run->runColor, NULL, (ID2D1SolidColorBrush **)&color_brush);
CreateSolidColorBrush() can fail.