Module: wine Branch: master Commit: e771fc8dde7d124429908dab157591d1287a3e1d URL: https://source.winehq.org/git/wine.git/?a=commit;h=e771fc8dde7d124429908dab1...
Author: Chip Davis cdavis@codeweavers.com Date: Mon Apr 6 17:51:59 2020 -0500
d2d1: Introduce a function to convert D2D1.0 interpolation modes to D2D1.1.
Signed-off-by: Chip Davis cdavis@codeweavers.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/d2d1/brush.c | 2 +- dlls/d2d1/d2d1_private.h | 5 +++++ dlls/d2d1/device.c | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/d2d1/brush.c b/dlls/d2d1/brush.c index 675fa52e72..1f455897f6 100644 --- a/dlls/d2d1/brush.c +++ b/dlls/d2d1/brush.c @@ -962,7 +962,7 @@ static void STDMETHODCALLTYPE d2d_bitmap_brush_SetInterpolationMode(ID2D1BitmapB return; }
- brush->u.bitmap.interpolation_mode = mode; + brush->u.bitmap.interpolation_mode = d2d1_1_interp_mode_from_d2d1(mode); if (brush->u.bitmap.sampler_state) { ID3D10SamplerState_Release(brush->u.bitmap.sampler_state); diff --git a/dlls/d2d1/d2d1_private.h b/dlls/d2d1/d2d1_private.h index a2546a5b1c..4eb7e33142 100644 --- a/dlls/d2d1/d2d1_private.h +++ b/dlls/d2d1/d2d1_private.h @@ -634,6 +634,11 @@ static inline void d2d_rect_expand(D2D1_RECT_F *dst, const D2D1_POINT_2F *point) dst->bottom = point->y; }
+static inline D2D1_INTERPOLATION_MODE d2d1_1_interp_mode_from_d2d1(D2D1_BITMAP_INTERPOLATION_MODE mode) +{ + return (D2D1_INTERPOLATION_MODE)mode; +} + static inline const char *debug_d2d_point_2f(const D2D1_POINT_2F *point) { if (!point) diff --git a/dlls/d2d1/device.c b/dlls/d2d1/device.c index 146f7009da..acecb2058a 100644 --- a/dlls/d2d1/device.c +++ b/dlls/d2d1/device.c @@ -1143,7 +1143,8 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawBitmap(ID2D1DeviceContext * return; }
- d2d_device_context_draw_bitmap(context, bitmap, dst_rect, opacity, interpolation_mode, src_rect, NULL); + d2d_device_context_draw_bitmap(context, bitmap, dst_rect, opacity, d2d1_1_interp_mode_from_d2d1(interpolation_mode), + src_rect, NULL); }
static void STDMETHODCALLTYPE d2d_device_context_DrawText(ID2D1DeviceContext *iface,