On Thu, 4 Oct 2018 at 15:08, Nikolay Sivov nsivov@codeweavers.com wrote:
@@ -1015,6 +1016,13 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawBitmap(ID2D1DeviceContext * TRACE("iface %p, bitmap %p, dst_rect %s, opacity %.8e, interpolation_mode %#x, src_rect %s.\n", iface, bitmap, debug_d2d_rect_f(dst_rect), opacity, interpolation_mode, debug_d2d_rect_f(src_rect));
- if (interpolation_mode != D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR
&& interpolation_mode != D2D1_BITMAP_INTERPOLATION_MODE_LINEAR)
- {
context->error.code = E_INVALIDARG;
return;
- }
I think a helper for setting an error on the context would be helpful. If I understood the way it's supposed to work correctly, we shouldn't overwrite any existing errors, and copy the current tags when we do set an error code. I think d2d_device_context_FillGeometry() is the only place that actually does that, so this patch isn't making things all that much worse, but it seems like a good thing to improve.