summaryrefslogtreecommitdiff
path: root/src/win32/cairo-dwrite-font.cpp
diff options
context:
space:
mode:
authorFujii Hironori <Hironori.Fujii@sony.com>2023-02-24 10:58:40 +0900
committerFujii Hironori <Hironori.Fujii@sony.com>2023-02-27 11:55:30 +0900
commit950e3fb45d976e80af99cccd438568da975934d8 (patch)
tree9452885fe59222d9d779c8c92dd276d24eb7f825 /src/win32/cairo-dwrite-font.cpp
parent6a5f2140d78f1ccff8642c33eac3b0a8b86a5723 (diff)
downloadcairo-950e3fb45d976e80af99cccd438568da975934d8.tar.gz
Change the workaround of MinGW dwrite_3.h problem
The DWRITE_COLOR_GLYPH_RUN1 struct definition of the old MinGW dwrite_3.h was invalid. To work around the problem, dw-extra.h defined the correct struct definition and all necessary API from dwrite_3.h. This approach needed to redefine all necessary API. This change added DWRITE_COLOR_GLYPH_RUN1_WORKAROUND struct and use it for IDWriteColorGlyphRunEnumerator1::GetCurrentRun.
Diffstat (limited to 'src/win32/cairo-dwrite-font.cpp')
-rw-r--r--src/win32/cairo-dwrite-font.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/win32/cairo-dwrite-font.cpp b/src/win32/cairo-dwrite-font.cpp
index 33c976e08..d1c4e63f1 100644
--- a/src/win32/cairo-dwrite-font.cpp
+++ b/src/win32/cairo-dwrite-font.cpp
@@ -1044,8 +1044,8 @@ _cairo_dwrite_scaled_font_init_glyph_color_surface(cairo_dwrite_scaled_font_t *s
if (FAILED(hr) || !have_run)
break;
- DWRITE_COLOR_GLYPH_RUN1 const* color_run;
- hr = run_enumerator->GetCurrentRun(&color_run);
+ DWRITE_COLOR_GLYPH_RUN1_WORKAROUND const* color_run;
+ hr = run_enumerator->GetCurrentRun(reinterpret_cast<const DWRITE_COLOR_GLYPH_RUN1**>(&color_run));
if (FAILED(hr))
return _cairo_dwrite_error (hr, "GetCurrentRun failed");