Wine-Devel
Threads by month
- ----- 2026 -----
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- 5 participants
- 84534 discussions
[PATCH 3/4] gdiplus/tests: Add initial tests for metafile created from printer DC.
by Ziqing Hui Jan. 15, 2021
by Ziqing Hui Jan. 15, 2021
Jan. 15, 2021
Signed-off-by: Ziqing Hui <zhui(a)codeweavers.com>
---
dlls/gdiplus/tests/metafile.c | 82 +++++++++++++++++++++++++++++++++++
1 file changed, 82 insertions(+)
1
0
[PATCH 1/5] winegstreamer: Rename gstdemux_source to parser_source.
by Zebediah Figura Jan. 15, 2021
by Zebediah Figura Jan. 15, 2021
Jan. 15, 2021
"gstdemux" is not a very specific name, or accurate (it does not always demux,
nor is it the only object which may demux using GStreamer). Also, while it
does not risk colliding with GStreamer definitions as-is (lacking an
underscore), I am inclined to avoid using "gst" or "gstreamer" as a prefix for
our definitions, simply for the sake of clarity.
"parser" is the common term for both DirectShow filters and GStreamer elements
which "drive" the pipeline, i.e. explicitly pull data from upstream and push
data downstream. While it's arguably still not specific enough (i.e. should be
specifically identified as a DirectShow parser), I think that the differing
terminology in Media Foundation (where the counterpart is a "media source")
makes the choice of a shorter name justifiable.
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/winegstreamer/gstdemux.c | 100 +++++++++++++++++-----------------
1 file changed, 50 insertions(+), 50 deletions(-)
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c
index 0243f8e20c1..19b7667bb06 100644
--- a/dlls/winegstreamer/gstdemux.c
+++ b/dlls/winegstreamer/gstdemux.c
@@ -54,7 +54,7 @@ struct gstdemux
struct strmbase_sink sink;
IAsyncReader *reader;
- struct gstdemux_source **sources;
+ struct parser_source **sources;
unsigned int source_count;
BOOL enum_sink_first;
@@ -70,11 +70,11 @@ struct gstdemux
HANDLE push_thread;
BOOL (*init_gst)(struct gstdemux *filter);
- HRESULT (*source_query_accept)(struct gstdemux_source *pin, const AM_MEDIA_TYPE *mt);
- HRESULT (*source_get_media_type)(struct gstdemux_source *pin, unsigned int index, AM_MEDIA_TYPE *mt);
+ HRESULT (*source_query_accept)(struct parser_source *pin, const AM_MEDIA_TYPE *mt);
+ HRESULT (*source_get_media_type)(struct parser_source *pin, unsigned int index, AM_MEDIA_TYPE *mt);
};
-struct gstdemux_source
+struct parser_source
{
struct strmbase_source pin;
IQualityControl IQualityControl_iface;
@@ -95,7 +95,7 @@ static const WCHAR wcsInputPinName[] = {'i','n','p','u','t',' ','p','i','n',0};
static const IMediaSeekingVtbl GST_Seeking_Vtbl;
static const IQualityControlVtbl GSTOutPin_QualityControl_Vtbl;
-static struct gstdemux_source *create_pin(struct gstdemux *filter, const WCHAR *name);
+static struct parser_source *create_pin(struct gstdemux *filter, const WCHAR *name);
static HRESULT GST_RemoveOutputPins(struct gstdemux *This);
static HRESULT WINAPI GST_ChangeCurrent(IMediaSeeking *iface);
static HRESULT WINAPI GST_ChangeStop(IMediaSeeking *iface);
@@ -479,7 +479,7 @@ static GstCaps *amt_to_gst_caps(const AM_MEDIA_TYPE *mt)
static gboolean query_sink(GstPad *pad, GstObject *parent, GstQuery *query)
{
- struct gstdemux_source *pin = gst_pad_get_element_private(pad);
+ struct parser_source *pin = gst_pad_get_element_private(pad);
TRACE("pin %p, type \"%s\".\n", pin, gst_query_type_get_name(query->type));
@@ -654,7 +654,7 @@ static gboolean event_src(GstPad *pad, GstObject *parent, GstEvent *event)
static gboolean event_sink(GstPad *pad, GstObject *parent, GstEvent *event)
{
- struct gstdemux_source *pin = gst_pad_get_element_private(pad);
+ struct parser_source *pin = gst_pad_get_element_private(pad);
gboolean ret;
TRACE("pin %p, type \"%s\".\n", pin, GST_EVENT_TYPE_NAME(event));
@@ -796,7 +796,7 @@ static DWORD CALLBACK push_data(LPVOID iface)
return 0;
}
-static HRESULT send_sample(struct gstdemux_source *pin, IMediaSample *sample,
+static HRESULT send_sample(struct parser_source *pin, IMediaSample *sample,
GstBuffer *buf, GstMapInfo *info, gsize offset, gsize size, DWORD bytes_per_second)
{
HRESULT hr;
@@ -861,7 +861,7 @@ static HRESULT send_sample(struct gstdemux_source *pin, IMediaSample *sample,
static GstFlowReturn got_data_sink(GstPad *pad, GstObject *parent, GstBuffer *buf)
{
- struct gstdemux_source *pin = gst_pad_get_element_private(pad);
+ struct parser_source *pin = gst_pad_get_element_private(pad);
struct gstdemux *This = impl_from_strmbase_filter(pin->pin.pin.filter);
HRESULT hr = S_OK;
IMediaSample *sample;
@@ -1006,7 +1006,7 @@ static void removed_decoded_pad(GstElement *bin, GstPad *pad, gpointer user)
for (i = 0; i < filter->source_count; ++i)
{
- struct gstdemux_source *pin = filter->sources[i];
+ struct parser_source *pin = filter->sources[i];
if (pin->their_src == pad)
{
@@ -1032,7 +1032,7 @@ static void init_new_decoded_pad(GstElement *bin, GstPad *pad, struct gstdemux *
char *name;
GstCaps *caps;
GstStructure *arg;
- struct gstdemux_source *pin;
+ struct parser_source *pin;
int ret;
WCHAR nameW[128];
@@ -1189,7 +1189,7 @@ static void existing_new_pad(GstElement *bin, GstPad *pad, gpointer user)
for (i = 0; i < This->source_count; ++i)
{
- struct gstdemux_source *pin = This->sources[i];
+ struct parser_source *pin = This->sources[i];
if (!pin->their_src) {
gst_segment_init(pin->segment, GST_FORMAT_TIME);
@@ -1415,9 +1415,9 @@ static LONGLONG query_duration(GstPad *pad)
return 0;
}
-static inline struct gstdemux_source *impl_from_IMediaSeeking(IMediaSeeking *iface)
+static inline struct parser_source *impl_from_IMediaSeeking(IMediaSeeking *iface)
{
- return CONTAINING_RECORD(iface, struct gstdemux_source, seek.IMediaSeeking_iface);
+ return CONTAINING_RECORD(iface, struct parser_source, seek.IMediaSeeking_iface);
}
static struct strmbase_pin *gstdemux_get_pin(struct strmbase_filter *base, unsigned int index)
@@ -1675,7 +1675,7 @@ static BOOL gstdecoder_init_gst(struct gstdemux *filter)
for (i = 0; i < filter->source_count; ++i)
{
- struct gstdemux_source *pin = filter->sources[i];
+ struct parser_source *pin = filter->sources[i];
const HANDLE events[2] = {pin->caps_event, filter->error_event};
pin->seek.llDuration = pin->seek.llStop = query_duration(pin->their_src);
@@ -1692,7 +1692,7 @@ static BOOL gstdecoder_init_gst(struct gstdemux *filter)
return TRUE;
}
-static HRESULT gstdecoder_source_query_accept(struct gstdemux_source *pin, const AM_MEDIA_TYPE *mt)
+static HRESULT gstdecoder_source_query_accept(struct parser_source *pin, const AM_MEDIA_TYPE *mt)
{
/* At least make sure we can convert it to GstCaps. */
GstCaps *caps = amt_to_gst_caps(mt);
@@ -1703,7 +1703,7 @@ static HRESULT gstdecoder_source_query_accept(struct gstdemux_source *pin, const
return S_OK;
}
-static HRESULT gstdecoder_source_get_media_type(struct gstdemux_source *pin,
+static HRESULT gstdecoder_source_get_media_type(struct parser_source *pin,
unsigned int index, AM_MEDIA_TYPE *mt)
{
GstCaps *caps = gst_pad_get_current_caps(pin->my_sink);
@@ -1870,21 +1870,21 @@ static const IAMStreamSelectVtbl stream_select_vtbl =
static HRESULT WINAPI GST_ChangeCurrent(IMediaSeeking *iface)
{
- struct gstdemux_source *This = impl_from_IMediaSeeking(iface);
+ struct parser_source *This = impl_from_IMediaSeeking(iface);
TRACE("(%p)\n", This);
return S_OK;
}
static HRESULT WINAPI GST_ChangeStop(IMediaSeeking *iface)
{
- struct gstdemux_source *This = impl_from_IMediaSeeking(iface);
+ struct parser_source *This = impl_from_IMediaSeeking(iface);
TRACE("(%p)\n", This);
return S_OK;
}
static HRESULT WINAPI GST_ChangeRate(IMediaSeeking *iface)
{
- struct gstdemux_source *This = impl_from_IMediaSeeking(iface);
+ struct parser_source *This = impl_from_IMediaSeeking(iface);
GstEvent *ev = gst_event_new_seek(This->seek.dRate, GST_FORMAT_TIME, 0, GST_SEEK_TYPE_NONE, -1, GST_SEEK_TYPE_NONE, -1);
TRACE("(%p) New rate %g\n", This, This->seek.dRate);
mark_wine_thread();
@@ -1894,19 +1894,19 @@ static HRESULT WINAPI GST_ChangeRate(IMediaSeeking *iface)
static HRESULT WINAPI GST_Seeking_QueryInterface(IMediaSeeking *iface, REFIID riid, void **ppv)
{
- struct gstdemux_source *This = impl_from_IMediaSeeking(iface);
+ struct parser_source *This = impl_from_IMediaSeeking(iface);
return IPin_QueryInterface(&This->pin.pin.IPin_iface, riid, ppv);
}
static ULONG WINAPI GST_Seeking_AddRef(IMediaSeeking *iface)
{
- struct gstdemux_source *This = impl_from_IMediaSeeking(iface);
+ struct parser_source *This = impl_from_IMediaSeeking(iface);
return IPin_AddRef(&This->pin.pin.IPin_iface);
}
static ULONG WINAPI GST_Seeking_Release(IMediaSeeking *iface)
{
- struct gstdemux_source *This = impl_from_IMediaSeeking(iface);
+ struct parser_source *This = impl_from_IMediaSeeking(iface);
return IPin_Release(&This->pin.pin.IPin_iface);
}
@@ -1914,7 +1914,7 @@ static HRESULT WINAPI GST_Seeking_SetPositions(IMediaSeeking *iface,
LONGLONG *current, DWORD current_flags, LONGLONG *stop, DWORD stop_flags)
{
GstSeekType current_type = GST_SEEK_TYPE_SET, stop_type = GST_SEEK_TYPE_SET;
- struct gstdemux_source *pin = impl_from_IMediaSeeking(iface);
+ struct parser_source *pin = impl_from_IMediaSeeking(iface);
GstSeekFlags flags = 0;
TRACE("pin %p, current %s, current_flags %#x, stop %s, stop_flags %#x.\n",
@@ -1973,32 +1973,32 @@ static const IMediaSeekingVtbl GST_Seeking_Vtbl =
SourceSeekingImpl_GetPreroll
};
-static inline struct gstdemux_source *impl_from_IQualityControl( IQualityControl *iface )
+static inline struct parser_source *impl_from_IQualityControl( IQualityControl *iface )
{
- return CONTAINING_RECORD(iface, struct gstdemux_source, IQualityControl_iface);
+ return CONTAINING_RECORD(iface, struct parser_source, IQualityControl_iface);
}
static HRESULT WINAPI GST_QualityControl_QueryInterface(IQualityControl *iface, REFIID riid, void **ppv)
{
- struct gstdemux_source *pin = impl_from_IQualityControl(iface);
+ struct parser_source *pin = impl_from_IQualityControl(iface);
return IPin_QueryInterface(&pin->pin.pin.IPin_iface, riid, ppv);
}
static ULONG WINAPI GST_QualityControl_AddRef(IQualityControl *iface)
{
- struct gstdemux_source *pin = impl_from_IQualityControl(iface);
+ struct parser_source *pin = impl_from_IQualityControl(iface);
return IPin_AddRef(&pin->pin.pin.IPin_iface);
}
static ULONG WINAPI GST_QualityControl_Release(IQualityControl *iface)
{
- struct gstdemux_source *pin = impl_from_IQualityControl(iface);
+ struct parser_source *pin = impl_from_IQualityControl(iface);
return IPin_Release(&pin->pin.pin.IPin_iface);
}
static HRESULT WINAPI GST_QualityControl_Notify(IQualityControl *iface, IBaseFilter *sender, Quality q)
{
- struct gstdemux_source *pin = impl_from_IQualityControl(iface);
+ struct parser_source *pin = impl_from_IQualityControl(iface);
GstQOSType type = GST_QOS_TYPE_OVERFLOW;
GstClockTime timestamp;
GstClockTimeDiff diff;
@@ -2053,7 +2053,7 @@ static HRESULT WINAPI GST_QualityControl_Notify(IQualityControl *iface, IBaseFil
static HRESULT WINAPI GST_QualityControl_SetSink(IQualityControl *iface, IQualityControl *tonotify)
{
- struct gstdemux_source *pin = impl_from_IQualityControl(iface);
+ struct parser_source *pin = impl_from_IQualityControl(iface);
TRACE("(%p)->(%p)\n", pin, pin);
/* Do nothing */
return S_OK;
@@ -2067,14 +2067,14 @@ static const IQualityControlVtbl GSTOutPin_QualityControl_Vtbl = {
GST_QualityControl_SetSink
};
-static inline struct gstdemux_source *impl_source_from_IPin(IPin *iface)
+static inline struct parser_source *impl_source_from_IPin(IPin *iface)
{
- return CONTAINING_RECORD(iface, struct gstdemux_source, pin.pin.IPin_iface);
+ return CONTAINING_RECORD(iface, struct parser_source, pin.pin.IPin_iface);
}
static HRESULT source_query_interface(struct strmbase_pin *iface, REFIID iid, void **out)
{
- struct gstdemux_source *pin = impl_source_from_IPin(&iface->IPin_iface);
+ struct parser_source *pin = impl_source_from_IPin(&iface->IPin_iface);
if (IsEqualGUID(iid, &IID_IMediaSeeking))
*out = &pin->seek.IMediaSeeking_iface;
@@ -2089,14 +2089,14 @@ static HRESULT source_query_interface(struct strmbase_pin *iface, REFIID iid, vo
static HRESULT source_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TYPE *mt)
{
- struct gstdemux_source *pin = impl_source_from_IPin(&iface->IPin_iface);
+ struct parser_source *pin = impl_source_from_IPin(&iface->IPin_iface);
struct gstdemux *filter = impl_from_strmbase_filter(iface->filter);
return filter->source_query_accept(pin, mt);
}
static HRESULT source_get_media_type(struct strmbase_pin *iface, unsigned int index, AM_MEDIA_TYPE *mt)
{
- struct gstdemux_source *pin = impl_source_from_IPin(&iface->IPin_iface);
+ struct parser_source *pin = impl_source_from_IPin(&iface->IPin_iface);
struct gstdemux *filter = impl_from_strmbase_filter(iface->filter);
return filter->source_get_media_type(pin, index, mt);
}
@@ -2104,7 +2104,7 @@ static HRESULT source_get_media_type(struct strmbase_pin *iface, unsigned int in
static HRESULT WINAPI GSTOutPin_DecideBufferSize(struct strmbase_source *iface,
IMemAllocator *allocator, ALLOCATOR_PROPERTIES *props)
{
- struct gstdemux_source *pin = impl_source_from_IPin(&iface->pin.IPin_iface);
+ struct parser_source *pin = impl_source_from_IPin(&iface->pin.IPin_iface);
unsigned int buffer_size = 16384;
ALLOCATOR_PROPERTIES ret_props;
@@ -2131,7 +2131,7 @@ static HRESULT WINAPI GSTOutPin_DecideBufferSize(struct strmbase_source *iface,
return IMemAllocator_SetProperties(allocator, props, &ret_props);
}
-static void free_source_pin(struct gstdemux_source *pin)
+static void free_source_pin(struct parser_source *pin)
{
if (pin->pin.pin.peer)
{
@@ -2174,9 +2174,9 @@ static const struct strmbase_source_ops source_ops =
.pfnDecideBufferSize = GSTOutPin_DecideBufferSize,
};
-static struct gstdemux_source *create_pin(struct gstdemux *filter, const WCHAR *name)
+static struct parser_source *create_pin(struct gstdemux *filter, const WCHAR *name)
{
- struct gstdemux_source *pin, **new_array;
+ struct parser_source *pin, **new_array;
char pad_name[19];
if (!(new_array = heap_realloc(filter->sources, (filter->source_count + 1) * sizeof(*new_array))))
@@ -2344,7 +2344,7 @@ static const struct strmbase_sink_ops wave_parser_sink_ops =
static BOOL wave_parser_init_gst(struct gstdemux *filter)
{
static const WCHAR source_name[] = {'o','u','t','p','u','t',0};
- struct gstdemux_source *pin;
+ struct parser_source *pin;
GstElement *element;
HANDLE events[2];
int ret;
@@ -2400,7 +2400,7 @@ static BOOL wave_parser_init_gst(struct gstdemux *filter)
return TRUE;
}
-static gboolean get_source_amt(const struct gstdemux_source *pin, AM_MEDIA_TYPE *mt)
+static gboolean get_source_amt(const struct parser_source *pin, AM_MEDIA_TYPE *mt)
{
GstCaps *caps = gst_pad_get_current_caps(pin->my_sink);
gboolean ret = amt_from_gst_caps(caps, mt);
@@ -2408,7 +2408,7 @@ static gboolean get_source_amt(const struct gstdemux_source *pin, AM_MEDIA_TYPE
return ret;
}
-static HRESULT wave_parser_source_query_accept(struct gstdemux_source *pin, const AM_MEDIA_TYPE *mt)
+static HRESULT wave_parser_source_query_accept(struct parser_source *pin, const AM_MEDIA_TYPE *mt)
{
AM_MEDIA_TYPE pad_mt;
HRESULT hr;
@@ -2420,7 +2420,7 @@ static HRESULT wave_parser_source_query_accept(struct gstdemux_source *pin, cons
return hr;
}
-static HRESULT wave_parser_source_get_media_type(struct gstdemux_source *pin,
+static HRESULT wave_parser_source_get_media_type(struct parser_source *pin,
unsigned int index, AM_MEDIA_TYPE *mt)
{
if (index > 0)
@@ -2510,7 +2510,7 @@ static BOOL avi_splitter_init_gst(struct gstdemux *filter)
for (i = 0; i < filter->source_count; ++i)
{
- struct gstdemux_source *pin = filter->sources[i];
+ struct parser_source *pin = filter->sources[i];
const HANDLE events[2] = {pin->caps_event, filter->error_event};
pin->seek.llDuration = pin->seek.llStop = query_duration(pin->their_src);
@@ -2527,7 +2527,7 @@ static BOOL avi_splitter_init_gst(struct gstdemux *filter)
return TRUE;
}
-static HRESULT avi_splitter_source_query_accept(struct gstdemux_source *pin, const AM_MEDIA_TYPE *mt)
+static HRESULT avi_splitter_source_query_accept(struct parser_source *pin, const AM_MEDIA_TYPE *mt)
{
AM_MEDIA_TYPE pad_mt;
HRESULT hr;
@@ -2539,7 +2539,7 @@ static HRESULT avi_splitter_source_query_accept(struct gstdemux_source *pin, con
return hr;
}
-static HRESULT avi_splitter_source_get_media_type(struct gstdemux_source *pin,
+static HRESULT avi_splitter_source_get_media_type(struct parser_source *pin,
unsigned int index, AM_MEDIA_TYPE *mt)
{
if (index > 0)
@@ -2598,7 +2598,7 @@ static const struct strmbase_sink_ops mpeg_splitter_sink_ops =
static BOOL mpeg_splitter_init_gst(struct gstdemux *filter)
{
static const WCHAR source_name[] = {'A','u','d','i','o',0};
- struct gstdemux_source *pin;
+ struct parser_source *pin;
GstElement *element;
HANDLE events[3];
DWORD res;
@@ -2660,7 +2660,7 @@ static BOOL mpeg_splitter_init_gst(struct gstdemux *filter)
return TRUE;
}
-static HRESULT mpeg_splitter_source_query_accept(struct gstdemux_source *pin, const AM_MEDIA_TYPE *mt)
+static HRESULT mpeg_splitter_source_query_accept(struct parser_source *pin, const AM_MEDIA_TYPE *mt)
{
AM_MEDIA_TYPE pad_mt;
HRESULT hr;
@@ -2672,7 +2672,7 @@ static HRESULT mpeg_splitter_source_query_accept(struct gstdemux_source *pin, co
return hr;
}
-static HRESULT mpeg_splitter_source_get_media_type(struct gstdemux_source *pin,
+static HRESULT mpeg_splitter_source_get_media_type(struct parser_source *pin,
unsigned int index, AM_MEDIA_TYPE *mt)
{
if (index > 0)
--
2.30.0
1
4
Jan. 15, 2021
From: Rémi Bernon <rbernon(a)codeweavers.com>
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
v3:
- Get rid of the "ctx" argument to release_d3d11_resource_readback().
dlls/d2d1/tests/Makefile.in | 2 +-
dlls/d2d1/tests/d2d1.c | 352 +++++++++++++++++++++++++-----------
2 files changed, 247 insertions(+), 107 deletions(-)
diff --git a/dlls/d2d1/tests/Makefile.in b/dlls/d2d1/tests/Makefile.in
index 91ede7888aa..5eeb815e07f 100644
--- a/dlls/d2d1/tests/Makefile.in
+++ b/dlls/d2d1/tests/Makefile.in
@@ -1,5 +1,5 @@
TESTDLL = d2d1.dll
-IMPORTS = d2d1 d3d10_1 dwrite dxguid uuid user32 advapi32 ole32 gdi32
+IMPORTS = d2d1 d3d10_1 d3d11 dwrite dxguid uuid user32 advapi32 ole32 gdi32
C_SRCS = \
d2d1.c
diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c
index d38cd5649a6..3e7df715dda 100644
--- a/dlls/d2d1/tests/d2d1.c
+++ b/dlls/d2d1/tests/d2d1.c
@@ -21,6 +21,7 @@
#include <math.h>
#include <float.h>
#include "d2d1_1.h"
+#include "d3d11.h"
#include "wincrypt.h"
#include "wine/test.h"
#include "initguid.h"
@@ -38,12 +39,14 @@ static BOOL use_mt = TRUE;
static struct test_entry
{
- void (*test)(void);
+ void (*test)(BOOL d3d11);
+ BOOL d3d11;
} *mt_tests;
size_t mt_tests_size, mt_test_count;
struct d2d1_test_context
{
+ BOOL d3d11;
IDXGIDevice *device;
HWND window;
IDXGISwapChain *swapchain;
@@ -53,7 +56,12 @@ struct d2d1_test_context
struct resource_readback
{
- ID3D10Resource *resource;
+ BOOL d3d11;
+ union
+ {
+ ID3D10Resource *d3d10_resource;
+ ID3D11Resource *d3d11_resource;
+ } u;
unsigned int pitch, width, height;
void *data;
};
@@ -108,14 +116,26 @@ struct expected_geometry_figure
const struct geometry_segment *segments;
};
-static void queue_test(void (*test)(void))
+static void queue_d3d1x_test(void (*test)(BOOL d3d11), BOOL d3d11)
{
if (mt_test_count >= mt_tests_size)
{
mt_tests_size = max(16, mt_tests_size * 2);
mt_tests = heap_realloc(mt_tests, mt_tests_size * sizeof(*mt_tests));
}
- mt_tests[mt_test_count++].test = test;
+ mt_tests[mt_test_count].test = test;
+ mt_tests[mt_test_count++].d3d11 = d3d11;
+}
+
+static void queue_d3d10_test(void (*test)(BOOL d3d11))
+{
+ queue_d3d1x_test(test, FALSE);
+}
+
+static void queue_test(void (*test)(BOOL d3d11))
+{
+ queue_d3d1x_test(test, FALSE);
+ queue_d3d1x_test(test, TRUE);
}
static DWORD WINAPI thread_func(void *ctx)
@@ -126,7 +146,7 @@ static DWORD WINAPI thread_func(void *ctx)
{
j = *i;
if (InterlockedCompareExchange(i, j + 1, j) == j)
- mt_tests[j].test();
+ mt_tests[j].test(mt_tests[j].d3d11);
}
return 0;
@@ -143,7 +163,7 @@ static void run_queued_tests(void)
{
for (i = 0; i < mt_test_count; ++i)
{
- mt_tests[i].test();
+ mt_tests[i].test(mt_tests[i].d3d11);
}
return;
@@ -311,9 +331,8 @@ static void cubic_to(ID2D1GeometrySink *sink, float x1, float y1, float x2, floa
ID2D1GeometrySink_AddBezier(sink, &b);
}
-static void get_surface_readback(struct d2d1_test_context *ctx, struct resource_readback *rb)
+static void get_d3d10_surface_readback(IDXGISurface *surface, struct resource_readback *rb)
{
- IDXGISurface *surface = ctx->surface;
D3D10_TEXTURE2D_DESC texture_desc;
D3D10_MAPPED_TEXTURE2D map_desc;
DXGI_SURFACE_DESC surface_desc;
@@ -338,27 +357,103 @@ static void get_surface_readback(struct d2d1_test_context *ctx, struct resource_
texture_desc.BindFlags = 0;
texture_desc.CPUAccessFlags = D3D10_CPU_ACCESS_READ;
texture_desc.MiscFlags = 0;
- hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, (ID3D10Texture2D **)&rb->resource);
+ hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, (ID3D10Texture2D **)&rb->u.d3d10_resource);
ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr);
rb->width = texture_desc.Width;
rb->height = texture_desc.Height;
- ID3D10Device_CopyResource(device, rb->resource, src_resource);
+ ID3D10Device_CopyResource(device, rb->u.d3d10_resource, src_resource);
ID3D10Resource_Release(src_resource);
ID3D10Device_Release(device);
- hr = ID3D10Texture2D_Map((ID3D10Texture2D *)rb->resource, 0, D3D10_MAP_READ, 0, &map_desc);
+ hr = ID3D10Texture2D_Map((ID3D10Texture2D *)rb->u.d3d10_resource, 0, D3D10_MAP_READ, 0, &map_desc);
+ ok(SUCCEEDED(hr), "Failed to map texture, hr %#x.\n", hr);
+
+ rb->pitch = map_desc.RowPitch;
+ rb->data = map_desc.pData;
+}
+
+static void get_d3d11_surface_readback(IDXGISurface *surface, struct resource_readback *rb)
+{
+ D3D11_TEXTURE2D_DESC texture_desc;
+ D3D11_MAPPED_SUBRESOURCE map_desc;
+ DXGI_SURFACE_DESC surface_desc;
+ ID3D11Resource *src_resource;
+ ID3D11DeviceContext *context;
+ ID3D11Device *device;
+ HRESULT hr;
+
+ hr = IDXGISurface_GetDevice(surface, &IID_ID3D11Device, (void **)&device);
+ ok(SUCCEEDED(hr), "Failed to get device, hr %#x.\n", hr);
+ hr = IDXGISurface_QueryInterface(surface, &IID_ID3D11Resource, (void **)&src_resource);
+ ok(SUCCEEDED(hr), "Failed to query resource interface, hr %#x.\n", hr);
+
+ hr = IDXGISurface_GetDesc(surface, &surface_desc);
+ ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
+ texture_desc.Width = surface_desc.Width;
+ texture_desc.Height = surface_desc.Height;
+ texture_desc.MipLevels = 1;
+ texture_desc.ArraySize = 1;
+ texture_desc.Format = surface_desc.Format;
+ texture_desc.SampleDesc = surface_desc.SampleDesc;
+ texture_desc.Usage = D3D11_USAGE_STAGING;
+ texture_desc.BindFlags = 0;
+ texture_desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ;
+ texture_desc.MiscFlags = 0;
+ hr = ID3D11Device_CreateTexture2D(device, &texture_desc, NULL, (ID3D11Texture2D **)&rb->u.d3d11_resource);
+ ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr);
+
+ rb->width = texture_desc.Width;
+ rb->height = texture_desc.Height;
+
+ ID3D11Device_GetImmediateContext(device, &context);
+ ID3D11DeviceContext_CopyResource(context, rb->u.d3d11_resource, src_resource);
+ ID3D11Resource_Release(src_resource);
+ ID3D11Device_Release(device);
+
+ hr = ID3D11DeviceContext_Map(context, (ID3D11Resource *)rb->u.d3d11_resource, 0, D3D11_MAP_READ, 0, &map_desc);
ok(SUCCEEDED(hr), "Failed to map texture, hr %#x.\n", hr);
+ ID3D11DeviceContext_Release(context);
rb->pitch = map_desc.RowPitch;
rb->data = map_desc.pData;
}
+static void get_surface_readback(struct d2d1_test_context *ctx, struct resource_readback *rb)
+{
+ if ((rb->d3d11 = ctx->d3d11))
+ get_d3d11_surface_readback(ctx->surface, rb);
+ else
+ get_d3d10_surface_readback(ctx->surface, rb);
+}
+
+static void release_d3d10_resource_readback(struct resource_readback *rb)
+{
+ ID3D10Texture2D_Unmap((ID3D10Texture2D *)rb->u.d3d10_resource, 0);
+ ID3D10Resource_Release(rb->u.d3d10_resource);
+}
+
+static void release_d3d11_resource_readback(struct resource_readback *rb)
+{
+ ID3D11DeviceContext *context;
+ ID3D11Device *device;
+
+ ID3D11Resource_GetDevice(rb->u.d3d11_resource, &device);
+ ID3D11Device_GetImmediateContext(device, &context);
+ ID3D11Device_Release(device);
+
+ ID3D11DeviceContext_Unmap(context, rb->u.d3d11_resource, 0);
+ ID3D11Resource_Release(rb->u.d3d11_resource);
+ ID3D11DeviceContext_Release(context);
+}
+
static void release_resource_readback(struct resource_readback *rb)
{
- ID3D10Texture2D_Unmap((ID3D10Texture2D *)rb->resource, 0);
- ID3D10Resource_Release(rb->resource);
+ if (rb->d3d11)
+ release_d3d11_resource_readback(rb);
+ else
+ release_d3d10_resource_readback(rb);
}
static DWORD get_readback_colour(struct resource_readback *rb, unsigned int x, unsigned int y)
@@ -711,18 +806,47 @@ static ID3D10Device1 *create_d3d10_device(void)
return NULL;
}
-static IDXGIDevice *create_device(void)
+static ID3D11Device *create_d3d11_device(void)
+{
+ DWORD level = D3D_FEATURE_LEVEL_11_0;
+ ID3D11Device *device;
+
+ if (SUCCEEDED(D3D11CreateDevice(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL,
+ D3D10_CREATE_DEVICE_BGRA_SUPPORT, &level, 1, D3D11_SDK_VERSION, &device, NULL, NULL)))
+ return device;
+ if (SUCCEEDED(D3D11CreateDevice(NULL, D3D_DRIVER_TYPE_WARP, NULL,
+ D3D10_CREATE_DEVICE_BGRA_SUPPORT, &level, 1, D3D11_SDK_VERSION, &device, NULL, NULL)))
+ return device;
+ if (SUCCEEDED(D3D11CreateDevice(NULL, D3D_DRIVER_TYPE_REFERENCE, NULL,
+ D3D10_CREATE_DEVICE_BGRA_SUPPORT, &level, 1, D3D11_SDK_VERSION, &device, NULL, NULL)))
+ return device;
+
+ return NULL;
+}
+
+static IDXGIDevice *create_device(BOOL d3d11)
{
ID3D10Device1 *d3d10_device;
+ ID3D11Device *d3d11_device;
IDXGIDevice *device;
HRESULT hr;
- if (!(d3d10_device = create_d3d10_device()))
- return NULL;
+ if (d3d11)
+ {
+ if (!(d3d11_device = create_d3d11_device()))
+ return NULL;
+ hr = ID3D11Device_QueryInterface(d3d11_device, &IID_IDXGIDevice, (void **)&device);
+ ID3D11Device_Release(d3d11_device);
+ }
+ else
+ {
+ if (!(d3d10_device = create_d3d10_device()))
+ return NULL;
+ hr = ID3D10Device1_QueryInterface(d3d10_device, &IID_IDXGIDevice, (void **)&device);
+ ID3D10Device1_Release(d3d10_device);
+ }
- hr = ID3D10Device1_QueryInterface(d3d10_device, &IID_IDXGIDevice, (void **)&device);
ok(SUCCEEDED(hr), "Failed to get DXGI device, hr %#x.\n", hr);
- ID3D10Device1_Release(d3d10_device);
return device;
}
@@ -787,7 +911,8 @@ static IDXGISwapChain *create_d3d10_swapchain(ID3D10Device1 *device, HWND window
return swapchain;
}
-static ID2D1RenderTarget *create_render_target_desc(IDXGISurface *surface, const D2D1_RENDER_TARGET_PROPERTIES *desc)
+static ID2D1RenderTarget *create_render_target_desc(IDXGISurface *surface,
+ const D2D1_RENDER_TARGET_PROPERTIES *desc, BOOL d3d11)
{
ID2D1RenderTarget *render_target;
ID2D1Factory *factory;
@@ -796,13 +921,16 @@ static ID2D1RenderTarget *create_render_target_desc(IDXGISurface *surface, const
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory, surface, desc, &render_target);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ todo_wine_if(d3d11) ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
ID2D1Factory_Release(factory);
+ if (FAILED(hr))
+ return NULL;
+
return render_target;
}
-static ID2D1RenderTarget *create_render_target(IDXGISurface *surface)
+static ID2D1RenderTarget *create_render_target(IDXGISurface *surface, BOOL d3d11)
{
D2D1_RENDER_TARGET_PROPERTIES desc;
@@ -814,7 +942,7 @@ static ID2D1RenderTarget *create_render_target(IDXGISurface *surface)
desc.usage = D2D1_RENDER_TARGET_USAGE_NONE;
desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
- return create_render_target_desc(surface, &desc);
+ return create_render_target_desc(surface, &desc, d3d11);
}
#define release_test_context(ctx) release_test_context_(__LINE__, ctx)
@@ -834,14 +962,15 @@ static void release_test_context_(unsigned int line, struct d2d1_test_context *c
IDXGIDevice_Release(ctx->device);
}
-#define init_test_context(ctx) init_test_context_(__LINE__, ctx)
-static BOOL init_test_context_(unsigned int line, struct d2d1_test_context *ctx)
+#define init_test_context(ctx, d3d11) init_test_context_(__LINE__, ctx, d3d11)
+static BOOL init_test_context_(unsigned int line, struct d2d1_test_context *ctx, BOOL d3d11)
{
HRESULT hr;
memset(ctx, 0, sizeof(*ctx));
- if (!(ctx->device = create_device()))
+ ctx->d3d11 = d3d11;
+ if (!(ctx->device = create_device(d3d11)))
{
skip_(__FILE__, line)("Failed to create device, skipping tests.\n");
return FALSE;
@@ -854,7 +983,18 @@ static BOOL init_test_context_(unsigned int line, struct d2d1_test_context *ctx)
hr = IDXGISwapChain_GetBuffer(ctx->swapchain, 0, &IID_IDXGISurface, (void **)&ctx->surface);
ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
- ctx->rt = create_render_target(ctx->surface);
+ ctx->rt = create_render_target(ctx->surface, d3d11);
+ if (!ctx->rt && d3d11)
+ {
+ todo_wine win_skip_(__FILE__, line)("Skipping d3d11 tests.\n");
+
+ IDXGISurface_Release(ctx->surface);
+ IDXGISwapChain_Release(ctx->swapchain);
+ DestroyWindow(ctx->window);
+ IDXGIDevice_Release(ctx->device);
+
+ return FALSE;
+ }
ok_(__FILE__, line)(!!ctx->rt, "Failed to create render target.\n");
return TRUE;
@@ -1166,7 +1306,7 @@ static void geometry_sink_check_(unsigned int line, const struct geometry_sink *
}
}
-static void test_clip(void)
+static void test_clip(BOOL d3d11)
{
struct d2d1_test_context ctx;
D2D1_MATRIX_3X2_F matrix;
@@ -1186,7 +1326,7 @@ static void test_clip(void)
0.0f, 0.0f,
}}};
- if (!init_test_context(&ctx))
+ if (!init_test_context(&ctx, d3d11))
return;
rt = ctx.rt;
@@ -1358,7 +1498,7 @@ static void test_clip(void)
release_test_context(&ctx);
}
-static void test_state_block(void)
+static void test_state_block(BOOL d3d11)
{
IDWriteRenderingParams *text_rendering_params1, *text_rendering_params2;
D2D1_DRAWING_STATE_DESCRIPTION drawing_state;
@@ -1389,7 +1529,7 @@ static void test_state_block(void)
11.0f, 12.0f,
}}};
- if (!init_test_context(&ctx))
+ if (!init_test_context(&ctx, d3d11))
return;
rt = ctx.rt;
@@ -1618,7 +1758,7 @@ static void test_state_block(void)
release_test_context(&ctx);
}
-static void test_color_brush(void)
+static void test_color_brush(BOOL d3d11)
{
D2D1_MATRIX_3X2_F matrix, tmp_matrix;
D2D1_BRUSH_PROPERTIES brush_desc;
@@ -1631,7 +1771,7 @@ static void test_color_brush(void)
HRESULT hr;
BOOL match;
- if (!init_test_context(&ctx))
+ if (!init_test_context(&ctx, d3d11))
return;
rt = ctx.rt;
@@ -1703,7 +1843,7 @@ static void test_color_brush(void)
release_test_context(&ctx);
}
-static void test_bitmap_brush(void)
+static void test_bitmap_brush(BOOL d3d11)
{
D2D1_BITMAP_INTERPOLATION_MODE interpolation_mode;
ID2D1TransformedGeometry *transformed_geometry;
@@ -1756,7 +1896,7 @@ static void test_bitmap_brush(void)
0xffffffff, 0xff000000, 0xff000000, 0xff000000,
};
- if (!init_test_context(&ctx))
+ if (!init_test_context(&ctx, d3d11))
return;
rt = ctx.rt;
@@ -2096,7 +2236,7 @@ static void test_bitmap_brush(void)
release_test_context(&ctx);
}
-static void test_linear_brush(void)
+static void test_linear_brush(BOOL d3d11)
{
D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES gradient_properties;
ID2D1GradientStopCollection *gradient, *tmp_gradient;
@@ -2153,7 +2293,7 @@ static void test_linear_brush(void)
{520, 390, 0xff90ae40},
};
- if (!init_test_context(&ctx))
+ if (!init_test_context(&ctx, d3d11))
return;
rt = ctx.rt;
@@ -2287,7 +2427,7 @@ static void test_linear_brush(void)
release_test_context(&ctx);
}
-static void test_radial_brush(void)
+static void test_radial_brush(BOOL d3d11)
{
D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES gradient_properties;
ID2D1GradientStopCollection *gradient, *tmp_gradient;
@@ -2344,7 +2484,7 @@ static void test_radial_brush(void)
{520, 390, 0xff4059e6},
};
- if (!init_test_context(&ctx))
+ if (!init_test_context(&ctx, d3d11))
return;
rt = ctx.rt;
@@ -2601,7 +2741,7 @@ static void fill_geometry_sink_bezier(ID2D1GeometrySink *sink, unsigned int holl
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
}
-static void test_path_geometry(void)
+static void test_path_geometry(BOOL d3d11)
{
ID2D1TransformedGeometry *transformed_geometry;
D2D1_MATRIX_3X2_F matrix, tmp_matrix;
@@ -2934,7 +3074,7 @@ static void test_path_geometry(void)
{D2D1_FIGURE_BEGIN_HOLLOW, D2D1_FIGURE_END_OPEN, { 40.0f, 20.0f}, 2, &expected_segments[172]},
};
- if (!init_test_context(&ctx))
+ if (!init_test_context(&ctx, d3d11))
return;
rt = ctx.rt;
@@ -3660,7 +3800,7 @@ static void test_path_geometry(void)
release_test_context(&ctx);
}
-static void test_rectangle_geometry(void)
+static void test_rectangle_geometry(BOOL d3d11)
{
ID2D1TransformedGeometry *transformed_geometry;
ID2D1RectangleGeometry *geometry;
@@ -3941,7 +4081,7 @@ static void test_rectangle_geometry(void)
ID2D1Factory_Release(factory);
}
-static void test_rounded_rectangle_geometry(void)
+static void test_rounded_rectangle_geometry(BOOL d3d11)
{
ID2D1RoundedRectangleGeometry *geometry;
D2D1_ROUNDED_RECT rect, rect2;
@@ -3987,7 +4127,7 @@ static void test_rounded_rectangle_geometry(void)
ID2D1Factory_Release(factory);
}
-static void test_bitmap_formats(void)
+static void test_bitmap_formats(BOOL d3d11)
{
D2D1_BITMAP_PROPERTIES bitmap_desc;
struct d2d1_test_context ctx;
@@ -4020,7 +4160,7 @@ static void test_bitmap_formats(void)
{DXGI_FORMAT_B8G8R8A8_UNORM_SRGB, 0x8a},
};
- if (!init_test_context(&ctx))
+ if (!init_test_context(&ctx, d3d11))
return;
rt = ctx.rt;
@@ -4050,7 +4190,7 @@ static void test_bitmap_formats(void)
release_test_context(&ctx);
}
-static void test_alpha_mode(void)
+static void test_alpha_mode(BOOL d3d11)
{
D2D1_RENDER_TARGET_PROPERTIES rt_desc;
D2D1_BITMAP_PROPERTIES bitmap_desc;
@@ -4074,7 +4214,7 @@ static void test_alpha_mode(void)
0x7f7f7f7f, 0x7f000000, 0x7f000000, 0x7f000000,
};
- if (!init_test_context(&ctx))
+ if (!init_test_context(&ctx, d3d11))
return;
rt = ctx.rt;
@@ -4169,7 +4309,7 @@ static void test_alpha_mode(void)
rt_desc.dpiY = 0.0f;
rt_desc.usage = D2D1_RENDER_TARGET_USAGE_NONE;
rt_desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
- rt = create_render_target_desc(ctx.surface, &rt_desc);
+ rt = create_render_target_desc(ctx.surface, &rt_desc, d3d11);
ok(!!rt, "Failed to create render target.\n");
ID2D1RenderTarget_SetAntialiasMode(rt, D2D1_ANTIALIAS_MODE_ALIASED);
@@ -4264,7 +4404,7 @@ static void test_alpha_mode(void)
release_test_context(&ctx);
}
-static void test_shared_bitmap(void)
+static void test_shared_bitmap(BOOL d3d11)
{
IWICBitmap *wic_bitmap1, *wic_bitmap2;
ID2D1GdiInteropRenderTarget *interop;
@@ -4285,7 +4425,7 @@ static void test_shared_bitmap(void)
HWND window2;
HRESULT hr;
- if (!init_test_context(&ctx))
+ if (!init_test_context(&ctx, d3d11))
return;
window2 = create_window();
@@ -4350,7 +4490,7 @@ static void test_shared_bitmap(void)
/* DXGI surface render targets with different devices but the same factory. */
IDXGISurface_Release(surface2);
IDXGISwapChain_Release(swapchain2);
- device2 = create_device();
+ device2 = create_device(d3d11);
ok(!!device2, "Failed to create device.\n");
swapchain2 = create_swapchain(device2, window2, TRUE);
hr = IDXGISwapChain_GetBuffer(swapchain2, 0, &IID_IDXGISurface, (void **)&surface2);
@@ -4511,7 +4651,7 @@ static void test_shared_bitmap(void)
CoUninitialize();
}
-static void test_bitmap_updates(void)
+static void test_bitmap_updates(BOOL d3d11)
{
D2D1_BITMAP_PROPERTIES bitmap_desc;
struct d2d1_test_context ctx;
@@ -4532,7 +4672,7 @@ static void test_bitmap_updates(void)
0xffffffff, 0xff000000, 0xff000000, 0xff000000,
};
- if (!init_test_context(&ctx))
+ if (!init_test_context(&ctx, d3d11))
return;
rt = ctx.rt;
@@ -4599,7 +4739,7 @@ static void test_bitmap_updates(void)
release_test_context(&ctx);
}
-static void test_opacity_brush(void)
+static void test_opacity_brush(BOOL d3d11)
{
ID2D1BitmapBrush *bitmap_brush, *opacity_brush;
D2D1_BITMAP_PROPERTIES bitmap_desc;
@@ -4625,7 +4765,7 @@ static void test_opacity_brush(void)
0xffffffff, 0x40000000, 0x40000000, 0xff000000,
};
- if (!init_test_context(&ctx))
+ if (!init_test_context(&ctx, d3d11))
return;
rt = ctx.rt;
@@ -4765,7 +4905,7 @@ static void test_opacity_brush(void)
release_test_context(&ctx);
}
-static void test_create_target(void)
+static void test_create_target(BOOL d3d11)
{
struct d2d1_test_context ctx;
ID2D1Factory *factory;
@@ -4788,7 +4928,7 @@ static void test_create_target(void)
};
unsigned int i;
- if (!init_test_context(&ctx))
+ if (!init_test_context(&ctx, d3d11))
return;
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
@@ -4843,7 +4983,7 @@ static void test_create_target(void)
release_test_context(&ctx);
}
-static void test_draw_text_layout(void)
+static void test_draw_text_layout(BOOL d3d11)
{
static const struct
{
@@ -4892,7 +5032,7 @@ static void test_draw_text_layout(void)
D2D1_RECT_F rect;
unsigned int i;
- if (!init_test_context(&ctx))
+ if (!init_test_context(&ctx, d3d11))
return;
@@ -5021,7 +5161,7 @@ static void create_target_dibsection(HDC hdc, UINT32 width, UINT32 height)
DeleteObject(SelectObject(hdc, hbm));
}
-static void test_dc_target(void)
+static void test_dc_target(BOOL d3d11)
{
static const D2D1_PIXEL_FORMAT invalid_formats[] =
{
@@ -5051,7 +5191,7 @@ static void test_dc_target(void)
HRESULT hr;
RECT rect;
- if (!init_test_context(&ctx))
+ if (!init_test_context(&ctx, d3d11))
return;
release_test_context(&ctx);
@@ -5249,7 +5389,7 @@ todo_wine
ID2D1Factory_Release(factory);
}
-static void test_hwnd_target(void)
+static void test_hwnd_target(BOOL d3d11)
{
D2D1_HWND_RENDER_TARGET_PROPERTIES hwnd_rt_desc;
ID2D1GdiInteropRenderTarget *interop;
@@ -5261,7 +5401,7 @@ static void test_hwnd_target(void)
D2D1_SIZE_U size;
HRESULT hr;
- if (!init_test_context(&ctx))
+ if (!init_test_context(&ctx, d3d11))
return;
release_test_context(&ctx);
@@ -5409,7 +5549,7 @@ static void test_compatible_target_size_(unsigned int line, ID2D1RenderTarget *r
ID2D1BitmapRenderTarget_Release(bitmap_rt);
}
-static void test_bitmap_target(void)
+static void test_bitmap_target(BOOL d3d11)
{
D2D1_HWND_RENDER_TARGET_PROPERTIES hwnd_rt_desc;
ID2D1GdiInteropRenderTarget *interop;
@@ -5428,7 +5568,7 @@ static void test_bitmap_target(void)
ULONG refcount;
HRESULT hr;
- if (!init_test_context(&ctx))
+ if (!init_test_context(&ctx, d3d11))
return;
release_test_context(&ctx);
@@ -5595,7 +5735,7 @@ static void test_bitmap_target(void)
ID2D1Factory_Release(factory);
}
-static void test_desktop_dpi(void)
+static void test_desktop_dpi(BOOL d3d11)
{
ID2D1Factory *factory;
float dpi_x, dpi_y;
@@ -5611,7 +5751,7 @@ static void test_desktop_dpi(void)
ID2D1Factory_Release(factory);
}
-static void test_stroke_style(void)
+static void test_stroke_style(BOOL d3d11)
{
static const struct
{
@@ -5755,7 +5895,7 @@ static void test_stroke_style(void)
ID2D1Factory_Release(factory);
}
-static void test_gradient(void)
+static void test_gradient(BOOL d3d11)
{
ID2D1GradientStopCollection *gradient;
D2D1_GRADIENT_STOP stops[3], stops2[3];
@@ -5766,7 +5906,7 @@ static void test_gradient(void)
UINT32 count;
HRESULT hr;
- if (!init_test_context(&ctx))
+ if (!init_test_context(&ctx, d3d11))
return;
rt = ctx.rt;
@@ -5798,7 +5938,7 @@ static void test_gradient(void)
release_test_context(&ctx);
}
-static void test_draw_geometry(void)
+static void test_draw_geometry(BOOL d3d11)
{
ID2D1TransformedGeometry *transformed_geometry[4];
ID2D1RectangleGeometry *rect_geometry[2];
@@ -5818,7 +5958,7 @@ static void test_draw_geometry(void)
HRESULT hr;
BOOL match;
- if (!init_test_context(&ctx))
+ if (!init_test_context(&ctx, d3d11))
return;
rt = ctx.rt;
@@ -6710,7 +6850,7 @@ static void test_draw_geometry(void)
release_test_context(&ctx);
}
-static void test_fill_geometry(void)
+static void test_fill_geometry(BOOL d3d11)
{
ID2D1TransformedGeometry *transformed_geometry[4];
ID2D1RectangleGeometry *rect_geometry[2];
@@ -6729,7 +6869,7 @@ static void test_fill_geometry(void)
HRESULT hr;
BOOL match;
- if (!init_test_context(&ctx))
+ if (!init_test_context(&ctx, d3d11))
return;
rt = ctx.rt;
@@ -7508,7 +7648,7 @@ static void test_fill_geometry(void)
release_test_context(&ctx);
}
-static void test_gdi_interop(void)
+static void test_gdi_interop(BOOL d3d11)
{
ID2D1GdiInteropRenderTarget *interop;
D2D1_RENDER_TARGET_PROPERTIES desc;
@@ -7524,7 +7664,7 @@ static void test_gdi_interop(void)
RECT rect;
HDC dc;
- if (!init_test_context(&ctx))
+ if (!init_test_context(&ctx, d3d11))
return;
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
@@ -7639,7 +7779,7 @@ todo_wine
release_test_context(&ctx);
}
-static void test_layer(void)
+static void test_layer(BOOL d3d11)
{
ID2D1Factory *factory, *layer_factory;
struct d2d1_test_context ctx;
@@ -7648,7 +7788,7 @@ static void test_layer(void)
D2D1_SIZE_F size;
HRESULT hr;
- if (!init_test_context(&ctx))
+ if (!init_test_context(&ctx, d3d11))
return;
rt = ctx.rt;
@@ -7679,7 +7819,7 @@ static void test_layer(void)
release_test_context(&ctx);
}
-static void test_bezier_intersect(void)
+static void test_bezier_intersect(BOOL d3d11)
{
D2D1_POINT_2F point = {0.0f, 0.0f};
struct d2d1_test_context ctx;
@@ -7692,7 +7832,7 @@ static void test_bezier_intersect(void)
HRESULT hr;
BOOL match;
- if (!init_test_context(&ctx))
+ if (!init_test_context(&ctx, d3d11))
return;
rt = ctx.rt;
@@ -7813,7 +7953,7 @@ static void test_bezier_intersect(void)
release_test_context(&ctx);
}
-static void test_create_device(void)
+static void test_create_device(BOOL d3d11)
{
D2D1_CREATION_PROPERTIES properties = {0};
struct d2d1_test_context ctx;
@@ -7823,7 +7963,7 @@ static void test_create_device(void)
ULONG refcount;
HRESULT hr;
- if (!init_test_context(&ctx))
+ if (!init_test_context(&ctx, d3d11))
return;
if (FAILED(D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory1, NULL, (void **)&factory)))
@@ -8048,7 +8188,7 @@ static IDXGISurface *create_surface(IDXGIDevice *dxgi_device, DXGI_FORMAT format
return surface;
}
-static void test_bitmap_surface(void)
+static void test_bitmap_surface(BOOL d3d11)
{
static const struct bitmap_format_test
{
@@ -8095,7 +8235,7 @@ static void test_bitmap_surface(void)
IWICBitmap *wic_bitmap;
IWICImagingFactory *wic_factory;
- if (!init_test_context(&ctx))
+ if (!init_test_context(&ctx, d3d11))
return;
if (FAILED(D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory1, NULL, (void **)&factory)))
@@ -8283,7 +8423,7 @@ static void test_bitmap_surface(void)
release_test_context(&ctx);
}
-static void test_device_context(void)
+static void test_device_context(BOOL d3d11)
{
D2D1_HWND_RENDER_TARGET_PROPERTIES hwnd_rt_desc;
D2D1_RENDER_TARGET_PROPERTIES rt_desc;
@@ -8305,7 +8445,7 @@ static void test_device_context(void)
IWICBitmap *wic_bitmap;
IWICImagingFactory *wic_factory;
- if (!init_test_context(&ctx))
+ if (!init_test_context(&ctx, d3d11))
return;
if (FAILED(D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory1, NULL, (void **)&factory)))
@@ -8470,7 +8610,7 @@ todo_wine
release_test_context(&ctx);
}
-static void test_invert_matrix(void)
+static void test_invert_matrix(BOOL d3d11)
{
static const struct
{
@@ -8553,7 +8693,7 @@ static void test_invert_matrix(void)
}
}
-static void test_skew_matrix(void)
+static void test_skew_matrix(BOOL d3d11)
{
static const struct
{
@@ -8591,7 +8731,7 @@ static void test_skew_matrix(void)
}
}
-static ID2D1DeviceContext *create_device_context(ID2D1Factory1 *factory, IDXGIDevice *dxgi_device)
+static ID2D1DeviceContext *create_device_context(ID2D1Factory1 *factory, IDXGIDevice *dxgi_device, BOOL d3d11)
{
ID2D1DeviceContext *device_context;
ID2D1Device *device;
@@ -8607,7 +8747,7 @@ static ID2D1DeviceContext *create_device_context(ID2D1Factory1 *factory, IDXGIDe
return device_context;
}
-static void test_command_list(void)
+static void test_command_list(BOOL d3d11)
{
static const DWORD bitmap_data[] =
{
@@ -8641,7 +8781,7 @@ static void test_command_list(void)
ULONG refcount;
HRESULT hr;
- if (!init_test_context(&ctx))
+ if (!init_test_context(&ctx, d3d11))
return;
if (FAILED(D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory1, NULL, (void **)&factory)))
@@ -8651,7 +8791,7 @@ static void test_command_list(void)
return;
}
- device_context = create_device_context(factory, ctx.device);
+ device_context = create_device_context(factory, ctx.device, d3d11);
ok(device_context != NULL, "Failed to create device context.\n");
hr = ID2D1DeviceContext_CreateCommandList(device_context, &command_list);
@@ -8837,7 +8977,7 @@ todo_wine
ID2D1CommandList_Release(command_list);
/* List created with different context. */
- device_context2 = create_device_context(factory, ctx.device);
+ device_context2 = create_device_context(factory, ctx.device, d3d11);
ok(device_context2 != NULL, "Failed to create device context.\n");
hr = ID2D1DeviceContext_CreateCommandList(device_context, &command_list);
@@ -8856,7 +8996,7 @@ todo_wine
release_test_context(&ctx);
}
-static void test_max_bitmap_size(void)
+static void test_max_bitmap_size(BOOL d3d11)
{
D2D1_RENDER_TARGET_PROPERTIES desc;
D2D1_BITMAP_PROPERTIES bitmap_desc;
@@ -8974,7 +9114,7 @@ static void test_max_bitmap_size(void)
ID2D1Factory_Release(factory);
}
-static void test_dpi(void)
+static void test_dpi(BOOL d3d11)
{
D2D1_BITMAP_PROPERTIES1 bitmap_desc;
ID2D1DeviceContext *device_context;
@@ -9005,7 +9145,7 @@ static void test_dpi(void)
static const float dc_dpi_x = 120.0f, dc_dpi_y = 144.0f;
unsigned int i;
- if (!init_test_context(&ctx))
+ if (!init_test_context(&ctx, d3d11))
return;
if (FAILED(D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory1, NULL, (void **)&factory)))
@@ -9016,7 +9156,7 @@ static void test_dpi(void)
}
- device_context = create_device_context(factory, ctx.device);
+ device_context = create_device_context(factory, ctx.device, d3d11);
ok(!!device_context, "Failed to create device context.\n");
ID2D1DeviceContext_GetDpi(device_context, &dpi_x, &dpi_y);
@@ -9186,7 +9326,7 @@ static void test_dpi(void)
release_test_context(&ctx);
}
-static void test_wic_bitmap_format(void)
+static void test_wic_bitmap_format(BOOL d3d11)
{
IWICImagingFactory *wic_factory;
struct d2d1_test_context ctx;
@@ -9209,7 +9349,7 @@ static void test_wic_bitmap_format(void)
{&GUID_WICPixelFormat32bppBGR, {DXGI_FORMAT_B8G8R8A8_UNORM, D2D1_ALPHA_MODE_IGNORE}},
};
- if (!init_test_context(&ctx))
+ if (!init_test_context(&ctx, d3d11))
return;
rt = ctx.rt;
@@ -9243,7 +9383,7 @@ static void test_wic_bitmap_format(void)
release_test_context(&ctx);
}
-static void test_math(void)
+static void test_math(BOOL d3d11)
{
float s, c, t, l;
unsigned int i;
@@ -9352,8 +9492,8 @@ START_TEST(d2d1)
queue_test(test_linear_brush);
queue_test(test_radial_brush);
queue_test(test_path_geometry);
- queue_test(test_rectangle_geometry);
- queue_test(test_rounded_rectangle_geometry);
+ queue_d3d10_test(test_rectangle_geometry);
+ queue_d3d10_test(test_rounded_rectangle_geometry);
queue_test(test_bitmap_formats);
queue_test(test_alpha_mode);
queue_test(test_shared_bitmap);
@@ -9364,8 +9504,8 @@ START_TEST(d2d1)
queue_test(test_dc_target);
queue_test(test_hwnd_target);
queue_test(test_bitmap_target);
- queue_test(test_desktop_dpi);
- queue_test(test_stroke_style);
+ queue_d3d10_test(test_desktop_dpi);
+ queue_d3d10_test(test_stroke_style);
queue_test(test_gradient);
queue_test(test_draw_geometry);
queue_test(test_fill_geometry);
@@ -9375,13 +9515,13 @@ START_TEST(d2d1)
queue_test(test_create_device);
queue_test(test_bitmap_surface);
queue_test(test_device_context);
- queue_test(test_invert_matrix);
- queue_test(test_skew_matrix);
+ queue_d3d10_test(test_invert_matrix);
+ queue_d3d10_test(test_skew_matrix);
queue_test(test_command_list);
- queue_test(test_max_bitmap_size);
+ queue_d3d10_test(test_max_bitmap_size);
queue_test(test_dpi);
queue_test(test_wic_bitmap_format);
- queue_test(test_math);
+ queue_d3d10_test(test_math);
run_queued_tests();
}
--
2.20.1
2
1
[PATCH 11/12] d2d1/tests: Store an IDXGIDevice interface instead of an ID3D10Device1 interface in struct d2d1_test_context.
by Henri Verbeet Jan. 15, 2021
by Henri Verbeet Jan. 15, 2021
Jan. 15, 2021
From: Rémi Bernon <rbernon(a)codeweavers.com>
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
v3:
- QueryInterface() returns a NULL interface on failure; it's also not
supposed to fail.
- Get rid of superfluous DXGI device reference counting.
dlls/d2d1/tests/d2d1.c | 87 +++++++++++++++++++++---------------------
1 file changed, 44 insertions(+), 43 deletions(-)
diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c
index 6f8aac4fd04..d38cd5649a6 100644
--- a/dlls/d2d1/tests/d2d1.c
+++ b/dlls/d2d1/tests/d2d1.c
@@ -44,7 +44,7 @@ size_t mt_tests_size, mt_test_count;
struct d2d1_test_context
{
- ID3D10Device1 *device;
+ IDXGIDevice *device;
HWND window;
IDXGISwapChain *swapchain;
IDXGISurface *surface;
@@ -694,7 +694,7 @@ static BOOL compare_figure(struct d2d1_test_context *ctx, unsigned int x, unsign
return diff <= max_diff;
}
-static ID3D10Device1 *create_device(void)
+static ID3D10Device1 *create_d3d10_device(void)
{
ID3D10Device1 *device;
@@ -711,6 +711,22 @@ static ID3D10Device1 *create_device(void)
return NULL;
}
+static IDXGIDevice *create_device(void)
+{
+ ID3D10Device1 *d3d10_device;
+ IDXGIDevice *device;
+ HRESULT hr;
+
+ if (!(d3d10_device = create_d3d10_device()))
+ return NULL;
+
+ hr = ID3D10Device1_QueryInterface(d3d10_device, &IID_IDXGIDevice, (void **)&device);
+ ok(SUCCEEDED(hr), "Failed to get DXGI device, hr %#x.\n", hr);
+ ID3D10Device1_Release(d3d10_device);
+
+ return device;
+}
+
static HWND create_window(void)
{
RECT r = {0, 0, 640, 480};
@@ -721,20 +737,16 @@ static HWND create_window(void)
0, 0, r.right - r.left, r.bottom - r.top, NULL, NULL, NULL, NULL);
}
-static IDXGISwapChain *create_swapchain(ID3D10Device1 *device, HWND window, BOOL windowed)
+static IDXGISwapChain *create_swapchain(IDXGIDevice *device, HWND window, BOOL windowed)
{
IDXGISwapChain *swapchain;
DXGI_SWAP_CHAIN_DESC desc;
- IDXGIDevice *dxgi_device;
IDXGIAdapter *adapter;
IDXGIFactory *factory;
HRESULT hr;
- hr = ID3D10Device1_QueryInterface(device, &IID_IDXGIDevice, (void **)&dxgi_device);
- ok(SUCCEEDED(hr), "Failed to get DXGI device, hr %#x.\n", hr);
- hr = IDXGIDevice_GetAdapter(dxgi_device, &adapter);
+ hr = IDXGIDevice_GetAdapter(device, &adapter);
ok(SUCCEEDED(hr), "Failed to get adapter, hr %#x.\n", hr);
- IDXGIDevice_Release(dxgi_device);
hr = IDXGIAdapter_GetParent(adapter, &IID_IDXGIFactory, (void **)&factory);
ok(SUCCEEDED(hr), "Failed to get factory, hr %#x.\n", hr);
IDXGIAdapter_Release(adapter);
@@ -762,6 +774,19 @@ static IDXGISwapChain *create_swapchain(ID3D10Device1 *device, HWND window, BOOL
return swapchain;
}
+static IDXGISwapChain *create_d3d10_swapchain(ID3D10Device1 *device, HWND window, BOOL windowed)
+{
+ IDXGISwapChain *swapchain;
+ IDXGIDevice *dxgi_device;
+ HRESULT hr;
+
+ hr = ID3D10Device1_QueryInterface(device, &IID_IDXGIDevice, (void **)&dxgi_device);
+ ok(SUCCEEDED(hr), "Failed to get DXGI device, hr %#x.\n", hr);
+ swapchain = create_swapchain(dxgi_device, window, windowed);
+ IDXGIDevice_Release(dxgi_device);
+ return swapchain;
+}
+
static ID2D1RenderTarget *create_render_target_desc(IDXGISurface *surface, const D2D1_RENDER_TARGET_PROPERTIES *desc)
{
ID2D1RenderTarget *render_target;
@@ -806,7 +831,7 @@ static void release_test_context_(unsigned int line, struct d2d1_test_context *c
IDXGISurface_Release(ctx->surface);
IDXGISwapChain_Release(ctx->swapchain);
DestroyWindow(ctx->window);
- ID3D10Device1_Release(ctx->device);
+ IDXGIDevice_Release(ctx->device);
}
#define init_test_context(ctx) init_test_context_(__LINE__, ctx)
@@ -4256,7 +4281,7 @@ static void test_shared_bitmap(void)
IDXGISwapChain *swapchain2;
D2D1_SIZE_U size = {4, 4};
IDXGISurface1 *surface3;
- ID3D10Device1 *device2;
+ IDXGIDevice *device2;
HWND window2;
HRESULT hr;
@@ -4480,7 +4505,7 @@ static void test_shared_bitmap(void)
IWICBitmap_Release(wic_bitmap1);
IDXGISurface_Release(surface2);
IDXGISwapChain_Release(swapchain2);
- ID3D10Device1_Release(device2);
+ IDXGIDevice_Release(device2);
release_test_context(&ctx);
DestroyWindow(window2);
CoUninitialize();
@@ -7792,7 +7817,6 @@ static void test_create_device(void)
{
D2D1_CREATION_PROPERTIES properties = {0};
struct d2d1_test_context ctx;
- IDXGIDevice *dxgi_device;
ID2D1Factory1 *factory;
ID2D1Factory *factory2;
ID2D1Device *device;
@@ -7809,10 +7833,7 @@ static void test_create_device(void)
return;
}
- hr = ID3D10Device1_QueryInterface(ctx.device, &IID_IDXGIDevice, (void **)&dxgi_device);
- ok(SUCCEEDED(hr), "Failed to get IDXGIDevice interface, hr %#x.\n", hr);
-
- hr = ID2D1Factory1_CreateDevice(factory, dxgi_device, &device);
+ hr = ID2D1Factory1_CreateDevice(factory, ctx.device, &device);
ok(SUCCEEDED(hr), "Failed to get ID2D1Device, hr %#x.\n", hr);
ID2D1Device_GetFactory(device, &factory2);
@@ -7822,18 +7843,17 @@ static void test_create_device(void)
if (pD2D1CreateDevice)
{
- hr = pD2D1CreateDevice(dxgi_device, NULL, &device);
+ hr = pD2D1CreateDevice(ctx.device, NULL, &device);
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
ID2D1Device_Release(device);
- hr = pD2D1CreateDevice(dxgi_device, &properties, &device);
+ hr = pD2D1CreateDevice(ctx.device, &properties, &device);
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
ID2D1Device_Release(device);
}
else
win_skip("D2D1CreateDevice() is unavailable.\n");
- IDXGIDevice_Release(dxgi_device);
release_test_context(&ctx);
refcount = ID2D1Factory1_Release(factory);
@@ -8062,7 +8082,6 @@ static void test_bitmap_surface(void)
IDXGISurface *surface2;
D2D1_PIXEL_FORMAT pixel_format;
struct d2d1_test_context ctx;
- IDXGIDevice *dxgi_device;
ID2D1Factory1 *factory;
ID2D1RenderTarget *rt;
ID2D1Bitmap1 *bitmap;
@@ -8101,10 +8120,7 @@ static void test_bitmap_surface(void)
ID2D1DeviceContext_Release(device_context);
/* Bitmap created from DXGI surface. */
- hr = ID3D10Device1_QueryInterface(ctx.device, &IID_IDXGIDevice, (void **)&dxgi_device);
- ok(SUCCEEDED(hr), "Failed to get IDXGIDevice interface, hr %#x.\n", hr);
-
- hr = ID2D1Factory1_CreateDevice(factory, dxgi_device, &device);
+ hr = ID2D1Factory1_CreateDevice(factory, ctx.device, &device);
ok(SUCCEEDED(hr), "Failed to get ID2D1Device, hr %#x.\n", hr);
hr = ID2D1Device_CreateDeviceContext(device, D2D1_DEVICE_CONTEXT_OPTIONS_NONE, &device_context);
@@ -8134,10 +8150,7 @@ static void test_bitmap_surface(void)
}
/* A8 surface */
- hr = IDXGISurface_GetDevice(ctx.surface, &IID_IDXGIDevice, (void **)&dxgi_device);
- ok(SUCCEEDED(hr), "Failed to get the device, hr %#x.\n", hr);
-
- surface2 = create_surface(dxgi_device, DXGI_FORMAT_A8_UNORM);
+ surface2 = create_surface(ctx.device, DXGI_FORMAT_A8_UNORM);
hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(device_context, surface2, NULL, &bitmap);
ok(SUCCEEDED(hr) || broken(hr == WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT) /* Win7 */,
@@ -8152,7 +8165,6 @@ static void test_bitmap_surface(void)
ID2D1Bitmap1_Release(bitmap);
}
- IDXGIDevice_Release(dxgi_device);
IDXGISurface_Release(surface2);
hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(device_context, ctx.surface, NULL, &bitmap);
@@ -8212,7 +8224,6 @@ static void test_bitmap_surface(void)
ID2D1DeviceContext_Release(device_context);
ID2D1Device_Release(device);
- IDXGIDevice_Release(dxgi_device);
/* DC target */
rt_desc.type = D2D1_RENDER_TARGET_TYPE_DEFAULT;
@@ -8282,7 +8293,6 @@ static void test_device_context(void)
struct d2d1_test_context ctx;
D2D1_BITMAP_OPTIONS options;
ID2D1DCRenderTarget *dc_rt;
- IDXGIDevice *dxgi_device;
D2D1_UNIT_MODE unit_mode;
ID2D1Factory1 *factory;
ID2D1RenderTarget *rt;
@@ -8305,12 +8315,8 @@ static void test_device_context(void)
return;
}
- hr = ID3D10Device1_QueryInterface(ctx.device, &IID_IDXGIDevice, (void **)&dxgi_device);
- ok(SUCCEEDED(hr), "Failed to get IDXGIDevice interface, hr %#x.\n", hr);
-
- hr = ID2D1Factory1_CreateDevice(factory, dxgi_device, &device);
+ hr = ID2D1Factory1_CreateDevice(factory, ctx.device, &device);
ok(SUCCEEDED(hr), "Failed to get ID2D1Device, hr %#x.\n", hr);
- IDXGIDevice_Release(dxgi_device);
hr = ID2D1Device_CreateDeviceContext(device, D2D1_DEVICE_CONTEXT_OPTIONS_NONE, &device_context);
ok(SUCCEEDED(hr), "Failed to create device context, hr %#x.\n", hr);
@@ -8585,19 +8591,14 @@ static void test_skew_matrix(void)
}
}
-static ID2D1DeviceContext *create_device_context(ID2D1Factory1 *factory, ID3D10Device1 *d3d_device)
+static ID2D1DeviceContext *create_device_context(ID2D1Factory1 *factory, IDXGIDevice *dxgi_device)
{
ID2D1DeviceContext *device_context;
- IDXGIDevice *dxgi_device;
ID2D1Device *device;
HRESULT hr;
- hr = ID3D10Device1_QueryInterface(d3d_device, &IID_IDXGIDevice, (void **)&dxgi_device);
- ok(SUCCEEDED(hr), "Failed to get IDXGIDevice interface, hr %#x.\n", hr);
-
hr = ID2D1Factory1_CreateDevice(factory, dxgi_device, &device);
ok(SUCCEEDED(hr), "Failed to get ID2D1Device, hr %#x.\n", hr);
- IDXGIDevice_Release(dxgi_device);
hr = ID2D1Device_CreateDeviceContext(device, D2D1_DEVICE_CONTEXT_OPTIONS_NONE, &device_context);
ok(SUCCEEDED(hr), "Failed to create device context, hr %#x.\n", hr);
@@ -8905,7 +8906,7 @@ static void test_max_bitmap_size(void)
}
window = create_window();
- swapchain = create_swapchain(device, window, TRUE);
+ swapchain = create_d3d10_swapchain(device, window, TRUE);
hr = IDXGISwapChain_GetBuffer(swapchain, 0, &IID_IDXGISurface, (void **)&surface);
ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
--
2.20.1
2
1
[PATCH 10/12] d2d1/tests: Pass a d2d1_test_context structure get_surface_readback().
by Henri Verbeet Jan. 15, 2021
by Henri Verbeet Jan. 15, 2021
Jan. 15, 2021
From: Rémi Bernon <rbernon(a)codeweavers.com>
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
v3:
- Do not pass context to release_resource_readback().
dlls/d2d1/tests/d2d1.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c
index 38fe6c4ff7d..6f8aac4fd04 100644
--- a/dlls/d2d1/tests/d2d1.c
+++ b/dlls/d2d1/tests/d2d1.c
@@ -311,8 +311,9 @@ static void cubic_to(ID2D1GeometrySink *sink, float x1, float y1, float x2, floa
ID2D1GeometrySink_AddBezier(sink, &b);
}
-static void get_surface_readback(IDXGISurface *surface, struct resource_readback *rb)
+static void get_surface_readback(struct d2d1_test_context *ctx, struct resource_readback *rb)
{
+ IDXGISurface *surface = ctx->surface;
D3D10_TEXTURE2D_DESC texture_desc;
D3D10_MAPPED_TEXTURE2D map_desc;
DXGI_SURFACE_DESC surface_desc;
@@ -466,7 +467,7 @@ static BOOL compare_surface(struct d2d1_test_context *ctx, const char *ref_sha1)
struct resource_readback rb;
BOOL ret;
- get_surface_readback(ctx->surface, &rb);
+ get_surface_readback(ctx, &rb);
ret = compare_sha1(rb.data, rb.pitch, 4, rb.width, rb.height, ref_sha1);
release_resource_readback(&rb);
@@ -638,7 +639,7 @@ static BOOL compare_figure(struct d2d1_test_context *ctx, unsigned int x, unsign
unsigned int i, j, span, diff;
struct resource_readback rb;
- get_surface_readback(ctx->surface, &rb);
+ get_surface_readback(ctx, &rb);
figure.span_count = 0;
figure.spans_size = 64;
@@ -2170,7 +2171,7 @@ static void test_linear_brush(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- get_surface_readback(ctx.surface, &rb);
+ get_surface_readback(&ctx, &rb);
for (i = 0; i < ARRAY_SIZE(test1); ++i)
{
DWORD colour;
@@ -2243,7 +2244,7 @@ static void test_linear_brush(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- get_surface_readback(ctx.surface, &rb);
+ get_surface_readback(&ctx, &rb);
for (i = 0; i < ARRAY_SIZE(test2); ++i)
{
DWORD colour;
@@ -2367,7 +2368,7 @@ static void test_radial_brush(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- get_surface_readback(ctx.surface, &rb);
+ get_surface_readback(&ctx, &rb);
for (i = 0; i < ARRAY_SIZE(test1); ++i)
{
DWORD colour;
@@ -2442,7 +2443,7 @@ static void test_radial_brush(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- get_surface_readback(ctx.surface, &rb);
+ get_surface_readback(&ctx, &rb);
for (i = 0; i < ARRAY_SIZE(test2); ++i)
{
DWORD colour;
--
2.20.1
2
1
[PATCH 09/12] d2d1/tests: Pass a d2d1_test_context structure to compare_figure().
by Henri Verbeet Jan. 15, 2021
by Henri Verbeet Jan. 15, 2021
Jan. 15, 2021
From: Rémi Bernon <rbernon(a)codeweavers.com>
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
dlls/d2d1/tests/d2d1.c | 296 ++++++++++++++++++++---------------------
1 file changed, 148 insertions(+), 148 deletions(-)
diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c
index 01abc314504..38fe6c4ff7d 100644
--- a/dlls/d2d1/tests/d2d1.c
+++ b/dlls/d2d1/tests/d2d1.c
@@ -631,14 +631,14 @@ static void read_figure(struct figure *figure, BYTE *data, unsigned int pitch,
figure_add_span(figure, span);
}
-static BOOL compare_figure(IDXGISurface *surface, unsigned int x, unsigned int y,
+static BOOL compare_figure(struct d2d1_test_context *ctx, unsigned int x, unsigned int y,
unsigned int w, unsigned int h, DWORD prev, unsigned int max_diff, const char *ref)
{
struct figure ref_figure, figure;
unsigned int i, j, span, diff;
struct resource_readback rb;
- get_surface_readback(surface, &rb);
+ get_surface_readback(ctx->surface, &rb);
figure.span_count = 0;
figure.spans_size = 64;
@@ -3437,7 +3437,7 @@ static void test_path_geometry(void)
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_figure(ctx.surface, 0, 0, 160, 160, 0xff652e89, 64,
+ match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 64,
"7xoCngECngECngECngECngECngECngECnQEEnAEEnAEEnAEEnAEEmwEGmgEGmgEGmgEGmQEImAEI"
"lAEECASLAQgKCIEBDQoMew8KD3YQDBByEgwSbhMOEmwUDhRpFBAUZxUQFWUVEhVjFhIWYRYUFl8X"
"FBddFxYWXRYYFlsXGBdaFhoWWRYcFlgVHhVXFSAVVhQiFFUUIxRVEyYTVBIoElQRKhFUECwQUxAu"
@@ -3447,7 +3447,7 @@ static void test_path_geometry(void)
"EBVnFBAUaRQOFGsTDhJvEgwSchAMEHYPCg96DQoMggEICgiLAQQIBJQBCJgBCJkBBpoBBpoBBpoB"
"BpsBBJwBBJwBBJwBBJwBBJ0BAp4BAp4BAp4BAp4BAp4BAp4BAp4BAgAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 0, 226, 160, 160, 0xff652e89, 64,
+ match = compare_figure(&ctx, 0, 226, 160, 160, 0xff652e89, 64,
"7xoCngECngECngECngECngECngECngECnQEEnAEEnAEEnAEEnAEEmwEGmgEGmgEGmgEGmQEImAEI"
"lAEECASLAQgKCIEBDQoMew8KD3YQDBByEgwSbhMOEmwUDhRpFBAUZxUQFWUVEhVjFhIWYRYUFl8X"
"FBddFxYWXRYYFlsXGBdaFhoWWRYcFlgVHhVXFSAVVhQiFFUUIxRVEyYTVBIoElQRKhFUECwQUxAu"
@@ -3457,7 +3457,7 @@ static void test_path_geometry(void)
"EBVnFBAUaRQOFGsTDhJvEgwSchAMEHYPCg96DQoMggEICgiLAQQIBJQBCJgBCJkBBpoBBpoBBpoB"
"BpsBBJwBBJwBBJwBBJwBBJ0BAp4BAp4BAp4BAp4BAp4BAp4BAp4BAgAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 0, 320, 160, 0xff652e89, 64,
+ match = compare_figure(&ctx, 160, 0, 320, 160, 0xff652e89, 64,
"gVQBwAIBWgHlAQFYAecBAVYB6QEBVAHrAQEjDCMB7AECHhQeAu0BAxoYGgPvAQMWHhYD8QEDFCAU"
"A/MBBBAkEAT0AQUOJw0F9QEGCioKBvcBBggsCAb4AQgFLgUI+QEJATIBCfsBCAIwAgj8AQcFLAUH"
"/QEFCCgIBf4BBAwiDAT/AQIQHBAClwISlwIBPgGAAgI8Av8BAzwD/QEEPAT7AQY6BvkBBzoH+AEI"
@@ -3469,7 +3469,7 @@ static void test_path_geometry(void)
"BfUBBBAlDwTzAQQSIhIE8QEDFh4WA/ABAhkaGQLvAQIcFhwC7QECIBAgAusBASgEKAHpAQFWAecB"
"AVgB5QEBWgHAAgHhUgAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 160, 320, 160, 0xff652e89, 64,
+ match = compare_figure(&ctx, 160, 160, 320, 160, 0xff652e89, 64,
"/VUB5QEBWAHnAQFWAekBAVQB6wECIQ8hAe0BAh0VHQLuAQIZGhkD7wEDFh4WA/EBBBMhEwPzAQQQ"
"JQ8F9AEFDCgNBfUBBgoqCgb3AQcHLQcG+QEIBC8ECPkBPAEJ+wEIAy8CCP0BBgYrBQf9AQUJJgkF"
"/wEDDSANBP8BAhEaEQKYAhAXAYACAT4BgAICPQL+AQM8BPwBBTsE+wEGOgb6AQc5B/gBCDgJ9gEJ"
@@ -3533,21 +3533,21 @@ static void test_path_geometry(void)
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_figure(ctx.surface, 0, 0, 160, 160, 0xff652e89, 64,
+ match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 64,
"7xoCngECngECngECngECngECngECngECnQEEnAEEnAEEnAEEnAEEmwEGmgEGmgEGmgEGmQEImAEI"
"lAEQiwEagQEjeyh2LHIwbjNsNmk4ZzplPGM+YUBfQl1DXURbRlpGWUhYSFdKVkpVS1VMVExUTFRM"
"U05STlJOUk5STlFQUFBQUFBQTlRIXD9mMnYqdjJmP1xIVE5QUFBQUFBQUU5STlJOUk5STlNMVExU"
"TFRMVEtWSlZKV0hYSFlGWkZbRFxDXkJfQGE+YzxlOmc4aTZrM28wcix2KHojggEaiwEQlAEImAEI"
"mQEGmgEGmgEGmgEGmwEEnAEEnAEEnAEEnAEEnQECngECngECngECngECngECngECngEC");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 0, 226, 160, 160, 0xff652e89, 64,
+ match = compare_figure(&ctx, 0, 226, 160, 160, 0xff652e89, 64,
"7xoCngECngECngECngECngECngECngECnQEEnAEEnAEEnAEEnAEEmwEGmgEGmgEGmgEGmQEImAEI"
"lAEQiwEagQEjeyh2LHIwbjNsNmk4ZzplPGM+YUBfQl1DXURbRlpGWUhYSFdKVkpVS1VMVExUTFRM"
"U05STlJOUk5STlFQUFBQUFBQTlRIXD9mMnYqdjJmP1xIVE5QUFBQUFBQUU5STlJOUk5STlNMVExU"
"TFRMVEtWSlZKV0hYSFlGWkZbRFxDXkJfQGE+YzxlOmc4aTZrM28wcix2KHojggEaiwEQlAEImAEI"
"mQEGmgEGmgEGmgEGmwEEnAEEnAEEnAEEnAEEnQECngECngECngECngECngECngECngEC");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 0, 320, 160, 0xff652e89, 64,
+ match = compare_figure(&ctx, 160, 0, 320, 160, 0xff652e89, 64,
"4VIBwAIBWgHlAQFYAecBAVYB6QEBVAHrAQIhDiIB7QECHRUdAu4BAhkaGQPvAQMWHhYD8QEEEyET"
"A/MBBBAkEAT1AQUMKA0F9QEGCioKBvcBBwctBwb5AQgELwQI+QEJATIBCfsBRP0BQ/0BQv8BQf8B"
"QIECP4ACQIACQf4BQ/wBRPsBRvoBR/gBSPcBSvYBS/QBTPMBTvIBTvIBT/ABUPABUe4BUu4BUu4B"
@@ -3556,7 +3556,7 @@ static void test_path_geometry(void)
"RPsBCQEyAQn6AQgELwQI+AEHBy0GB/cBBgoqCgb2AQUMKA0F9AEEECUPBPMBBBIiEwPxAQMWHhYD"
"8AECGRoZA+4BAh0VHQLsAQIhDiIB6wEBVAHpAQFWAecBAVgB5QEBWgHAAgEA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 160, 320, 160, 0xff652e89, 64,
+ match = compare_figure(&ctx, 160, 160, 320, 160, 0xff652e89, 64,
"gVQBXAHjAQFaAeUBAVgB5wEBVgHpAQEpAikB6wECIBAgAu0BAhwWHALvAQIZGhkC8AEDFh4WA/EB"
"BBIiEgTzAQQPJRAE9QEFDCgMBfYBBgoqCgb3AQcGLgYH+QEIAzADCPoBRvsBRPwBRP0BQv8BQIAC"
"QIECPoECQP8BQv0BRPwBRPsBRvkBSPgBSPcBSvUBTPQBTPMBTvIBTvEBUPABUO8BUu4BUu4BUu4B"
@@ -5841,18 +5841,18 @@ static void test_draw_geometry(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_figure(ctx.surface, 0, 0, 160, 160, 0xff652e89, 0, "");
+ match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0, "");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 0, 160, 160, 0xff652e89, 0, "yGBQUFBQUFBQUFDoYQAA");
+ match = compare_figure(&ctx, 160, 0, 160, 160, 0xff652e89, 0, "yGBQUFBQUFBQUFDoYQAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 320, 0, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 320, 0, 160, 160, 0xff652e89, 0,
"xjIUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUxjIA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 480, 0, 160, 160, 0xff652e89, 2,
+ match = compare_figure(&ctx, 480, 0, 160, 160, 0xff652e89, 2,
"zjECnQETjAEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEV"
"igEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEV"
"igEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEV"
@@ -5860,18 +5860,18 @@ static void test_draw_geometry(void)
"igEVigEVigEVigEVjAETnQECzjEA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 0, 160, 160, 160, 0xff652e89, 0, "5mAUjAEUjAEUjAEUjAEUhmIA");
+ match = compare_figure(&ctx, 0, 160, 160, 160, 0xff652e89, 0, "5mAUjAEUjAEUjAEUjAEUhmIA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 160, 160, 160, 0xff652e89, 0, "vmBkPGQ8ZDxkPGTeYQAA");
+ match = compare_figure(&ctx, 160, 160, 160, 160, 0xff652e89, 0, "vmBkPGQ8ZDxkPGTeYQAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 320, 160, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 320, 160, 160, 160, 0xff652e89, 0,
"5i4UjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUhjAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 480, 160, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 480, 160, 160, 160, 0xff652e89, 0,
"vi5kPGQ8ZDxkPGQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
"FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
@@ -5880,18 +5880,18 @@ static void test_draw_geometry(void)
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8ZDxkPGQ8ZDxk3i8A");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 0, 320, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
+ match = compare_figure(&ctx, 0, 320, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 320, 160, 160, 0xff652e89, 0, "yGBQSGA+ZDxkPmDgYQAA");
+ match = compare_figure(&ctx, 160, 320, 160, 160, 0xff652e89, 0, "yGBQSGA+ZDxkPmDgYQAA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 320, 320, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 320, 320, 160, 160, 0xff652e89, 0,
"iDAQjgEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjgEQiDAA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 480, 320, 160, 160, 0xff652e89, 10,
+ match = compare_figure(&ctx, 480, 320, 160, 160, 0xff652e89, 10,
"hDAYgwEieyh1LnAybBcIF2gWDhZkFhIWYRUWFV4VGhVbFRwVWRUeFVcVIBVVFCQUUxQmFFEUKBRP"
"FSgVTRUqFUwULBRLFC4USRQwFEgUMBRHFDIURhQyFEUUNBREFDQUQxQ2FEIUNhRBFDgUQBQ4FEAU"
"OBQ/FDoUPhQ6FD4UOhQ+FDoUPhQ6FD0UPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
@@ -5934,18 +5934,18 @@ static void test_draw_geometry(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_figure(ctx.surface, 0, 0, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
+ match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 0, 160, 160, 0xff652e89, 0, "yGBQSGA+ZDxkPmDgYQAA");
+ match = compare_figure(&ctx, 160, 0, 160, 160, 0xff652e89, 0, "yGBQSGA+ZDxkPmDgYQAA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 320, 0, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 320, 0, 160, 160, 0xff652e89, 0,
"iDAQjgEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjgEQiDAA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 480, 0, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 480, 0, 160, 160, 0xff652e89, 0,
"3C4oaUZVUExYRlxCHCgcPxU4FT0UPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
"FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
@@ -5954,18 +5954,18 @@ static void test_draw_geometry(void)
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FD0VOBU/YEJcRlhMUFVG7S8A");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 0, 160, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
+ match = compare_figure(&ctx, 0, 160, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 160, 160, 160, 0xff652e89, 0, "yGBQSGA+ZDxkPmDgYQAA");
+ match = compare_figure(&ctx, 160, 160, 160, 160, 0xff652e89, 0, "yGBQSGA+ZDxkPmDgYQAA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 320, 160, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 320, 160, 160, 160, 0xff652e89, 0,
"iDAQjgEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjgEQiDAA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 480, 160, 160, 160, 0xff652e89, 8,
+ match = compare_figure(&ctx, 480, 160, 160, 160, 0xff652e89, 8,
"3C4obT5dSFRQTlRKGCgYRhYwFkMVNBVBFTYVPxU5FD4UOhQ9FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
"FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
@@ -5974,18 +5974,18 @@ static void test_draw_geometry(void)
"PBQ8FDwUPRQ6FD4UOhQ/FTYVQRU0FUMWMBZGWEpVTVBTSltA8C8A");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 0, 320, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
+ match = compare_figure(&ctx, 0, 320, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 320, 160, 160, 0xff652e89, 0, "yGBQSGA+ZDxkPmDgYQAA");
+ match = compare_figure(&ctx, 160, 320, 160, 160, 0xff652e89, 0, "yGBQSGA+ZDxkPmDgYQAA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 320, 320, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 320, 320, 160, 160, 0xff652e89, 0,
"iDAQjgEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjgEQiDAA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 480, 320, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 480, 320, 160, 160, 0xff652e89, 0,
"3C4oZU5NWERgP2I9HigePBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
"FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
@@ -6028,18 +6028,18 @@ static void test_draw_geometry(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_figure(ctx.surface, 0, 0, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
+ match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 0, 160, 160, 0xff652e89, 0, "yGBQSGA+ZDxkPmDgYQAA");
+ match = compare_figure(&ctx, 160, 0, 160, 160, 0xff652e89, 0, "yGBQSGA+ZDxkPmDgYQAA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 320, 0, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 320, 0, 160, 160, 0xff652e89, 0,
"iDAQjgEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjgEQiDAA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 480, 0, 160, 160, 0xff652e89, 16,
+ match = compare_figure(&ctx, 480, 0, 160, 160, 0xff652e89, 16,
"hDAYgwEieyh1LnAybBcIF2gWDhZkFhIWYRUWFV4WGRVbFRwVWRUeFVcVIBVVFSMUUxQmFFEVJxRP"
"FSgVTRUqFUwULBRLFC4USRUvFEgUMBRHFDIURhQyFEUUNBREFDQUQxQ2FEIUNhRBFDgUQBQ4FEAU"
"OBQ/FTkUPhQ6FD4UOhQ+FDoUPhQ6FD0UPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
@@ -6048,18 +6048,18 @@ static void test_draw_geometry(void)
"FRwVWxUaFV4VFhVhFhIWZBYOFmgWChZsMnAudCp6IoMBGIQw");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 0, 160, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
+ match = compare_figure(&ctx, 0, 160, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 160, 160, 160, 0xff652e89, 0, "yGBQSGA+ZDxkPmDgYQAA");
+ match = compare_figure(&ctx, 160, 160, 160, 160, 0xff652e89, 0, "yGBQSGA+ZDxkPmDgYQAA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 320, 160, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 320, 160, 160, 160, 0xff652e89, 0,
"iDAQjgEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjgEQiDAA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 480, 160, 160, 160, 0xff652e89, 16,
+ match = compare_figure(&ctx, 480, 160, 160, 160, 0xff652e89, 16,
"3C4obzpjQF5EWkhXFSAVVRQkFFMUJhRRFCgUTxQqFE0VKhVMFCwUSxQuFEoULhVIFDAUSBQwFUYU"
"MhRGFDIURRQ0FEQUNBRDFTQVQhQ2FEIUNhRCFDYUQRQ4FEAUOBRAFDgUQBQ4FD8UOhQ+FDoUPhQ6"
"FD4UOhQ+FDoUPhQ6FD0VOxQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
@@ -6068,18 +6068,18 @@ static void test_draw_geometry(void)
"LhRLFCwUTBUrFE0UKhRPFCgUURQmFFMUJBRVSldIWUZdQWI78i8A");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 0, 320, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
+ match = compare_figure(&ctx, 0, 320, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 320, 160, 160, 0xff652e89, 0, "yGBQSGA+ZDxkPmDgYQAA");
+ match = compare_figure(&ctx, 160, 320, 160, 160, 0xff652e89, 0, "yGBQSGA+ZDxkPmDgYQAA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 320, 320, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 320, 320, 160, 160, 0xff652e89, 0,
"iDAQjgEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjgEQiDAA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 480, 320, 160, 160, 0xff652e89, 8,
+ match = compare_figure(&ctx, 480, 320, 160, 160, 0xff652e89, 8,
"9i80ZERWUExYRV5AHCocPRY4FjwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
"FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
@@ -6171,18 +6171,18 @@ static void test_draw_geometry(void)
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
ID2D1PathGeometry_Release(geometry);
- match = compare_figure(ctx.surface, 0, 0, 160, 160, 0xff652e89, 0, "");
+ match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0, "");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 0, 160, 160, 0xff652e89, 0, "");
+ match = compare_figure(&ctx, 160, 0, 160, 160, 0xff652e89, 0, "");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 320, 0, 160, 160, 0xff652e89, 0, "");
+ match = compare_figure(&ctx, 320, 0, 160, 160, 0xff652e89, 0, "");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 480, 0, 160, 160, 0xff652e89, 0, "q2MKlgEKq2MA");
+ match = compare_figure(&ctx, 480, 0, 160, 160, 0xff652e89, 0, "q2MKlgEKq2MA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 0, 160, 160, 160, 0xff652e89, 0, "iGNQUFCIYwAA");
+ match = compare_figure(&ctx, 0, 160, 160, 160, 0xff652e89, 0, "iGNQUFCIYwAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 160, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 160, 160, 160, 160, 0xff652e89, 0,
"qyIKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEK"
"lgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEK"
"lgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKQQpLCkEKSwqWAQqW"
@@ -6190,9 +6190,9 @@ static void test_draw_geometry(void)
"AQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqW"
"AQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQrLIwAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 320, 160, 160, 160, 0xff652e89, 0, "4GLAAuBi");
+ match = compare_figure(&ctx, 320, 160, 160, 160, 0xff652e89, 0, "4GLAAuBi");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 480, 160, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 480, 160, 160, 160, 0xff652e89, 0,
"qyIKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEK"
"lgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEK"
"lgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKSwpBCksKQQqWAQqWAQqW"
@@ -6201,7 +6201,7 @@ static void test_draw_geometry(void)
"AQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQrLIwAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 0, 320, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 0, 320, 160, 160, 0xff652e89, 0,
"rycCngECnQEEnAEEmwEGmgEGmQEImAEIlwEKlgEKlQEMlAEMkwEOkgEOkQEQkAEQjwESjgESjQEU"
"jAEUiwEKAgqKAQoCCokBCgQKiAEKBAqHAQoGCoYBCgYKhQEKCAqEAQoICoMBCgoKggEKCgqBAQoM"
"CoABCgwKfwoOCn4KDgp9ChAKfAoQCnsKEgp6ChIKeQoUCngKFAp3ChYKdgoWCnUKGAp0ChgKcwoa"
@@ -6210,7 +6210,7 @@ static void test_draw_geometry(void)
"CjYKVQo4ClQKOApTCjoKUgo6ClEKPApQCjwKTwo+Ck4KPgpNCkAKTApACksKQgpKCkIKSQpECkgK"
"RApHCkYKozIA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 320, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 160, 320, 160, 160, 0xff652e89, 0,
"ozIKRgpHCkQKSApECkkKQgpKCkIKSwpACkwKQApNCj4KTgo+Ck8KPApQCjwKUQo6ClIKOgpTCjgK"
"VAo4ClUKNgpWCjYKVwo0ClgKNApZCjIKWgoyClsKMApcCjAKXQouCl4KLgpfCiwKYAosCmEKKgpi"
"CioKYwooCmQKKAplCiYKZgomCmcKJApoCiQKaQoiCmoKIgprCiAKbAogCm0KHgpuCh4KbwocCnAK"
@@ -6219,7 +6219,7 @@ static void test_draw_geometry(void)
"CgIKiwEUjAEUjQESjgESjwEQkAEQkQEOkgEOkwEMlAEMlQEKlgEKlwEImAEImQEGmgEGmwEEnAEE"
"nQECngECrycA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 320, 320, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 320, 320, 160, 160, 0xff652e89, 0,
"rycCngECnQEEnAEEmwEGmgEGmQEImAEIlwEKlgEKlQEMlAEMkwEOkgEOkQEQkAEQjwESjgESjQEU"
"jAEUiwEKAgqKAQoCCokBCgQKiAEKBAqHAQoGCoYBCgYKhQEKCAqEAQoICoMBCgoKggEKCgqBAQoM"
"CoABCgwKfwoOCn4KDgp9ChAKfAoQCnsKEgp6ChIKeQoUCngKFAp3ChYKdgoWCnUKGAp0ChgKcwoa"
@@ -6228,7 +6228,7 @@ static void test_draw_geometry(void)
"CjYKVQo4ClQKOApTCjoKUgo6ClEKPApQCjwKTwo+Ck4KPgpNCkAKTApACksKQgpKCkIKSQpECkgK"
"RApHWkZagzEA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 480, 320, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 480, 320, 160, 160, 0xff652e89, 0,
"gzFaRlpHCkQKSApECkkKQgpKCkIKSwpACkwKQApNCj4KTgo+Ck8KPApQCjwKUQo6ClIKOgpTCjgK"
"VAo4ClUKNgpWCjYKVwo0ClgKNApZCjIKWgoyClsKMApcCjAKXQouCl4KLgpfCiwKYAosCmEKKgpi"
"CioKYwooCmQKKAplCiYKZgomCmcKJApoCiQKaQoiCmoKIgprCiAKbAogCm0KHgpuCh4KbwocCnAK"
@@ -6283,7 +6283,7 @@ static void test_draw_geometry(void)
ID2D1RectangleGeometry_Release(rect_geometry[1]);
ID2D1RectangleGeometry_Release(rect_geometry[0]);
- match = compare_figure(ctx.surface, 0, 0, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0,
"vi5kPGQ8ZDxkPGQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
"FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
@@ -6291,7 +6291,7 @@ static void test_draw_geometry(void)
"FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8ZDxkPGQ8ZDxk3i8A");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 0, 320, 160, 0xff652e89, 32,
+ match = compare_figure(&ctx, 160, 0, 320, 160, 0xff652e89, 32,
"8XYGtQIOrAIXpAIfmwIokwIwigI4gwJA+gFJ8gFR6QEzAiXhATMKJdgBMxMl0AEzGyXHATMkJb8B"
"MysmtgEzNCWvATM8JaYBM0UlngEzTSWVATNWJY0BM14lhAEzZyV8M28lczN4JWszgAElYjOIASZa"
"M5ABJVgtmQElWCWhASVYJaEBJVgloQElWCWhASVYJaEBJVgloQElWCWhASVYJaEBJVglmQEtWCWQ"
@@ -6299,7 +6299,7 @@ static void test_draw_geometry(void)
"KzO/ASUkM8cBJRsz0AElEzPYASUKM+EBJQIz6QFR8gFJ+gFAgwI4igIwkwIomwIfpAIXrAIOtQIG"
"8XYA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 0, 160, 160, 320, 0xff652e89, 32,
+ match = compare_figure(&ctx, 0, 160, 160, 320, 0xff652e89, 32,
"ujEBngECnQEDnQEEmwEFmgEHmQEHmAEIlwEKlgEKlQELlAENkwENkgEOkQEQjwERjwESjQETjAEU"
"jAEKAQqKAQoCCokBCgMKiQEKBAqHAQoFCoYBCgYKhgEKBwqEAQoICoMBCgkKgwEKCgqBAQoLCoAB"
"Cg0KfgsNCn4KDgp9ChAKewsQCnsKEQp6ChMKeAoUCngKFAp3ChYKdQoXCnUKGApzChkKcgoaCnIK"
@@ -6318,7 +6318,7 @@ static void test_draw_geometry(void)
"CoMBCggKhAEKBwqGAQoGCoYBCgUKhwEKBAqJAQoDCokBCgIKigEKAQqMARSMARONARKPARGPARCR"
"AQ6SAQ2TAQ2UAQuVAQqWAQqXAQiYAQeZAQeaAQWbAQSdAQOdAQKeAQG6MQAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 160, 320, 320, 0xff652e89, 64,
+ match = compare_figure(&ctx, 160, 160, 320, 320, 0xff652e89, 64,
"82ICvQIEugIHuAIJtgIKtAINsgIPsAIRrQITrAIVqQIYpwIZpgIbowIeoQIgnwIhnQIkmwImmAIp"
"lgIVARSVAhUDFJICFQUVkAIVBxSPAhUJFIwCFQwUigIVDRWHAhYPFIYCFRIUhAIVFBSBAhUWFf8B"
"FRgU/gEVGhT7ARUcFfkBFR4U9wEWIBT1ARUjFPMBFSQV8AEVJxTvARUpFOwBFisU6gEVLRXoARUv"
@@ -6454,7 +6454,7 @@ static void test_draw_geometry(void)
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
ID2D1PathGeometry_Release(geometry);
- match = compare_figure(ctx.surface, 0, 0, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0,
"vi5kPGQ8ZDxkPGQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
"FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
@@ -6462,7 +6462,7 @@ static void test_draw_geometry(void)
"FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8ZDxkPGQ8ZDxk3i8A");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 0, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 160, 0, 160, 160, 0xff652e89, 0,
"vi5kPGQ8ZDxkPGQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
"FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
@@ -6470,7 +6470,7 @@ static void test_draw_geometry(void)
"FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8ZDxkPGQ8ZDxk3i8A");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 320, 0, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 320, 0, 160, 160, 0xff652e89, 0,
"vi5kPGQ8ZDxkPGQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
"FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
@@ -6478,7 +6478,7 @@ static void test_draw_geometry(void)
"FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8ZDxkPGQ8ZDxk3i8A");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 480, 0, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 480, 0, 160, 160, 0xff652e89, 0,
"yC5aRlpGWjxkPGQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
"FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
@@ -6487,7 +6487,7 @@ static void test_draw_geometry(void)
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8ZDxkPGQ8ZDxk3i8A");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 0, 160, 160, 160, 0xff652e89, 64,
+ match = compare_figure(&ctx, 0, 160, 160, 160, 0xff652e89, 64,
"3SoDYAM6B1gHOgtQCzoPSA87EkASPBc2FzwcLBw8IiAiPWI+Yj5iPhQBOAEUPhQKJgoUPxQ4FEAU"
"OBRAFDgUQBQ4FEAUOBRBFDYUQhQ2FEIUNhRCFDYUQhQ2FEIUNhRDFDQURBQ0FEQUNBREFDQURBQ0"
"FEQUNBREFDQURBQ0FEQUNBREFDQURRQyFEYUMhRGFDIURhQyFEYUMhRGFDIURhQyFEYUMhRGFDIU"
@@ -6496,7 +6496,7 @@ static void test_draw_geometry(void)
"NhRCFDYUQhQ2FEEUOBRAFDgUQBQ4FEAUOBRAFDgUPxQKJgoUPhQBOAEUPmI+Yj5iPSIgIjwcLBw8"
"FzYXPBJAEjsPSA86C1ALOgdYBzoDYAPdKgAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 160, 160, 160, 0xff652e89, 1024,
+ match = compare_figure(&ctx, 160, 160, 160, 160, 0xff652e89, 1024,
"uxUBnwECngEDnQEEnAEFmwEGmwEGmgEHmQEImAEJlwEKlgELlQEMlQEMlAENkwEOkgEPkQEQkAER"
"VQQ2Ek0KOBJFEDkTPRY6FDUcOxUrJDwYHi09Yj5iP2BAQwkUQDgUFEAUOBRAFDcUQRQ3FEEUNxRC"
"FDYUQhQ2FEIUNhRCFDUUQxQ1FEMUNRRDFDUUQxQ1FEQUNBREFDQURBQ0FEQUNBREFDQURBQ0FEQU"
@@ -6507,7 +6507,7 @@ static void test_draw_geometry(void)
"NgRVEZABEJEBD5IBDpMBDZQBDJUBDJUBC5YBCpcBCZgBCJkBB5oBBpsBBpsBBZwBBJ0BA54BAp8B"
"AbsV");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 320, 160, 160, 160, 0xff652e89, 1024,
+ match = compare_figure(&ctx, 320, 160, 160, 160, 0xff652e89, 1024,
"pBYBngECnQEDnAEEmwEFmgEGmQEGmQEHmAEIlwEJlgEKlQELlAEMkwEMkwENkgEOkQEPkAEQNgRV"
"ETcKTRI4EEUSOhY9EzscNRQ8JCsVPS0eGD5iPmI/YEAUCUNAFBQ4QBQ4FEEUNxRBFDcUQRQ3FEEU"
"NhRCFDYUQhQ2FEMUNRRDFDUUQxQ1FEMUNRRDFDUUQxQ0FEQUNBREFDQURBQ0FEQUNBREFDQURBQ0"
@@ -6518,7 +6518,7 @@ static void test_draw_geometry(void)
"EVUENhCQAQ+RAQ6SAQ2TAQyTAQyUAQuVAQqWAQmXAQiYAQeZAQaZAQaaAQWbAQScAQOdAQKeAQGk"
"FgAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 480, 160, 160, 160, 0xff652e89, 64,
+ match = compare_figure(&ctx, 480, 160, 160, 160, 0xff652e89, 64,
"wCsDmQEHlQELkQEPSwJAEkgLNhc8HCwcPCIgIj1iPmI+Yj4UATgBFD4UCiYKFD8UOBRAFDgUQBQ4"
"FEAUOBRAFDgUQRQ2FEIUNhRCFDYUQhQ2FEIUNhRCFDYUQxQ0FEQUNBREFDQURBQ0FEQUNBREFDQU"
"RBQ0FEQUNBREFDQURBQ0FEUUMhRGFDIURhQyFEYUMhRGFDIURhQyFEYUMhRGFDIURhQyFEYUMhRG"
@@ -6528,7 +6528,7 @@ static void test_draw_geometry(void)
"QBI7D0gPOgtQCzoHWAc6A2AD3SoA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 0, 320, 160, 160, 0xff652e89, 64,
+ match = compare_figure(&ctx, 0, 320, 160, 160, 0xff652e89, 64,
"3SkmcThiRFdOTVhEICAgPhwsHDwXNhc8FDwUOxQ+FDoUPhQ6FD4UOhQ+FDoUPhQ5FEAUOBRAFDgU"
"QBQ4FEAUOBRAFDcUQhQ2FEIUNhRCFDYUQhQ2FEIUNhRCFDUURBQ0FEQUNBREFDQURBQ0FEQUNBRE"
"FDQURBQ0FEQUNBREFDQURBQzFEYUMhRGFDIURhQyFEYUMhRGFDIURhQyFEYUMhRGFDIURhQyFEYU"
@@ -6537,7 +6537,7 @@ static void test_draw_geometry(void)
"QhQ2FEIUNxRAFDgUQBQ4FEAUOBRAFDgUQBQ5FD4UOhQ+FDoUPhQ6FD4UOhQ+FDsUPBQ8FzYXPBws"
"HD4gICBEWE1OV0RiOHEm3SkA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 320, 160, 160, 0xff652e89, 1024,
+ match = compare_figure(&ctx, 160, 320, 160, 160, 0xff652e89, 1024,
"zykoczhkRVhQTlpEFx4tPRUrJDwUNRw7FDwVOxQ+FDoUPhQ5FEAUOBRAFDgUQBQ4FEAUOBRBFDcU"
"QRQ3FEEUNhRCFDYUQhQ2FEIUNhRDFDUUQxQ1FEMUNRRDFDUUQxQ0FEQUNBREFDQURBQ0FEQUNBRE"
"FDQURBQ0FEQUNBREFDQURBQ0FEQUMxRFFDMURRQzFEUUMxRFFDMURRQzFEUUMxRFFDMURRQzFEUU"
@@ -6546,7 +6546,7 @@ static void test_draw_geometry(void)
"QhQ2FEIUNhRCFDYUQRQ3FEEUNxRBFDgUQBQ4FEAUOBRAFDgUQBQ5FD4UOhQ+FDsVPBQ7HDUUPCQr"
"FT0tHhdEWk5QWEVkOHMozykA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 320, 320, 160, 160, 0xff652e89, 1024,
+ match = compare_figure(&ctx, 320, 320, 160, 160, 0xff652e89, 1024,
"6SkobThfRVNQSFpALR4XPSQrFTscNRQ7FTwUOhQ+FDoUPhQ5FEAUOBRAFDgUQBQ4FEAUNxRBFDcU"
"QRQ3FEEUNxRCFDYUQhQ2FEIUNRRDFDUUQxQ1FEMUNRRDFDUUQxQ1FEQUNBREFDQURBQ0FEQUNBRE"
"FDQURBQ0FEQUNBREFDQURBQ0FEQUNBRFFDMURRQzFEUUMxRFFDMURRQzFEUUMxRFFDMURRQzFEUU"
@@ -6555,7 +6555,7 @@ static void test_draw_geometry(void)
"QhQ2FEIUNhRCFDcUQRQ3FEEUNxRBFDcUQBQ4FEAUOBRAFDgUQBQ5FD4UOhQ+FDoUPBU7FDUcOxUr"
"JD0XHi1AWkhQU0VfOG0o6SkA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 480, 320, 160, 160, 0xff652e89, 64,
+ match = compare_figure(&ctx, 480, 320, 160, 160, 0xff652e89, 64,
"3SkmcThiRFdOTVhGHiAgRhQsHDwXNhc8FDwUOxQ+FDoUPhQ6FD4UOhQ+FDoUPhQ5FEAUOBRAFDgU"
"QBQ4FEAUOBRAFDcUQhQ2FEIUNhRCFDYUQhQ2FEIUNhRCFDUURBQ0FEQUNBREFDQURBQ0FEQUNBRE"
"FDQURBQ0FEQUNBREFDQURBQzFEYUMhRGFDIURhQyFEYUMhRGFDIURhQyFEYUMhRGFDIURhQyFEYU"
@@ -6634,7 +6634,7 @@ static void test_draw_geometry(void)
ID2D1TransformedGeometry_Release(transformed_geometry[1]);
ID2D1TransformedGeometry_Release(transformed_geometry[0]);
- match = compare_figure(ctx.surface, 0, 0, 160, 160, 0xff652e89, 128,
+ match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 128,
"yjIJkQEHBwaIAQUSBYMBBBYEggEEFgSCAQQWBIIBBBYEggEEFgSCAQQWBIIBBBYEggEEFgSCAQQW"
"BIIBBBYEggEEFgSDAQQVBIMBBBUEgwEEFQSDAQQVBIMBBBUEgwEEFQSDAQQVBIMBBBUEgwEEFQSD"
"AQQVBIQBBBQEhAEEFASEAQQTBIUBBBMEhQEEEwSFAQQTBIUBBBMEhQEEEwSGAQQSBIYBBBIEhgEE"
@@ -6643,13 +6643,13 @@ static void test_draw_geometry(void)
"AQaaAQaaAQaaAQabAQWbAQWbAQWbAQWaAQeZAQeZAQeZAQiXAQQBBJYBBAMElQEEAwWRAQUGBY0B"
"BQwFhwEFEgSCAQUXBYABBBoFfgUYBIIBBhEFiAEUpTEA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 0, 320, 160, 0xff652e89, 512,
+ match = compare_figure(&ctx, 160, 0, 320, 160, 0xff652e89, 512,
"yJIBArkCDa4CGKMCIZoCK5ECM4gCO4ECQ/gBS/EBUesBLAYl5QEsDiPeASwWIdkBLBwh0wEsISHO"
"ASsgKMsBKR4vyAEnHDPIASUaNMsBIxg1mQEFMCIUN54BCygiDzijAREhIgY9qAEYGWGuAR4RXbMB"
"JAhbuQGAAcABesYBc84Ba9YBTvQBP4MCOIoCNI4CM5ACMZICL5QCLZYCK5kCKJsCJ54CI6MCHq8C"
"EraSAQAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 0, 160, 160, 320, 0xff652e89, 512,
+ match = compare_figure(&ctx, 0, 160, 160, 320, 0xff652e89, 512,
"xWkCmwEFmAEJlQELlAENkgEOkQEPjwESjQETjAEVigELAQqJAQsCCogBCwQKhwEKBQqGAQoGCoYB"
"CgcKhAEKCAqEAQoIC4IBCgoKggEKCgqBAQoMCoABCgwKfwoNCn8KDgp9Cg8KfQoPCnwKEQp7ChEK"
"egoSCnoKEwp4ChQKeAoUCncLFQp2ChYKdgoWCnYKFwp2ChYKdgoWCncKFgp2ChYKdgoWCncKFQt2"
@@ -6663,7 +6663,7 @@ static void test_draw_geometry(void)
"iQEKAgqJAQoCCooBCgIKiQEKAgqKAQoBCosBCgEKigEKAQqLARSMARSLARSMAROMARONARKOARGO"
"ARGPARCQAQ6RAQ2YAQTEZAAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 160, 320, 320, 0xff652e89, 1024,
+ match = compare_figure(&ctx, 160, 160, 320, 320, 0xff652e89, 1024,
"ytABA7gCCbICD60CFKkCF6cCGqMCHqACIZ0CJJoCJpgCKZUCFgIUkgIWBBWPAhYHFI4CFQoUjAIV"
"DBSKAhUNFYgCFQ8UhwIVERSFAhUTFIMCFRQVgQIUFxSAAhQZFP4BFBoV/AEUHBT7ARQeFPkBFB8V"
"9wEUIRT2ARQjFPQBFSMV8gEVJRTxARUnFPABFCgV7gEUKhTtARQsFOwBFCwV7AEULBTsARUsFOwB"
@@ -6740,25 +6740,25 @@ static void test_fill_geometry(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_figure(ctx.surface, 0, 160, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(&ctx, 0, 160, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 160, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(&ctx, 160, 160, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 320, 160, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(&ctx, 320, 160, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 480, 160, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 480, 160, 160, 160, 0xff652e89, 0,
"qDJQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFCoMgAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 0, 320, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(&ctx, 0, 320, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 320, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(&ctx, 160, 320, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 320, 320, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(&ctx, 320, 320, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 480, 320, 160, 160, 0xff652e89, 8,
+ match = compare_figure(&ctx, 480, 320, 160, 160, 0xff652e89, 8,
"yjIMjwEWhwEcggEgfiR6KHYscy5xMG40azZpOGc6ZTxjPmI+YUBfQl1EXERbRlpGWUhYSFdKVkpV"
"TFRMVExTTlJOUk5STlJOUVBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUU5STlJOUk5STlNMVExUTFVK"
"VkpXSFhIWUZaRltEXERdQl9AYT5iPmM8ZTpnOGk2azRuMHEucyx2KHokfiCCARyHARaPAQzKMgAA");
@@ -6798,37 +6798,37 @@ static void test_fill_geometry(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_figure(ctx.surface, 0, 0, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 0, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(&ctx, 160, 0, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 320, 0, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(&ctx, 320, 0, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 480, 0, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 480, 0, 160, 160, 0xff652e89, 0,
"szI6YURZSlROUVBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUU5USllEYTqzMgAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 0, 160, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(&ctx, 0, 160, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 160, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(&ctx, 160, 160, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 320, 160, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(&ctx, 320, 160, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 480, 160, 160, 160, 0xff652e89, 2,
+ match = compare_figure(&ctx, 480, 160, 160, 160, 0xff652e89, 2,
"tjI0aDxhQlxGWEpVTFNOUk5RUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFFOUk5TTFVKWEZcQmA+ZzS2MgAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 0, 320, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(&ctx, 0, 320, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 320, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(&ctx, 160, 320, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 320, 320, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(&ctx, 320, 320, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 480, 320, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 480, 320, 160, 160, 0xff652e89, 0,
"sDJAWkxSUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFJMWkCwMgAA");
@@ -6868,37 +6868,37 @@ static void test_fill_geometry(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_figure(ctx.surface, 0, 0, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 0, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(&ctx, 160, 0, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 320, 0, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(&ctx, 320, 0, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 480, 0, 160, 160, 0xff652e89, 10,
+ match = compare_figure(&ctx, 480, 0, 160, 160, 0xff652e89, 10,
"yjIMjwEWhwEcggEgfiR6KHYscy5xMG40azZpOGc6ZTxjPmI+YUBfQl1EXERbRlpGWUhYSFdKVkpV"
"TFRMVExTTlJOUk5STlJOUVBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUU5STlJOUk5STlNMVExUTFVK"
"VkpXSFhIWUZaRltEXERdQl9AYT5iPmM8ZTpnOGk2azRuMHEucyx2KHokfiCCARyHARaPAQzKMgAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 0, 160, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(&ctx, 0, 160, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 160, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(&ctx, 160, 160, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 320, 160, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(&ctx, 320, 160, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 480, 160, 160, 160, 0xff652e89, 10,
+ match = compare_figure(&ctx, 480, 160, 160, 160, 0xff652e89, 10,
"uTIucDJsNmk4ZzplPGM+YUBgQF9CXkJdRFxEW0ZaRllIWEhXSlZKVkpWSlVMVExUTFRMU05STlJO"
"Uk5STlJOUk9QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFFPUU5STlJOUk5STlJOU0xU"
"TFRMVExVSlZKVkpWSldIWEhZRlpGW0RcRF1CXkJfQGBAYT5jPGU6ZzhpNmwycC65MgAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 0, 320, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(&ctx, 0, 320, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 320, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(&ctx, 160, 320, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 320, 320, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(&ctx, 320, 320, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 480, 320, 160, 160, 0xff652e89, 10,
+ match = compare_figure(&ctx, 480, 320, 160, 160, 0xff652e89, 10,
"vzIiczhhRldMUlBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUkxXRmA6cSS+MgAA");
@@ -6987,43 +6987,43 @@ static void test_fill_geometry(void)
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
ID2D1PathGeometry_Release(geometry);
- match = compare_figure(ctx.surface, 0, 0, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 0, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(&ctx, 160, 0, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 320, 0, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(&ctx, 320, 0, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 480, 0, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(&ctx, 480, 0, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 0, 160, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(&ctx, 0, 160, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 160, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(&ctx, 160, 160, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 320, 160, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(&ctx, 320, 160, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 480, 160, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(&ctx, 480, 160, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 0, 320, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 0, 320, 160, 160, 0xff652e89, 0,
"7zMCngECnQEEnAEEmwEGmgEGmQEImAEIlwEKlgEKlQEMlAEMkwEOkgEOkQEQkAEQjwESjgESjQEU"
"jAEUiwEWigEWiQEYiAEYhwEahgEahQEchAEcgwEeggEegQEggAEgfyJ+In0kfCR7JnomeSh4KHcq"
"dip1LHQscy5yLnEwcDBvMm4ybTRsNGs2ajZpOGg4ZzpmOmU8ZDxjPmI+YUBgQF9CXkJdRFxEW0Za"
"RllIWEhXSlZKVUxUTFNOUk5RUKgy");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 320, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 160, 320, 160, 160, 0xff652e89, 0,
"qDJQUU5STlNMVExVSlZKV0hYSFlGWkZbRFxEXUJeQl9AYEBhPmI+YzxkPGU6ZjpnOGg4aTZqNms0"
"bDRtMm4ybzBwMHEuci5zLHQsdSp2KncoeCh5JnomeyR8JH0ifiJ/IIABIIEBHoIBHoMBHIQBHIUB"
"GoYBGocBGIgBGIkBFooBFosBFIwBFI0BEo4BEo8BEJABEJEBDpIBDpMBDJQBDJUBCpYBCpcBCJgB"
"CJkBBpoBBpsBBJwBBJ0BAp4BAu8z");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 320, 320, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 320, 320, 160, 160, 0xff652e89, 0,
"7zMCngECnQEEnAEEmwEGmgEGmQEImAEIlwEKlgEKlQEMlAEMkwEOkgEOkQEQkAEQjwESjgESjQEU"
"jAEUiwEWigEWiQEYiAEYhwEahgEahQEchAEcgwEeggEegQEggAEgfyJ+In0kfCR7JnomeSh4KHcq"
"dip1LHQscy5yLnEwcDBvMm4ybTRsNGs2ajZpOGg4ZzpmOmU8ZDxjPmI+YUBgQF9CXkJdRFxEW0Za"
"RllIWEhXSlZKVUxUTFNOUk5RUKgy");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 480, 320, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 480, 320, 160, 160, 0xff652e89, 0,
"qDJQUU5STlNMVExVSlZKV0hYSFlGWkZbRFxEXUJeQl9AYEBhPmI+YzxkPGU6ZjpnOGg4aTZqNms0"
"bDRtMm4ybzBwMHEuci5zLHQsdSp2KncoeCh5JnomeyR8JH0ifiJ/IIABIIEBHoIBHoMBHIQBHIUB"
"GoYBGocBGIgBGIkBFooBFosBFIwBFI0BEo4BEo8BEJABEJEBDpIBDpMBDJQBDJUBCpYBCpcBCJgB"
@@ -7075,18 +7075,18 @@ static void test_fill_geometry(void)
ID2D1RectangleGeometry_Release(rect_geometry[1]);
ID2D1RectangleGeometry_Release(rect_geometry[0]);
- match = compare_figure(ctx.surface, 0, 0, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0,
"qDJQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFCoMgAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 0, 320, 160, 0xff652e89, 32,
+ match = compare_figure(&ctx, 160, 0, 320, 160, 0xff652e89, 32,
"sIMBA7cCDK8CFKYCHZ4CJJYCLY4CNYUCPv0BRvQBT+wBV+MBYNsBaNIBccoBecEBgQG6AYkBsQGS"
"AakBmgGgAaMBmAGrAY8BtAGHAbwBfsUBfcYBfcYBfcUBfsUBfcYBfcYBfcYBfcYBfcUBfr0BhgG0"
"AY8BrAGXAaMBoAGbAagBkgGwAYsBuAGCAcEBeskBcdIBadoBYOMBWOsBT/QBR/wBPoUCNowCLpUC"
"Jp0CHaYCFa4CDLcCBK+DAQAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 0, 160, 160, 320, 0xff652e89, 32,
+ match = compare_figure(&ctx, 0, 160, 160, 320, 0xff652e89, 32,
"+D0BngEDnQEDnAEEmwEGmgEGmQEHmAEJlwEJlgELlAEMkwENkwEOkQEPkAEQkAERjgESjQETjQEU"
"iwEVigEXiQEXiAEYhwEahgEahQEbhAEdggEeggEegQEgfyF/In0jfCR8JXomeSd5KHcpdip2K3Qs"
"cy5xL3EvcDFuMm4ybTRrNWs1ajdoOGg5ZjplO2U8Yz1iPmFAYEBfQV5DXUNcRVpGWkZZSFdJV0lW"
@@ -7097,7 +7097,7 @@ static void test_fill_geometry(void)
"KXgneSZ6JXwkfCN9In8hfyCBAR6CAR6CAR2EARuFARuFARqHARiIAReJAReKARWLARSNARONARKO"
"ARGQARCQAQ+RAQ6TAQ2TAQyUAQuWAQqWAQmYAQeZAQaaAQabAQScAQOdAQOeAQH4PQAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 160, 320, 320, 0xff652e89, 32,
+ match = compare_figure(&ctx, 160, 160, 320, 320, 0xff652e89, 32,
"sXkBvgIDvAIEugIHuAIJtgILswINsgIPrwISrQITrAIVqQIYpwIapQIbowIeoQIgngIjnAIkmwIm"
"mAIplgIqlQIskgIvkAIxjQIzjAI1igI3hwI5hgI7hAI9gQJA/wFB/QFE+wFG+QFI9gFK9QFM8wFO"
"8AFQ7wFS7AFV6gFX6AFY5gFb5AFd4gFf3wFh3gFj2wFm2QFn2AFp1QFs0wFu0QFvzwFyzQF0ygF3"
@@ -7225,70 +7225,70 @@ static void test_fill_geometry(void)
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
ID2D1PathGeometry_Release(geometry);
- match = compare_figure(ctx.surface, 0, 0, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0,
"qDJQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFCoMgAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 0, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 160, 0, 160, 160, 0xff652e89, 0,
"qDJQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFCoMgAA");
- match = compare_figure(ctx.surface, 320, 0, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 320, 0, 160, 160, 0xff652e89, 0,
"qDJQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFCoMgAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 480, 0, 160, 160, 0xff652e89, 0,
+ match = compare_figure(&ctx, 480, 0, 160, 160, 0xff652e89, 0,
"qDJQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFCoMgAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 0, 160, 160, 160, 0xff652e89, 16,
+ match = compare_figure(&ctx, 0, 160, 160, 160, 0xff652e89, 16,
"qDICTAJQB0IHUQs4C1IRLBFSGxgbUk5STlNMVExUTFRMVExVSlZKVkpWSlZKVkpXSFhIWEhYSFhI"
"WEhYSFhIWEhYSFlGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZa"
"RllIWEhYSFhIWEhYSFhIWEhYSFhIV0pWSlZKVkpWSlZKVUxUTFRMVExUTFNOUk5SGxgbUhEsEVIL"
"OAtRB0IHUAJMAqgy");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 160, 160, 160, 0xff652e89, 16,
+ match = compare_figure(&ctx, 160, 160, 160, 160, 0xff652e89, 16,
"qDIBSwRQAkMKUQQ5EVIIKxtTDRkmVExUTFRMVEtVS1VLVkpWSlZKVklXSVdJV0lXSVhIWEhYSFhI"
"WEhYSFhIWEhYSFhIWUdZR1lHWUdZR1lHWUdZR1lHWUdZSFhIWUdZR1lHWUdZR1lHWUdZR1lHWUdZ"
"SFhIWEhYSFhIWEhYSFhIWEhYSFhJV0lXSVdJV0lWSlZKVkpWS1VLVUtUTFRMVExUJhkNUxsrCFIR"
"OQRRCkMCUARLAagy");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 320, 160, 160, 160, 0xff652e89, 16,
+ match = compare_figure(&ctx, 320, 160, 160, 160, 0xff652e89, 16,
"qDIESwFRCkMCUhE5BFIbKwhTJhkNVExUTFRMVUtVS1VLVUpWSlZKV0lXSVdJV0lXSVdIWEhYSFhI"
"WEhYSFhIWEhYSFhIWEdZR1lHWUdZR1lHWUdZR1lHWUdYSFhIWEdZR1lHWUdZR1lHWUdZR1lHWUdY"
"SFhIWEhYSFhIWEhYSFhIWEhYSFdJV0lXSVdJV0lXSlZKVkpVS1VLVUtVTFRMVExUDRkmUwgrG1IE"
"ORFSAkMKUQFLBKgy");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 480, 160, 160, 160, 0xff652e89, 16,
+ match = compare_figure(&ctx, 480, 160, 160, 160, 0xff652e89, 16,
"qDICTAJQB0IHUQs4C1IRLBFSGxgbUk5STlNMVExUTFRMVExVSlZKVkpWSlZKVkpXSFhIWEhYSFhI"
"WEhYSFhIWEhYSFlGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZa"
"RllIWEhYSFhIWEhYSFhIWEhYSFhIV0pWSlZKVkpWSlZKVUxUTFRMVExUTFNOUk5SGxgbUhEsEVIL"
"OAtRB0IHUAJMAqgy");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 0, 320, 160, 160, 0xff652e89, 16,
+ match = compare_figure(&ctx, 0, 320, 160, 160, 0xff652e89, 16,
"pCwYfixuOGNCWUxSUFBQT1JOUk5STlJOUk1UTFRMVExUTFRLVkpWSlZKVkpWSlZJWEhYSFhIWEhY"
"SFhIWEhYSFhIWEdaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpG"
"WkdYSFhIWEhYSFhIWEhYSFhIWEhYSVZKVkpWSlZKVkpWS1RMVExUTFRMVE1STlJOUk5STlJPUFBQ"
"UkxZQmM4bix+GKQs");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 320, 160, 160, 0xff652e89, 16,
+ match = compare_figure(&ctx, 160, 320, 160, 160, 0xff652e89, 16,
"liwZgQErcTllQ1xLVFBQUU9STlJNVExUTFRMVExVS1VLVUpWSlZKVkpXSVdJV0lXSVdIWEhYSFhI"
"WEhYSFhIWEhYSFhIWEdZR1lHWUdZR1lHWUdZR1lHWUdZR1hIWEdZR1lHWUdZR1lHWUdZR1lHWUdZ"
"R1hIWEhYSFhIWEhYSFhIWEhYSFhIV0lXSVdJV0lXSlZKVkpWSlVLVUtVTFRMVExUTFRNUk5ST1FQ"
"UFRLXENlOXErgQEZliwA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 320, 320, 160, 160, 0xff652e89, 16,
+ match = compare_figure(&ctx, 320, 320, 160, 160, 0xff652e89, 16,
"sSwZeytrOV9DVktRUE9RTlJOUk1UTFRMVExUS1VLVUtVS1ZKVkpWSVdJV0lXSVdJV0lYSFhIWEhY"
"SFhIWEhYSFhIWEhYSFlHWUdZR1lHWUdZR1lHWUdZR1lIWEhYSFlHWUdZR1lHWUdZR1lHWUdZR1lI"
"WEhYSFhIWEhYSFhIWEhYSFhIWElXSVdJV0lXSVdJVkpWSlZLVUtVS1VLVExUTFRMVE1STlJOUU9Q"
"UUtWQ185ayt7GbEs");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 480, 320, 160, 160, 0xff652e89, 16,
+ match = compare_figure(&ctx, 480, 320, 160, 160, 0xff652e89, 16,
"pCwYfixuOGNCWUxSUFBQT1JOUk5STlJOUk1UTFRMVExUTFRLVkpWSlZKVkpWSlZJWEhYSFhIWEhY"
"SFhIWEhYSFhIWEdaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpG"
"WkdYSFhIWEhYSFhIWEhYSFhIWEhYSVZKVkpWSlZKVkpWS1RMVExUTFRMVE1STlJOUk5STlJPUFBQ"
@@ -7364,19 +7364,19 @@ static void test_fill_geometry(void)
ID2D1TransformedGeometry_Release(transformed_geometry[1]);
ID2D1TransformedGeometry_Release(transformed_geometry[0]);
- match = compare_figure(ctx.surface, 0, 0, 160, 160, 0xff652e89, 32,
+ match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 32,
"6DMNjgEWiAEahgEahgEahgEahgEahgEahgEahgEahgEahgEahgEahwEZhwEZhwEZhwEZhwEZhwEZ"
"hwEZhwEZhwEZiAEYiAEYiAEYiAEYiAEXiQEXiQEXiQEXigEWigEWigEWigEWigEWigEWigEWiwEU"
"jAEUjAEUjAEUjQESjgESjwEQkAEQkQEOkgENlAEMlQEKlgEKlwEImAEImQEHmQEGmwEFmwEEnQED"
"nQECngECngECnwEBnwEBnwEBnwEBnwEBnwECnQEDnQEDnQEEmwEFmgEHmQEHlwELkQERjAEXhgEd"
"hAEfgwEchgEXjwEMqTEA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 0, 320, 160, 0xff652e89, 32,
+ match = compare_figure(&ctx, 160, 0, 320, 160, 0xff652e89, 32,
"h58BBrYCDq0CF6QCIJwCKJMCMIwCNoUCPf8BQ/kBSPQBTu4BTe8BTPEBSfUBRvgBQf0BPYECOYUC"
"NIoCMI4CK+UBAS0W/AEHIwiPAgsaBZcCEAwIngIepAIaqAIWrAITsAIRsgIPtQIMtwILugIHwAIB"
"ypwB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 0, 160, 160, 320, 0xff652e89, 32,
+ match = compare_figure(&ctx, 0, 160, 160, 320, 0xff652e89, 32,
"wW4DnAEEmwEFmgEHmAEIlwEKlQELlAEMkwEOkQEPkAEQkAERjgESjgETjAEUjAEUiwEWigEWiQEX"
"iQEYhwEZhwEZhgEbhQEbhAEchAEdggEeggEeggEfgAEggAEggAEhgAEggAEggQEggAEggAEggQEg"
"gAEggQEfgQEfggEfgQEfgQEfggEfgQEfggEeggEfggEeggEegwEdgwEeggEegwEdgwEegwEdgwEd"
@@ -7387,7 +7387,7 @@ static void test_fill_geometry(void)
"AQ6SAQ2TAQ2SAQ2TAQ2TAQyTAQyUAQyUAQuUAQuVAQuUAQuVAQqWAQmWAQqWAQmXAQiXAQiYAQeY"
"AQeZAQWbAQSDZwAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 160, 320, 320, 0xff652e89, 32,
+ match = compare_figure(&ctx, 160, 160, 320, 320, 0xff652e89, 32,
"g90BBLkCCLYCC7ICDrACEa0CFKoCF6cCGqQCHKMCHqECIJ8CIpwCJJsCJpkCKJcCKZYCK5QCLZIC"
"L5ACMI8CMo0CNIsCNYoCN4gCOYcCOYYCO4QCPYICPoECQIACQYACQIECQIACQIECQIECQIECP4IC"
"P4ICP4ECP4ICP4ICPoMCPoMCPoMCPYQCPYMCPYQCPYQCPYQCPIUCPIUCPIUCO4YCO4YCOoYCO4YC"
@@ -7468,13 +7468,13 @@ static void test_fill_geometry(void)
ID2D1TransformedGeometry_Release(transformed_geometry[1]);
ID2D1TransformedGeometry_Release(transformed_geometry[0]);
- match = compare_figure(ctx.surface, 0, 0, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 0, 320, 160, 0xff652e89, 0, "gJAD");
+ match = compare_figure(&ctx, 160, 0, 320, 160, 0xff652e89, 0, "gJAD");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 0, 160, 160, 320, 0xff652e89, 0, "gJAD");
+ match = compare_figure(&ctx, 0, 160, 160, 320, 0xff652e89, 0, "gJAD");
ok(match, "Figure does not match.\n");
- match = compare_figure(ctx.surface, 160, 160, 320, 320, 0xff652e89, 0, "gKAG");
+ match = compare_figure(&ctx, 160, 160, 320, 320, 0xff652e89, 0, "gKAG");
ok(match, "Figure does not match.\n");
ID2D1SolidColorBrush_Release(brush);
@@ -7713,7 +7713,7 @@ static void test_bezier_intersect(void)
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
ID2D1PathGeometry_Release(geometry);
- match = compare_figure(ctx.surface, 160, 120, 320, 240, 0xff652e89, 2048,
+ match = compare_figure(&ctx, 160, 120, 320, 240, 0xff652e89, 2048,
"aRQjIxRpYiIcHCJiXSwXFyxdWTQTEzRZVTsQEDtVUkIMDEJST0cKCkdPTUsICEtNSlEFBVFKSFUD"
"A1VIRlkBAVlGRFsBAVtEQlwCAlxCQFwEBFxAPl0FBV0+PF0HB108Ol4ICF46OV0KCl05N14LC143"
"Nl4MDF42NF8NDV80M14PD14zMV8QEF8xMF8REV8wL18SEl8vLWATE2AtLGAUFGAsK2EUFGErKWIV"
@@ -7763,7 +7763,7 @@ static void test_bezier_intersect(void)
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
ID2D1PathGeometry_Release(geometry);
- match = compare_figure(ctx.surface, 160, 120, 320, 240, 0xff652e89, 2048,
+ match = compare_figure(&ctx, 160, 120, 320, 240, 0xff652e89, 2048,
"pQIZkgIrhAI5/QE/9gFH7wFO6wFS5wFW4gFb3gFf2wFi2AFl1gFn1AFp0gFszwFuzQFxywFyyQF1"
"xwF2xgF4xAF5xAF6wgF8wAF+vwF+vwF/vQGBAbwBggG7AYMBugGEAbkBhQG4AYYBtwGHAbcBiAG1"
"AYkBtAGKAbQBigGzAYsBswGMAbEBjQGxAY0BsQGOAa8BjwGvAZABrgGQAa4BkQGtAZEBrQGSAawB"
--
2.20.1
2
1
[PATCH 08/12] d2d1/tests: Pass a d2d1_test_context structure to compare_surface().
by Henri Verbeet Jan. 15, 2021
by Henri Verbeet Jan. 15, 2021
Jan. 15, 2021
From: Rémi Bernon <rbernon(a)codeweavers.com>
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
dlls/d2d1/tests/d2d1.c | 52 +++++++++++++++++++++---------------------
1 file changed, 26 insertions(+), 26 deletions(-)
diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c
index a1869dcaaaa..01abc314504 100644
--- a/dlls/d2d1/tests/d2d1.c
+++ b/dlls/d2d1/tests/d2d1.c
@@ -461,12 +461,12 @@ static BOOL compare_sha1(void *data, unsigned int pitch, unsigned int bpp,
return !strcmp(ref_sha1, (char *)sha1);
}
-static BOOL compare_surface(IDXGISurface *surface, const char *ref_sha1)
+static BOOL compare_surface(struct d2d1_test_context *ctx, const char *ref_sha1)
{
struct resource_readback rb;
BOOL ret;
- get_surface_readback(surface, &rb);
+ get_surface_readback(ctx->surface, &rb);
ret = compare_sha1(rb.data, rb.pitch, 4, rb.width, rb.height, ref_sha1);
release_resource_readback(&rb);
@@ -1260,7 +1260,7 @@ static void test_clip(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(ctx.surface, "035a44d4198d6e422e9de6185b5b2c2bac5e33c9");
+ match = compare_surface(&ctx, "035a44d4198d6e422e9de6185b5b2c2bac5e33c9");
ok(match, "Surface does not match.\n");
/* Fractional clip rectangle coordinates, aliased mode. */
@@ -1326,7 +1326,7 @@ static void test_clip(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(ctx.surface, "cb418ec4a7c8407b5e36db06fc6292a06bb8476c");
+ match = compare_surface(&ctx, "cb418ec4a7c8407b5e36db06fc6292a06bb8476c");
ok(match, "Surface does not match.\n");
release_test_context(&ctx);
@@ -1670,7 +1670,7 @@ static void test_color_brush(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(ctx.surface, "6d1218fca5e21fb7e287b3a439d60dbc251f5ceb");
+ match = compare_surface(&ctx, "6d1218fca5e21fb7e287b3a439d60dbc251f5ceb");
ok(match, "Surface does not match.\n");
ID2D1SolidColorBrush_Release(brush);
@@ -1809,7 +1809,7 @@ static void test_bitmap_brush(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(ctx.surface, "95675fbc4a16404c9568d41b14e8f6be64240998");
+ match = compare_surface(&ctx, "95675fbc4a16404c9568d41b14e8f6be64240998");
ok(match, "Surface does not match.\n");
ID2D1RenderTarget_BeginDraw(rt);
@@ -1821,7 +1821,7 @@ static void test_bitmap_brush(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(ctx.surface, "95675fbc4a16404c9568d41b14e8f6be64240998");
+ match = compare_surface(&ctx, "95675fbc4a16404c9568d41b14e8f6be64240998");
ok(match, "Surface does not match.\n");
ID2D1RenderTarget_SetTransform(rt, &tmp_matrix);
@@ -1910,7 +1910,7 @@ static void test_bitmap_brush(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(ctx.surface, "f5d039c280fa33ba05496c9883192a34108efbbe");
+ match = compare_surface(&ctx, "f5d039c280fa33ba05496c9883192a34108efbbe");
ok(match, "Surface does not match.\n");
/* Invalid interpolation mode. */
@@ -1928,7 +1928,7 @@ static void test_bitmap_brush(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
- match = compare_surface(ctx.surface, "f5d039c280fa33ba05496c9883192a34108efbbe");
+ match = compare_surface(&ctx, "f5d039c280fa33ba05496c9883192a34108efbbe");
ok(match, "Surface does not match.\n");
ID2D1RenderTarget_BeginDraw(rt);
@@ -1940,7 +1940,7 @@ static void test_bitmap_brush(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(ctx.surface, "59043096393570ad800dbcbfdd644394b79493bd");
+ match = compare_surface(&ctx, "59043096393570ad800dbcbfdd644394b79493bd");
ok(match, "Surface does not match.\n");
ID2D1RenderTarget_BeginDraw(rt);
@@ -1969,7 +1969,7 @@ static void test_bitmap_brush(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(ctx.surface, "b4b775afecdae2d26642001f4faff73663bb8b31");
+ match = compare_surface(&ctx, "b4b775afecdae2d26642001f4faff73663bb8b31");
ok(match, "Surface does not match.\n");
ID2D1Bitmap_Release(bitmap);
@@ -2018,7 +2018,7 @@ static void test_bitmap_brush(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(ctx.surface, "cf7b90ba7b139fdfbe9347e1907d635cfb4ed197");
+ match = compare_surface(&ctx, "cf7b90ba7b139fdfbe9347e1907d635cfb4ed197");
ok(match, "Surface does not match.\n");
if (SUCCEEDED(ID2D1BitmapBrush_QueryInterface(brush, &IID_ID2D1BitmapBrush1, (void **)&brush1)))
@@ -3296,7 +3296,7 @@ static void test_path_geometry(void)
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(ctx.surface, "3aace1b22aae111cb577614fed16e4eb1650dba5");
+ match = compare_surface(&ctx, "3aace1b22aae111cb577614fed16e4eb1650dba5");
ok(match, "Surface does not match.\n");
/* Edge test. */
@@ -3377,7 +3377,7 @@ static void test_path_geometry(void)
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(ctx.surface, "bfb40a1f007694fa07dbd3b854f3f5d9c3e1d76b");
+ match = compare_surface(&ctx, "bfb40a1f007694fa07dbd3b854f3f5d9c3e1d76b");
ok(match, "Surface does not match.\n");
ID2D1TransformedGeometry_Release(transformed_geometry);
ID2D1PathGeometry_Release(geometry);
@@ -3600,7 +3600,7 @@ static void test_path_geometry(void)
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(ctx.surface, "a875e68e0cb9c055927b1b50b879f90b24e38470");
+ match = compare_surface(&ctx, "a875e68e0cb9c055927b1b50b879f90b24e38470");
ok(match, "Surface does not match.\n");
ID2D1PathGeometry_Release(geometry);
@@ -4076,7 +4076,7 @@ static void test_alpha_mode(void)
ID2D1RenderTarget_Clear(rt, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(ctx.surface, "48c41aff3a130a17ee210866b2ab7d36763934d5");
+ match = compare_surface(&ctx, "48c41aff3a130a17ee210866b2ab7d36763934d5");
ok(match, "Surface does not match.\n");
ID2D1RenderTarget_BeginDraw(rt);
@@ -4084,7 +4084,7 @@ static void test_alpha_mode(void)
ID2D1RenderTarget_Clear(rt, &color);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(ctx.surface, "6487e683730fb5a77c1911388d00b04664c5c4e4");
+ match = compare_surface(&ctx, "6487e683730fb5a77c1911388d00b04664c5c4e4");
ok(match, "Surface does not match.\n");
ID2D1RenderTarget_BeginDraw(rt);
@@ -4092,7 +4092,7 @@ static void test_alpha_mode(void)
ID2D1RenderTarget_Clear(rt, &color);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(ctx.surface, "7a35ba09e43cbaf591388ff1ef8de56157630c98");
+ match = compare_surface(&ctx, "7a35ba09e43cbaf591388ff1ef8de56157630c98");
ok(match, "Surface does not match.\n");
ID2D1RenderTarget_BeginDraw(rt);
@@ -4133,7 +4133,7 @@ static void test_alpha_mode(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(ctx.surface, "14f8ac64b70966c7c3c6281c59aaecdb17c3b16a");
+ match = compare_surface(&ctx, "14f8ac64b70966c7c3c6281c59aaecdb17c3b16a");
ok(match, "Surface does not match.\n");
rt_desc.type = D2D1_RENDER_TARGET_TYPE_DEFAULT;
@@ -4170,7 +4170,7 @@ static void test_alpha_mode(void)
ID2D1RenderTarget_Clear(rt, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(ctx.surface, "b44510bf2d2e61a8d7c0ad862de49a471f1fd13f");
+ match = compare_surface(&ctx, "b44510bf2d2e61a8d7c0ad862de49a471f1fd13f");
ok(match, "Surface does not match.\n");
ID2D1RenderTarget_BeginDraw(rt);
@@ -4178,7 +4178,7 @@ static void test_alpha_mode(void)
ID2D1RenderTarget_Clear(rt, &color);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(ctx.surface, "2184f4a9198fc1de09ac85301b7a03eebadd9b81");
+ match = compare_surface(&ctx, "2184f4a9198fc1de09ac85301b7a03eebadd9b81");
ok(match, "Surface does not match.\n");
ID2D1RenderTarget_BeginDraw(rt);
@@ -4186,7 +4186,7 @@ static void test_alpha_mode(void)
ID2D1RenderTarget_Clear(rt, &color);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(ctx.surface, "6527ec83b4039c895b50f9b3e144fe0cf90d1889");
+ match = compare_surface(&ctx, "6527ec83b4039c895b50f9b3e144fe0cf90d1889");
ok(match, "Surface does not match.\n");
ID2D1RenderTarget_BeginDraw(rt);
@@ -4227,7 +4227,7 @@ static void test_alpha_mode(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(ctx.surface, "465f5a3190d7bde408b3206b4be939fb22f8a3d6");
+ match = compare_surface(&ctx, "465f5a3190d7bde408b3206b4be939fb22f8a3d6");
ok(match, "Surface does not match.\n");
refcount = ID2D1Bitmap_Release(bitmap);
@@ -4566,7 +4566,7 @@ static void test_bitmap_updates(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(ctx.surface, "cb8136c91fbbdc76bb83b8c09edc1907b0a5d0a6");
+ match = compare_surface(&ctx, "cb8136c91fbbdc76bb83b8c09edc1907b0a5d0a6");
ok(match, "Surface does not match.\n");
ID2D1Bitmap_Release(bitmap);
@@ -4687,7 +4687,7 @@ static void test_opacity_brush(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(hr == D2DERR_INCOMPATIBLE_BRUSH_TYPES, "Got unexpected hr %#x.\n", hr);
- match = compare_surface(ctx.surface, "7141c6c7b3decb91196428efb1856bcbf9872935");
+ match = compare_surface(&ctx, "7141c6c7b3decb91196428efb1856bcbf9872935");
ok(match, "Surface does not match.\n");
ID2D1RenderTarget_BeginDraw(rt);
@@ -4729,7 +4729,7 @@ static void test_opacity_brush(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(ctx.surface, "c3a5802d1750efa3e9122c1a92f6064df3872732");
+ match = compare_surface(&ctx, "c3a5802d1750efa3e9122c1a92f6064df3872732");
ok(match, "Surface does not match.\n");
ID2D1BitmapBrush_Release(bitmap_brush);
--
2.20.1
2
1
[PATCH 07/12] d2d1/tests: Store the resource data pointer and row-pitch directly in struct resource_readback.
by Henri Verbeet Jan. 15, 2021
by Henri Verbeet Jan. 15, 2021
Jan. 15, 2021
From: Rémi Bernon <rbernon(a)codeweavers.com>
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
dlls/d2d1/tests/d2d1.c | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c
index c8c0e83df1c..a1869dcaaaa 100644
--- a/dlls/d2d1/tests/d2d1.c
+++ b/dlls/d2d1/tests/d2d1.c
@@ -54,8 +54,8 @@ struct d2d1_test_context
struct resource_readback
{
ID3D10Resource *resource;
- D3D10_MAPPED_TEXTURE2D map_desc;
- unsigned int width, height;
+ unsigned int pitch, width, height;
+ void *data;
};
struct figure
@@ -314,6 +314,7 @@ static void cubic_to(ID2D1GeometrySink *sink, float x1, float y1, float x2, floa
static void get_surface_readback(IDXGISurface *surface, struct resource_readback *rb)
{
D3D10_TEXTURE2D_DESC texture_desc;
+ D3D10_MAPPED_TEXTURE2D map_desc;
DXGI_SURFACE_DESC surface_desc;
ID3D10Resource *src_resource;
ID3D10Device *device;
@@ -346,8 +347,11 @@ static void get_surface_readback(IDXGISurface *surface, struct resource_readback
ID3D10Resource_Release(src_resource);
ID3D10Device_Release(device);
- hr = ID3D10Texture2D_Map((ID3D10Texture2D *)rb->resource, 0, D3D10_MAP_READ, 0, &rb->map_desc);
+ hr = ID3D10Texture2D_Map((ID3D10Texture2D *)rb->resource, 0, D3D10_MAP_READ, 0, &map_desc);
ok(SUCCEEDED(hr), "Failed to map texture, hr %#x.\n", hr);
+
+ rb->pitch = map_desc.RowPitch;
+ rb->data = map_desc.pData;
}
static void release_resource_readback(struct resource_readback *rb)
@@ -358,7 +362,7 @@ static void release_resource_readback(struct resource_readback *rb)
static DWORD get_readback_colour(struct resource_readback *rb, unsigned int x, unsigned int y)
{
- return ((DWORD *)((BYTE *)rb->map_desc.pData + y * rb->map_desc.RowPitch))[x];
+ return ((DWORD *)((BYTE *)rb->data + y * rb->pitch))[x];
}
static BOOL compare_uint(unsigned int x, unsigned int y, unsigned int max_diff)
@@ -463,8 +467,7 @@ static BOOL compare_surface(IDXGISurface *surface, const char *ref_sha1)
BOOL ret;
get_surface_readback(surface, &rb);
- ret = compare_sha1(rb.map_desc.pData, rb.map_desc.RowPitch, 4,
- rb.width, rb.height, ref_sha1);
+ ret = compare_sha1(rb.data, rb.pitch, 4, rb.width, rb.height, ref_sha1);
release_resource_readback(&rb);
return ret;
@@ -641,7 +644,7 @@ static BOOL compare_figure(IDXGISurface *surface, unsigned int x, unsigned int y
figure.spans_size = 64;
figure.spans = HeapAlloc(GetProcessHeap(), 0, figure.spans_size * sizeof(*figure.spans));
- read_figure(&figure, rb.map_desc.pData, rb.map_desc.RowPitch, x, y, w, h, prev);
+ read_figure(&figure, rb.data, rb.pitch, x, y, w, h, prev);
deserialize_figure(&ref_figure, (BYTE *)ref);
span = w * h;
@@ -679,7 +682,7 @@ static BOOL compare_figure(IDXGISurface *surface, unsigned int x, unsigned int y
if (diff > max_diff)
{
trace("diff %u > max_diff %u.\n", diff, max_diff);
- read_figure(&figure, rb.map_desc.pData, rb.map_desc.RowPitch, x, y, w, h, prev);
+ read_figure(&figure, rb.data, rb.pitch, x, y, w, h, prev);
serialize_figure(&figure);
}
--
2.20.1
2
1
[PATCH 06/12] d2d1/tests: Create a Direct2D render target in init_test_context_().
by Henri Verbeet Jan. 15, 2021
by Henri Verbeet Jan. 15, 2021
Jan. 15, 2021
From: Rémi Bernon <rbernon(a)codeweavers.com>
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
v3:
- Creating the render target is not supposed to fail.
- Add proper line information for ok calls.
- Get rid of superfluous render target reference counting.
dlls/d2d1/tests/d2d1.c | 131 +++++++++++++----------------------------
1 file changed, 40 insertions(+), 91 deletions(-)
diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c
index 3fa3b1a9acd..c8c0e83df1c 100644
--- a/dlls/d2d1/tests/d2d1.c
+++ b/dlls/d2d1/tests/d2d1.c
@@ -48,6 +48,7 @@ struct d2d1_test_context
HWND window;
IDXGISwapChain *swapchain;
IDXGISurface *surface;
+ ID2D1RenderTarget *rt;
};
struct resource_readback
@@ -790,6 +791,14 @@ static ID2D1RenderTarget *create_render_target(IDXGISurface *surface)
#define release_test_context(ctx) release_test_context_(__LINE__, ctx)
static void release_test_context_(unsigned int line, struct d2d1_test_context *ctx)
{
+ ID2D1Factory *factory;
+ ULONG ref;
+
+ ID2D1RenderTarget_GetFactory(ctx->rt, &factory);
+ ID2D1RenderTarget_Release(ctx->rt);
+ ref = ID2D1Factory_Release(factory);
+ ok_(__FILE__, line)(!ref, "Factory has %u references left.\n", ref);
+
IDXGISurface_Release(ctx->surface);
IDXGISwapChain_Release(ctx->swapchain);
DestroyWindow(ctx->window);
@@ -816,6 +825,9 @@ static BOOL init_test_context_(unsigned int line, struct d2d1_test_context *ctx)
hr = IDXGISwapChain_GetBuffer(ctx->swapchain, 0, &IID_IDXGISurface, (void **)&ctx->surface);
ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
+ ctx->rt = create_render_target(ctx->surface);
+ ok_(__FILE__, line)(!!ctx->rt, "Failed to create render target.\n");
+
return TRUE;
}
@@ -1148,9 +1160,7 @@ static void test_clip(void)
if (!init_test_context(&ctx))
return;
- rt = create_render_target(ctx.surface);
- ok(!!rt, "Failed to create render target.\n");
-
+ rt = ctx.rt;
ID2D1RenderTarget_GetDpi(rt, &dpi_x, &dpi_y);
ok(dpi_x == 96.0f, "Got unexpected dpi_x %.8e.\n", dpi_x);
ok(dpi_y == 96.0f, "Got unexpected dpi_x %.8e.\n", dpi_y);
@@ -1316,7 +1326,6 @@ static void test_clip(void)
match = compare_surface(ctx.surface, "cb418ec4a7c8407b5e36db06fc6292a06bb8476c");
ok(match, "Surface does not match.\n");
- ID2D1RenderTarget_Release(rt);
release_test_context(&ctx);
}
@@ -1354,8 +1363,7 @@ static void test_state_block(void)
if (!init_test_context(&ctx))
return;
- rt = create_render_target(ctx.surface);
- ok(!!rt, "Failed to create render target.\n");
+ rt = ctx.rt;
ID2D1RenderTarget_GetFactory(rt, &factory);
hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, &IID_IDWriteFactory, (IUnknown **)&dwrite_factory);
ok(SUCCEEDED(hr), "Failed to create dwrite factory, hr %#x.\n", hr);
@@ -1578,7 +1586,6 @@ static void test_state_block(void)
refcount = IDWriteRenderingParams_Release(text_rendering_params1);
ok(!refcount, "Rendering params %u references left.\n", refcount);
ID2D1Factory_Release(factory);
- ID2D1RenderTarget_Release(rt);
release_test_context(&ctx);
}
@@ -1598,9 +1605,7 @@ static void test_color_brush(void)
if (!init_test_context(&ctx))
return;
- rt = create_render_target(ctx.surface);
- ok(!!rt, "Failed to create render target.\n");
-
+ rt = ctx.rt;
ID2D1RenderTarget_SetDpi(rt, 192.0f, 48.0f);
ID2D1RenderTarget_SetAntialiasMode(rt, D2D1_ANTIALIAS_MODE_ALIASED);
@@ -1666,7 +1671,6 @@ static void test_color_brush(void)
ok(match, "Surface does not match.\n");
ID2D1SolidColorBrush_Release(brush);
- ID2D1RenderTarget_Release(rt);
release_test_context(&ctx);
}
@@ -1726,9 +1730,7 @@ static void test_bitmap_brush(void)
if (!init_test_context(&ctx))
return;
- rt = create_render_target(ctx.surface);
- ok(!!rt, "Failed to create render target.\n");
-
+ rt = ctx.rt;
ID2D1RenderTarget_SetDpi(rt, 192.0f, 48.0f);
ID2D1RenderTarget_SetAntialiasMode(rt, D2D1_ANTIALIAS_MODE_ALIASED);
@@ -1821,6 +1823,7 @@ static void test_bitmap_brush(void)
ID2D1RenderTarget_SetTransform(rt, &tmp_matrix);
ID2D1DeviceContext_Release(context);
+ ID2D1Image_Release(image);
}
/* Creating a brush with a NULL bitmap crashes on Vista, but works fine on
@@ -2061,7 +2064,6 @@ static void test_bitmap_brush(void)
ID2D1BitmapBrush_Release(brush);
refcount = ID2D1Bitmap_Release(bitmap);
ok(!refcount, "Bitmap has %u references left.\n", refcount);
- ID2D1RenderTarget_Release(rt);
release_test_context(&ctx);
}
@@ -2125,9 +2127,7 @@ static void test_linear_brush(void)
if (!init_test_context(&ctx))
return;
- rt = create_render_target(ctx.surface);
- ok(!!rt, "Failed to create render target.\n");
-
+ rt = ctx.rt;
ID2D1RenderTarget_SetDpi(rt, 192.0f, 48.0f);
ID2D1RenderTarget_SetAntialiasMode(rt, D2D1_ANTIALIAS_MODE_ALIASED);
@@ -2255,7 +2255,6 @@ static void test_linear_brush(void)
ID2D1LinearGradientBrush_Release(brush);
refcount = ID2D1GradientStopCollection_Release(gradient);
ok(!refcount, "Gradient has %u references left.\n", refcount);
- ID2D1RenderTarget_Release(rt);
release_test_context(&ctx);
}
@@ -2319,9 +2318,7 @@ static void test_radial_brush(void)
if (!init_test_context(&ctx))
return;
- rt = create_render_target(ctx.surface);
- ok(!!rt, "Failed to create render target.\n");
-
+ rt = ctx.rt;
ID2D1RenderTarget_SetDpi(rt, 192.0f, 48.0f);
ID2D1RenderTarget_SetAntialiasMode(rt, D2D1_ANTIALIAS_MODE_ALIASED);
@@ -2457,7 +2454,6 @@ static void test_radial_brush(void)
ID2D1RadialGradientBrush_Release(brush);
refcount = ID2D1GradientStopCollection_Release(gradient);
ok(!refcount, "Gradient has %u references left.\n", refcount);
- ID2D1RenderTarget_Release(rt);
release_test_context(&ctx);
}
@@ -2592,7 +2588,6 @@ static void test_path_geometry(void)
BOOL match, contains;
D2D1_COLOR_F color;
D2D1_RECT_F rect;
- ULONG refcount;
UINT32 count;
HRESULT hr;
@@ -2913,8 +2908,7 @@ static void test_path_geometry(void)
if (!init_test_context(&ctx))
return;
- rt = create_render_target(ctx.surface);
- ok(!!rt, "Failed to create render target.\n");
+ rt = ctx.rt;
ID2D1RenderTarget_GetFactory(rt, &factory);
ID2D1RenderTarget_SetDpi(rt, 192.0f, 48.0f);
@@ -3633,9 +3627,7 @@ static void test_path_geometry(void)
ID2D1PathGeometry_Release(geometry);
ID2D1SolidColorBrush_Release(brush);
- ID2D1RenderTarget_Release(rt);
- refcount = ID2D1Factory_Release(factory);
- ok(!refcount, "Factory has %u references left.\n", refcount);
+ ID2D1Factory_Release(factory);
release_test_context(&ctx);
}
@@ -4002,9 +3994,7 @@ static void test_bitmap_formats(void)
if (!init_test_context(&ctx))
return;
- rt = create_render_target(ctx.surface);
- ok(!!rt, "Failed to create render target.\n");
-
+ rt = ctx.rt;
bitmap_desc.dpiX = 96.0f;
bitmap_desc.dpiY = 96.0f;
for (i = 0; i < ARRAY_SIZE(bitmap_formats); ++i)
@@ -4028,7 +4018,6 @@ static void test_bitmap_formats(void)
}
}
- ID2D1RenderTarget_Release(rt);
release_test_context(&ctx);
}
@@ -4059,9 +4048,7 @@ static void test_alpha_mode(void)
if (!init_test_context(&ctx))
return;
- rt = create_render_target(ctx.surface);
- ok(!!rt, "Failed to create render target.\n");
-
+ rt = ctx.rt;
ID2D1RenderTarget_SetAntialiasMode(rt, D2D1_ANTIALIAS_MODE_ALIASED);
set_size_u(&size, 4, 4);
@@ -4146,7 +4133,6 @@ static void test_alpha_mode(void)
match = compare_surface(ctx.surface, "14f8ac64b70966c7c3c6281c59aaecdb17c3b16a");
ok(match, "Surface does not match.\n");
- ID2D1RenderTarget_Release(rt);
rt_desc.type = D2D1_RENDER_TARGET_TYPE_DEFAULT;
rt_desc.pixelFormat.format = DXGI_FORMAT_UNKNOWN;
rt_desc.pixelFormat.alphaMode = D2D1_ALPHA_MODE_IGNORE;
@@ -4520,9 +4506,7 @@ static void test_bitmap_updates(void)
if (!init_test_context(&ctx))
return;
- rt = create_render_target(ctx.surface);
- ok(!!rt, "Failed to create render target.\n");
-
+ rt = ctx.rt;
ID2D1RenderTarget_SetAntialiasMode(rt, D2D1_ANTIALIAS_MODE_ALIASED);
ID2D1RenderTarget_BeginDraw(rt);
@@ -4583,7 +4567,6 @@ static void test_bitmap_updates(void)
ok(match, "Surface does not match.\n");
ID2D1Bitmap_Release(bitmap);
- ID2D1RenderTarget_Release(rt);
release_test_context(&ctx);
}
@@ -4616,8 +4599,7 @@ static void test_opacity_brush(void)
if (!init_test_context(&ctx))
return;
- rt = create_render_target(ctx.surface);
- ok(!!rt, "Failed to create render target.\n");
+ rt = ctx.rt;
ID2D1RenderTarget_GetFactory(rt, &factory);
ID2D1RenderTarget_SetDpi(rt, 192.0f, 48.0f);
@@ -4750,9 +4732,7 @@ static void test_opacity_brush(void)
ID2D1BitmapBrush_Release(bitmap_brush);
ID2D1BitmapBrush_Release(opacity_brush);
ID2D1SolidColorBrush_Release(color_brush);
- ID2D1RenderTarget_Release(rt);
- refcount = ID2D1Factory_Release(factory);
- ok(!refcount, "Factory has %u references left.\n", refcount);
+ ID2D1Factory_Release(factory);
release_test_context(&ctx);
}
@@ -4782,7 +4762,6 @@ static void test_create_target(void)
if (!init_test_context(&ctx))
return;
-
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
@@ -5761,9 +5740,7 @@ static void test_gradient(void)
if (!init_test_context(&ctx))
return;
- rt = create_render_target(ctx.surface);
- ok(!!rt, "Failed to create render target.\n");
-
+ rt = ctx.rt;
stops2[0].position = 0.5f;
set_color(&stops2[0].color, 1.0f, 1.0f, 0.0f, 1.0f);
stops2[1] = stops2[0];
@@ -5788,7 +5765,6 @@ static void test_gradient(void)
}
ID2D1GradientStopCollection_Release(gradient);
- ID2D1RenderTarget_Release(rt);
release_test_context(&ctx);
}
@@ -5810,15 +5786,13 @@ static void test_draw_geometry(void)
D2D1_ELLIPSE ellipse;
D2D1_COLOR_F color;
D2D1_RECT_F rect;
- ULONG refcount;
HRESULT hr;
BOOL match;
if (!init_test_context(&ctx))
return;
- rt = create_render_target(ctx.surface);
- ok(!!rt, "Failed to create render target.\n");
+ rt = ctx.rt;
ID2D1RenderTarget_GetFactory(rt, &factory);
ID2D1RenderTarget_SetDpi(rt, 192.0f, 48.0f);
@@ -6703,9 +6677,7 @@ static void test_draw_geometry(void)
ok(match, "Figure does not match.\n");
ID2D1SolidColorBrush_Release(brush);
- ID2D1RenderTarget_Release(rt);
- refcount = ID2D1Factory_Release(factory);
- ok(!refcount, "Factory has %u references left.\n", refcount);
+ ID2D1Factory_Release(factory);
release_test_context(&ctx);
}
@@ -6725,15 +6697,13 @@ static void test_fill_geometry(void)
D2D1_ELLIPSE ellipse;
D2D1_COLOR_F color;
D2D1_RECT_F rect;
- ULONG refcount;
HRESULT hr;
BOOL match;
if (!init_test_context(&ctx))
return;
- rt = create_render_target(ctx.surface);
- ok(!!rt, "Failed to create render target.\n");
+ rt = ctx.rt;
ID2D1RenderTarget_GetFactory(rt, &factory);
ID2D1RenderTarget_SetDpi(rt, 192.0f, 48.0f);
@@ -7505,9 +7475,7 @@ static void test_fill_geometry(void)
ok(match, "Figure does not match.\n");
ID2D1SolidColorBrush_Release(brush);
- ID2D1RenderTarget_Release(rt);
- refcount = ID2D1Factory_Release(factory);
- ok(!refcount, "Factory has %u references left.\n", refcount);
+ ID2D1Factory_Release(factory);
release_test_context(&ctx);
}
@@ -7649,14 +7617,12 @@ static void test_layer(void)
ID2D1RenderTarget *rt;
ID2D1Layer *layer;
D2D1_SIZE_F size;
- ULONG refcount;
HRESULT hr;
if (!init_test_context(&ctx))
return;
- rt = create_render_target(ctx.surface);
- ok(!!rt, "Failed to create render target.\n");
+ rt = ctx.rt;
ID2D1RenderTarget_GetFactory(rt, &factory);
ID2D1RenderTarget_SetDpi(rt, 192.0f, 48.0f);
@@ -7680,9 +7646,7 @@ static void test_layer(void)
ok(size.height == 600.0f, "Got unexpected height %.8e.\n", size.height);
ID2D1Layer_Release(layer);
- ID2D1RenderTarget_Release(rt);
- refcount = ID2D1Factory_Release(factory);
- ok(!refcount, "Factory has %u references left.\n", refcount);
+ ID2D1Factory_Release(factory);
release_test_context(&ctx);
}
@@ -7696,15 +7660,13 @@ static void test_bezier_intersect(void)
ID2D1RenderTarget *rt;
ID2D1Factory *factory;
D2D1_COLOR_F color;
- ULONG refcount;
HRESULT hr;
BOOL match;
if (!init_test_context(&ctx))
return;
- rt = create_render_target(ctx.surface);
- ok(!!rt, "Failed to create render target.\n");
+ rt = ctx.rt;
ID2D1RenderTarget_GetFactory(rt, &factory);
ID2D1RenderTarget_SetDpi(rt, 192.0f, 48.0f);
@@ -7818,9 +7780,7 @@ static void test_bezier_intersect(void)
ok(match, "Figure does not match.\n");
ID2D1SolidColorBrush_Release(brush);
- ID2D1RenderTarget_Release(rt);
- refcount = ID2D1Factory_Release(factory);
- ok(!refcount, "Factory has %u references left.\n", refcount);
+ ID2D1Factory_Release(factory);
release_test_context(&ctx);
}
@@ -8123,10 +8083,7 @@ static void test_bitmap_surface(void)
}
/* DXGI target */
- rt = create_render_target(ctx.surface);
- ok(!!rt, "Failed to create render target.\n");
-
- hr = ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1DeviceContext, (void **)&device_context);
+ hr = ID2D1RenderTarget_QueryInterface(ctx.rt, &IID_ID2D1DeviceContext, (void **)&device_context);
ok(SUCCEEDED(hr), "Failed to get device context, hr %#x.\n", hr);
bitmap = NULL;
@@ -8135,12 +8092,10 @@ static void test_bitmap_surface(void)
check_bitmap_surface((ID2D1Bitmap *)bitmap, TRUE, D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW);
ID2D1Bitmap1_Release(bitmap);
- check_rt_bitmap_surface(rt, TRUE, D2D1_BITMAP_OPTIONS_NONE);
+ check_rt_bitmap_surface(ctx.rt, TRUE, D2D1_BITMAP_OPTIONS_NONE);
ID2D1DeviceContext_Release(device_context);
- ID2D1RenderTarget_Release(rt);
-
/* Bitmap created from DXGI surface. */
hr = ID3D10Device1_QueryInterface(ctx.device, &IID_IDXGIDevice, (void **)&dxgi_device);
ok(SUCCEEDED(hr), "Failed to get IDXGIDevice interface, hr %#x.\n", hr);
@@ -8370,9 +8325,7 @@ static void test_device_context(void)
ID2D1DeviceContext_Release(device_context);
/* DXGI target */
- rt = create_render_target(ctx.surface);
- ok(!!rt, "Failed to create render target.\n");
-
+ rt = ctx.rt;
hr = ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1DeviceContext, (void **)&device_context);
ok(SUCCEEDED(hr), "Failed to get device context interface, hr %#x.\n", hr);
ID2D1DeviceContext_GetTarget(device_context, (ID2D1Image **)&bitmap);
@@ -8397,7 +8350,6 @@ static void test_device_context(void)
ok(bitmap == NULL, "Unexpected target instance.\n");
ID2D1DeviceContext_Release(device_context);
- ID2D1RenderTarget_Release(rt);
/* WIC target */
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
@@ -8895,8 +8847,7 @@ todo_wine
ID2D1RenderTarget_Release(rt);
ID2D1DeviceContext_Release(device_context);
- refcount = ID2D1Factory1_Release(factory);
- ok(!refcount, "Factory has %u references left.\n", refcount);
+ ID2D1Factory1_Release(factory);
release_test_context(&ctx);
}
@@ -9256,8 +9207,7 @@ static void test_wic_bitmap_format(void)
if (!init_test_context(&ctx))
return;
- rt = create_render_target(ctx.surface);
- ok(!!rt, "Failed to create render target.\n");
+ rt = ctx.rt;
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
@@ -9285,7 +9235,6 @@ static void test_wic_bitmap_format(void)
IWICImagingFactory_Release(wic_factory);
CoUninitialize();
- ID2D1RenderTarget_Release(rt);
release_test_context(&ctx);
}
--
2.20.1
2
1
[PATCH 05/12] d2d1/tests: Retrieve the swapchain back-buffer in init_test_context_().
by Henri Verbeet Jan. 15, 2021
by Henri Verbeet Jan. 15, 2021
Jan. 15, 2021
From: Rémi Bernon <rbernon(a)codeweavers.com>
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
v3:
- Retrieving the back-buffer is not supposed to fail.
- Add line information to the IDXGISwapChain_GetBuffer() check in
init_test_context_().
dlls/d2d1/tests/d2d1.c | 507 +++++++++++++++++------------------------
1 file changed, 212 insertions(+), 295 deletions(-)
diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c
index 545f5dc20a7..3fa3b1a9acd 100644
--- a/dlls/d2d1/tests/d2d1.c
+++ b/dlls/d2d1/tests/d2d1.c
@@ -47,6 +47,7 @@ struct d2d1_test_context
ID3D10Device1 *device;
HWND window;
IDXGISwapChain *swapchain;
+ IDXGISurface *surface;
};
struct resource_readback
@@ -789,6 +790,7 @@ static ID2D1RenderTarget *create_render_target(IDXGISurface *surface)
#define release_test_context(ctx) release_test_context_(__LINE__, ctx)
static void release_test_context_(unsigned int line, struct d2d1_test_context *ctx)
{
+ IDXGISurface_Release(ctx->surface);
IDXGISwapChain_Release(ctx->swapchain);
DestroyWindow(ctx->window);
ID3D10Device1_Release(ctx->device);
@@ -797,6 +799,8 @@ static void release_test_context_(unsigned int line, struct d2d1_test_context *c
#define init_test_context(ctx) init_test_context_(__LINE__, ctx)
static BOOL init_test_context_(unsigned int line, struct d2d1_test_context *ctx)
{
+ HRESULT hr;
+
memset(ctx, 0, sizeof(*ctx));
if (!(ctx->device = create_device()))
@@ -809,6 +813,8 @@ static BOOL init_test_context_(unsigned int line, struct d2d1_test_context *ctx)
ok_(__FILE__, line)(!!ctx->window, "Failed to create test window.\n");
ctx->swapchain = create_swapchain(ctx->device, ctx->window, TRUE);
ok_(__FILE__, line)(!!ctx->swapchain, "Failed to create swapchain.\n");
+ hr = IDXGISwapChain_GetBuffer(ctx->swapchain, 0, &IID_IDXGISurface, (void **)&ctx->surface);
+ ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
return TRUE;
}
@@ -1125,7 +1131,6 @@ static void test_clip(void)
D2D1_MATRIX_3X2_F matrix;
D2D1_SIZE_U pixel_size;
ID2D1RenderTarget *rt;
- IDXGISurface *surface;
D2D1_POINT_2F point;
D2D1_COLOR_F color;
float dpi_x, dpi_y;
@@ -1143,9 +1148,7 @@ static void test_clip(void)
if (!init_test_context(&ctx))
return;
- hr = IDXGISwapChain_GetBuffer(ctx.swapchain, 0, &IID_IDXGISurface, (void **)&surface);
- ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
- rt = create_render_target(surface);
+ rt = create_render_target(ctx.surface);
ok(!!rt, "Failed to create render target.\n");
ID2D1RenderTarget_GetDpi(rt, &dpi_x, &dpi_y);
@@ -1244,7 +1247,7 @@ static void test_clip(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(surface, "035a44d4198d6e422e9de6185b5b2c2bac5e33c9");
+ match = compare_surface(ctx.surface, "035a44d4198d6e422e9de6185b5b2c2bac5e33c9");
ok(match, "Surface does not match.\n");
/* Fractional clip rectangle coordinates, aliased mode. */
@@ -1310,11 +1313,10 @@ static void test_clip(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(surface, "cb418ec4a7c8407b5e36db06fc6292a06bb8476c");
+ match = compare_surface(ctx.surface, "cb418ec4a7c8407b5e36db06fc6292a06bb8476c");
ok(match, "Surface does not match.\n");
ID2D1RenderTarget_Release(rt);
- IDXGISurface_Release(surface);
release_test_context(&ctx);
}
@@ -1327,7 +1329,6 @@ static void test_state_block(void)
struct d2d1_test_context ctx;
ID2D1Factory1 *factory1;
ID2D1RenderTarget *rt;
- IDXGISurface *surface;
ID2D1Factory *factory;
ULONG refcount;
HRESULT hr;
@@ -1353,9 +1354,7 @@ static void test_state_block(void)
if (!init_test_context(&ctx))
return;
- hr = IDXGISwapChain_GetBuffer(ctx.swapchain, 0, &IID_IDXGISurface, (void **)&surface);
- ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
- rt = create_render_target(surface);
+ rt = create_render_target(ctx.surface);
ok(!!rt, "Failed to create render target.\n");
ID2D1RenderTarget_GetFactory(rt, &factory);
hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, &IID_IDWriteFactory, (IUnknown **)&dwrite_factory);
@@ -1580,7 +1579,6 @@ static void test_state_block(void)
ok(!refcount, "Rendering params %u references left.\n", refcount);
ID2D1Factory_Release(factory);
ID2D1RenderTarget_Release(rt);
- IDXGISurface_Release(surface);
release_test_context(&ctx);
}
@@ -1592,7 +1590,6 @@ static void test_color_brush(void)
struct d2d1_test_context ctx;
ID2D1SolidColorBrush *brush;
ID2D1RenderTarget *rt;
- IDXGISurface *surface;
D2D1_RECT_F rect;
float opacity;
HRESULT hr;
@@ -1601,9 +1598,7 @@ static void test_color_brush(void)
if (!init_test_context(&ctx))
return;
- hr = IDXGISwapChain_GetBuffer(ctx.swapchain, 0, &IID_IDXGISurface, (void **)&surface);
- ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
- rt = create_render_target(surface);
+ rt = create_render_target(ctx.surface);
ok(!!rt, "Failed to create render target.\n");
ID2D1RenderTarget_SetDpi(rt, 192.0f, 48.0f);
@@ -1667,12 +1662,11 @@ static void test_color_brush(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(surface, "6d1218fca5e21fb7e287b3a439d60dbc251f5ceb");
+ match = compare_surface(ctx.surface, "6d1218fca5e21fb7e287b3a439d60dbc251f5ceb");
ok(match, "Surface does not match.\n");
ID2D1SolidColorBrush_Release(brush);
ID2D1RenderTarget_Release(rt);
- IDXGISurface_Release(surface);
release_test_context(&ctx);
}
@@ -1691,7 +1685,6 @@ static void test_bitmap_brush(void)
ID2D1BitmapBrush *brush;
D2D1_SIZE_F image_size;
ID2D1RenderTarget *rt;
- IDXGISurface *surface;
ID2D1Factory *factory;
D2D1_COLOR_F color;
ID2D1Image *image;
@@ -1733,9 +1726,7 @@ static void test_bitmap_brush(void)
if (!init_test_context(&ctx))
return;
- hr = IDXGISwapChain_GetBuffer(ctx.swapchain, 0, &IID_IDXGISurface, (void **)&surface);
- ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
- rt = create_render_target(surface);
+ rt = create_render_target(ctx.surface);
ok(!!rt, "Failed to create render target.\n");
ID2D1RenderTarget_SetDpi(rt, 192.0f, 48.0f);
@@ -1813,7 +1804,7 @@ static void test_bitmap_brush(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(surface, "95675fbc4a16404c9568d41b14e8f6be64240998");
+ match = compare_surface(ctx.surface, "95675fbc4a16404c9568d41b14e8f6be64240998");
ok(match, "Surface does not match.\n");
ID2D1RenderTarget_BeginDraw(rt);
@@ -1825,7 +1816,7 @@ static void test_bitmap_brush(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(surface, "95675fbc4a16404c9568d41b14e8f6be64240998");
+ match = compare_surface(ctx.surface, "95675fbc4a16404c9568d41b14e8f6be64240998");
ok(match, "Surface does not match.\n");
ID2D1RenderTarget_SetTransform(rt, &tmp_matrix);
@@ -1913,7 +1904,7 @@ static void test_bitmap_brush(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(surface, "f5d039c280fa33ba05496c9883192a34108efbbe");
+ match = compare_surface(ctx.surface, "f5d039c280fa33ba05496c9883192a34108efbbe");
ok(match, "Surface does not match.\n");
/* Invalid interpolation mode. */
@@ -1931,7 +1922,7 @@ static void test_bitmap_brush(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
- match = compare_surface(surface, "f5d039c280fa33ba05496c9883192a34108efbbe");
+ match = compare_surface(ctx.surface, "f5d039c280fa33ba05496c9883192a34108efbbe");
ok(match, "Surface does not match.\n");
ID2D1RenderTarget_BeginDraw(rt);
@@ -1943,7 +1934,7 @@ static void test_bitmap_brush(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(surface, "59043096393570ad800dbcbfdd644394b79493bd");
+ match = compare_surface(ctx.surface, "59043096393570ad800dbcbfdd644394b79493bd");
ok(match, "Surface does not match.\n");
ID2D1RenderTarget_BeginDraw(rt);
@@ -1972,7 +1963,7 @@ static void test_bitmap_brush(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(surface, "b4b775afecdae2d26642001f4faff73663bb8b31");
+ match = compare_surface(ctx.surface, "b4b775afecdae2d26642001f4faff73663bb8b31");
ok(match, "Surface does not match.\n");
ID2D1Bitmap_Release(bitmap);
@@ -2021,7 +2012,7 @@ static void test_bitmap_brush(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(surface, "cf7b90ba7b139fdfbe9347e1907d635cfb4ed197");
+ match = compare_surface(ctx.surface, "cf7b90ba7b139fdfbe9347e1907d635cfb4ed197");
ok(match, "Surface does not match.\n");
if (SUCCEEDED(ID2D1BitmapBrush_QueryInterface(brush, &IID_ID2D1BitmapBrush1, (void **)&brush1)))
@@ -2071,7 +2062,6 @@ static void test_bitmap_brush(void)
refcount = ID2D1Bitmap_Release(bitmap);
ok(!refcount, "Bitmap has %u references left.\n", refcount);
ID2D1RenderTarget_Release(rt);
- IDXGISurface_Release(surface);
release_test_context(&ctx);
}
@@ -2086,7 +2076,6 @@ static void test_linear_brush(void)
struct d2d1_test_context ctx;
struct resource_readback rb;
ID2D1RenderTarget *rt;
- IDXGISurface *surface;
ID2D1Factory *factory;
D2D1_COLOR_F colour;
D2D1_POINT_2F p;
@@ -2136,9 +2125,7 @@ static void test_linear_brush(void)
if (!init_test_context(&ctx))
return;
- hr = IDXGISwapChain_GetBuffer(ctx.swapchain, 0, &IID_IDXGISurface, (void **)&surface);
- ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
- rt = create_render_target(surface);
+ rt = create_render_target(ctx.surface);
ok(!!rt, "Failed to create render target.\n");
ID2D1RenderTarget_SetDpi(rt, 192.0f, 48.0f);
@@ -2180,7 +2167,7 @@ static void test_linear_brush(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- get_surface_readback(surface, &rb);
+ get_surface_readback(ctx.surface, &rb);
for (i = 0; i < ARRAY_SIZE(test1); ++i)
{
DWORD colour;
@@ -2253,7 +2240,7 @@ static void test_linear_brush(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- get_surface_readback(surface, &rb);
+ get_surface_readback(ctx.surface, &rb);
for (i = 0; i < ARRAY_SIZE(test2); ++i)
{
DWORD colour;
@@ -2269,7 +2256,6 @@ static void test_linear_brush(void)
refcount = ID2D1GradientStopCollection_Release(gradient);
ok(!refcount, "Gradient has %u references left.\n", refcount);
ID2D1RenderTarget_Release(rt);
- IDXGISurface_Release(surface);
release_test_context(&ctx);
}
@@ -2284,7 +2270,6 @@ static void test_radial_brush(void)
struct d2d1_test_context ctx;
struct resource_readback rb;
ID2D1RenderTarget *rt;
- IDXGISurface *surface;
ID2D1Factory *factory;
D2D1_COLOR_F colour;
D2D1_POINT_2F p;
@@ -2334,9 +2319,7 @@ static void test_radial_brush(void)
if (!init_test_context(&ctx))
return;
- hr = IDXGISwapChain_GetBuffer(ctx.swapchain, 0, &IID_IDXGISurface, (void **)&surface);
- ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
- rt = create_render_target(surface);
+ rt = create_render_target(ctx.surface);
ok(!!rt, "Failed to create render target.\n");
ID2D1RenderTarget_SetDpi(rt, 192.0f, 48.0f);
@@ -2384,7 +2367,7 @@ static void test_radial_brush(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- get_surface_readback(surface, &rb);
+ get_surface_readback(ctx.surface, &rb);
for (i = 0; i < ARRAY_SIZE(test1); ++i)
{
DWORD colour;
@@ -2459,7 +2442,7 @@ static void test_radial_brush(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- get_surface_readback(surface, &rb);
+ get_surface_readback(ctx.surface, &rb);
for (i = 0; i < ARRAY_SIZE(test2); ++i)
{
DWORD colour;
@@ -2475,7 +2458,6 @@ static void test_radial_brush(void)
refcount = ID2D1GradientStopCollection_Release(gradient);
ok(!refcount, "Gradient has %u references left.\n", refcount);
ID2D1RenderTarget_Release(rt);
- IDXGISurface_Release(surface);
release_test_context(&ctx);
}
@@ -2606,7 +2588,6 @@ static void test_path_geometry(void)
ID2D1PathGeometry *geometry;
ID2D1Geometry *tmp_geometry;
ID2D1RenderTarget *rt;
- IDXGISurface *surface;
ID2D1Factory *factory;
BOOL match, contains;
D2D1_COLOR_F color;
@@ -2932,9 +2913,7 @@ static void test_path_geometry(void)
if (!init_test_context(&ctx))
return;
- hr = IDXGISwapChain_GetBuffer(ctx.swapchain, 0, &IID_IDXGISurface, (void **)&surface);
- ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
- rt = create_render_target(surface);
+ rt = create_render_target(ctx.surface);
ok(!!rt, "Failed to create render target.\n");
ID2D1RenderTarget_GetFactory(rt, &factory);
@@ -3320,7 +3299,7 @@ static void test_path_geometry(void)
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(surface, "3aace1b22aae111cb577614fed16e4eb1650dba5");
+ match = compare_surface(ctx.surface, "3aace1b22aae111cb577614fed16e4eb1650dba5");
ok(match, "Surface does not match.\n");
/* Edge test. */
@@ -3401,7 +3380,7 @@ static void test_path_geometry(void)
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(surface, "bfb40a1f007694fa07dbd3b854f3f5d9c3e1d76b");
+ match = compare_surface(ctx.surface, "bfb40a1f007694fa07dbd3b854f3f5d9c3e1d76b");
ok(match, "Surface does not match.\n");
ID2D1TransformedGeometry_Release(transformed_geometry);
ID2D1PathGeometry_Release(geometry);
@@ -3461,7 +3440,7 @@ static void test_path_geometry(void)
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_figure(surface, 0, 0, 160, 160, 0xff652e89, 64,
+ match = compare_figure(ctx.surface, 0, 0, 160, 160, 0xff652e89, 64,
"7xoCngECngECngECngECngECngECngECnQEEnAEEnAEEnAEEnAEEmwEGmgEGmgEGmgEGmQEImAEI"
"lAEECASLAQgKCIEBDQoMew8KD3YQDBByEgwSbhMOEmwUDhRpFBAUZxUQFWUVEhVjFhIWYRYUFl8X"
"FBddFxYWXRYYFlsXGBdaFhoWWRYcFlgVHhVXFSAVVhQiFFUUIxRVEyYTVBIoElQRKhFUECwQUxAu"
@@ -3471,7 +3450,7 @@ static void test_path_geometry(void)
"EBVnFBAUaRQOFGsTDhJvEgwSchAMEHYPCg96DQoMggEICgiLAQQIBJQBCJgBCJkBBpoBBpoBBpoB"
"BpsBBJwBBJwBBJwBBJwBBJ0BAp4BAp4BAp4BAp4BAp4BAp4BAp4BAgAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 0, 226, 160, 160, 0xff652e89, 64,
+ match = compare_figure(ctx.surface, 0, 226, 160, 160, 0xff652e89, 64,
"7xoCngECngECngECngECngECngECngECnQEEnAEEnAEEnAEEnAEEmwEGmgEGmgEGmgEGmQEImAEI"
"lAEECASLAQgKCIEBDQoMew8KD3YQDBByEgwSbhMOEmwUDhRpFBAUZxUQFWUVEhVjFhIWYRYUFl8X"
"FBddFxYWXRYYFlsXGBdaFhoWWRYcFlgVHhVXFSAVVhQiFFUUIxRVEyYTVBIoElQRKhFUECwQUxAu"
@@ -3481,7 +3460,7 @@ static void test_path_geometry(void)
"EBVnFBAUaRQOFGsTDhJvEgwSchAMEHYPCg96DQoMggEICgiLAQQIBJQBCJgBCJkBBpoBBpoBBpoB"
"BpsBBJwBBJwBBJwBBJwBBJ0BAp4BAp4BAp4BAp4BAp4BAp4BAp4BAgAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 0, 320, 160, 0xff652e89, 64,
+ match = compare_figure(ctx.surface, 160, 0, 320, 160, 0xff652e89, 64,
"gVQBwAIBWgHlAQFYAecBAVYB6QEBVAHrAQEjDCMB7AECHhQeAu0BAxoYGgPvAQMWHhYD8QEDFCAU"
"A/MBBBAkEAT0AQUOJw0F9QEGCioKBvcBBggsCAb4AQgFLgUI+QEJATIBCfsBCAIwAgj8AQcFLAUH"
"/QEFCCgIBf4BBAwiDAT/AQIQHBAClwISlwIBPgGAAgI8Av8BAzwD/QEEPAT7AQY6BvkBBzoH+AEI"
@@ -3493,7 +3472,7 @@ static void test_path_geometry(void)
"BfUBBBAlDwTzAQQSIhIE8QEDFh4WA/ABAhkaGQLvAQIcFhwC7QECIBAgAusBASgEKAHpAQFWAecB"
"AVgB5QEBWgHAAgHhUgAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 160, 320, 160, 0xff652e89, 64,
+ match = compare_figure(ctx.surface, 160, 160, 320, 160, 0xff652e89, 64,
"/VUB5QEBWAHnAQFWAekBAVQB6wECIQ8hAe0BAh0VHQLuAQIZGhkD7wEDFh4WA/EBBBMhEwPzAQQQ"
"JQ8F9AEFDCgNBfUBBgoqCgb3AQcHLQcG+QEIBC8ECPkBPAEJ+wEIAy8CCP0BBgYrBQf9AQUJJgkF"
"/wEDDSANBP8BAhEaEQKYAhAXAYACAT4BgAICPQL+AQM8BPwBBTsE+wEGOgb6AQc5B/gBCDgJ9gEJ"
@@ -3557,21 +3536,21 @@ static void test_path_geometry(void)
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_figure(surface, 0, 0, 160, 160, 0xff652e89, 64,
+ match = compare_figure(ctx.surface, 0, 0, 160, 160, 0xff652e89, 64,
"7xoCngECngECngECngECngECngECngECnQEEnAEEnAEEnAEEnAEEmwEGmgEGmgEGmgEGmQEImAEI"
"lAEQiwEagQEjeyh2LHIwbjNsNmk4ZzplPGM+YUBfQl1DXURbRlpGWUhYSFdKVkpVS1VMVExUTFRM"
"U05STlJOUk5STlFQUFBQUFBQTlRIXD9mMnYqdjJmP1xIVE5QUFBQUFBQUU5STlJOUk5STlNMVExU"
"TFRMVEtWSlZKV0hYSFlGWkZbRFxDXkJfQGE+YzxlOmc4aTZrM28wcix2KHojggEaiwEQlAEImAEI"
"mQEGmgEGmgEGmgEGmwEEnAEEnAEEnAEEnAEEnQECngECngECngECngECngECngECngEC");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 0, 226, 160, 160, 0xff652e89, 64,
+ match = compare_figure(ctx.surface, 0, 226, 160, 160, 0xff652e89, 64,
"7xoCngECngECngECngECngECngECngECnQEEnAEEnAEEnAEEnAEEmwEGmgEGmgEGmgEGmQEImAEI"
"lAEQiwEagQEjeyh2LHIwbjNsNmk4ZzplPGM+YUBfQl1DXURbRlpGWUhYSFdKVkpVS1VMVExUTFRM"
"U05STlJOUk5STlFQUFBQUFBQTlRIXD9mMnYqdjJmP1xIVE5QUFBQUFBQUU5STlJOUk5STlNMVExU"
"TFRMVEtWSlZKV0hYSFlGWkZbRFxDXkJfQGE+YzxlOmc4aTZrM28wcix2KHojggEaiwEQlAEImAEI"
"mQEGmgEGmgEGmgEGmwEEnAEEnAEEnAEEnAEEnQECngECngECngECngECngECngECngEC");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 0, 320, 160, 0xff652e89, 64,
+ match = compare_figure(ctx.surface, 160, 0, 320, 160, 0xff652e89, 64,
"4VIBwAIBWgHlAQFYAecBAVYB6QEBVAHrAQIhDiIB7QECHRUdAu4BAhkaGQPvAQMWHhYD8QEEEyET"
"A/MBBBAkEAT1AQUMKA0F9QEGCioKBvcBBwctBwb5AQgELwQI+QEJATIBCfsBRP0BQ/0BQv8BQf8B"
"QIECP4ACQIACQf4BQ/wBRPsBRvoBR/gBSPcBSvYBS/QBTPMBTvIBTvIBT/ABUPABUe4BUu4BUu4B"
@@ -3580,7 +3559,7 @@ static void test_path_geometry(void)
"RPsBCQEyAQn6AQgELwQI+AEHBy0GB/cBBgoqCgb2AQUMKA0F9AEEECUPBPMBBBIiEwPxAQMWHhYD"
"8AECGRoZA+4BAh0VHQLsAQIhDiIB6wEBVAHpAQFWAecBAVgB5QEBWgHAAgEA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 160, 320, 160, 0xff652e89, 64,
+ match = compare_figure(ctx.surface, 160, 160, 320, 160, 0xff652e89, 64,
"gVQBXAHjAQFaAeUBAVgB5wEBVgHpAQEpAikB6wECIBAgAu0BAhwWHALvAQIZGhkC8AEDFh4WA/EB"
"BBIiEgTzAQQPJRAE9QEFDCgMBfYBBgoqCgb3AQcGLgYH+QEIAzADCPoBRvsBRPwBRP0BQv8BQIAC"
"QIECPoECQP8BQv0BRPwBRPsBRvkBSPgBSPcBSvUBTPQBTPMBTvIBTvEBUPABUO8BUu4BUu4BUu4B"
@@ -3624,7 +3603,7 @@ static void test_path_geometry(void)
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(surface, "a875e68e0cb9c055927b1b50b879f90b24e38470");
+ match = compare_surface(ctx.surface, "a875e68e0cb9c055927b1b50b879f90b24e38470");
ok(match, "Surface does not match.\n");
ID2D1PathGeometry_Release(geometry);
@@ -3657,7 +3636,6 @@ static void test_path_geometry(void)
ID2D1RenderTarget_Release(rt);
refcount = ID2D1Factory_Release(factory);
ok(!refcount, "Factory has %u references left.\n", refcount);
- IDXGISurface_Release(surface);
release_test_context(&ctx);
}
@@ -3994,7 +3972,6 @@ static void test_bitmap_formats(void)
struct d2d1_test_context ctx;
D2D1_SIZE_U size = {4, 4};
ID2D1RenderTarget *rt;
- IDXGISurface *surface;
ID2D1Bitmap *bitmap;
unsigned int i, j;
HRESULT hr;
@@ -4025,9 +4002,7 @@ static void test_bitmap_formats(void)
if (!init_test_context(&ctx))
return;
- hr = IDXGISwapChain_GetBuffer(ctx.swapchain, 0, &IID_IDXGISurface, (void **)&surface);
- ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
- rt = create_render_target(surface);
+ rt = create_render_target(ctx.surface);
ok(!!rt, "Failed to create render target.\n");
bitmap_desc.dpiX = 96.0f;
@@ -4054,7 +4029,6 @@ static void test_bitmap_formats(void)
}
ID2D1RenderTarget_Release(rt);
- IDXGISurface_Release(surface);
release_test_context(&ctx);
}
@@ -4066,7 +4040,6 @@ static void test_alpha_mode(void)
ID2D1BitmapBrush *bitmap_brush;
struct d2d1_test_context ctx;
ID2D1RenderTarget *rt;
- IDXGISurface *surface;
ID2D1Bitmap *bitmap;
D2D1_COLOR_F color;
D2D1_RECT_F rect;
@@ -4086,9 +4059,7 @@ static void test_alpha_mode(void)
if (!init_test_context(&ctx))
return;
- hr = IDXGISwapChain_GetBuffer(ctx.swapchain, 0, &IID_IDXGISurface, (void **)&surface);
- ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
- rt = create_render_target(surface);
+ rt = create_render_target(ctx.surface);
ok(!!rt, "Failed to create render target.\n");
ID2D1RenderTarget_SetAntialiasMode(rt, D2D1_ANTIALIAS_MODE_ALIASED);
@@ -4115,7 +4086,7 @@ static void test_alpha_mode(void)
ID2D1RenderTarget_Clear(rt, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(surface, "48c41aff3a130a17ee210866b2ab7d36763934d5");
+ match = compare_surface(ctx.surface, "48c41aff3a130a17ee210866b2ab7d36763934d5");
ok(match, "Surface does not match.\n");
ID2D1RenderTarget_BeginDraw(rt);
@@ -4123,7 +4094,7 @@ static void test_alpha_mode(void)
ID2D1RenderTarget_Clear(rt, &color);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(surface, "6487e683730fb5a77c1911388d00b04664c5c4e4");
+ match = compare_surface(ctx.surface, "6487e683730fb5a77c1911388d00b04664c5c4e4");
ok(match, "Surface does not match.\n");
ID2D1RenderTarget_BeginDraw(rt);
@@ -4131,7 +4102,7 @@ static void test_alpha_mode(void)
ID2D1RenderTarget_Clear(rt, &color);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(surface, "7a35ba09e43cbaf591388ff1ef8de56157630c98");
+ match = compare_surface(ctx.surface, "7a35ba09e43cbaf591388ff1ef8de56157630c98");
ok(match, "Surface does not match.\n");
ID2D1RenderTarget_BeginDraw(rt);
@@ -4172,7 +4143,7 @@ static void test_alpha_mode(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(surface, "14f8ac64b70966c7c3c6281c59aaecdb17c3b16a");
+ match = compare_surface(ctx.surface, "14f8ac64b70966c7c3c6281c59aaecdb17c3b16a");
ok(match, "Surface does not match.\n");
ID2D1RenderTarget_Release(rt);
@@ -4183,7 +4154,7 @@ static void test_alpha_mode(void)
rt_desc.dpiY = 0.0f;
rt_desc.usage = D2D1_RENDER_TARGET_USAGE_NONE;
rt_desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
- rt = create_render_target_desc(surface, &rt_desc);
+ rt = create_render_target_desc(ctx.surface, &rt_desc);
ok(!!rt, "Failed to create render target.\n");
ID2D1RenderTarget_SetAntialiasMode(rt, D2D1_ANTIALIAS_MODE_ALIASED);
@@ -4210,7 +4181,7 @@ static void test_alpha_mode(void)
ID2D1RenderTarget_Clear(rt, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(surface, "b44510bf2d2e61a8d7c0ad862de49a471f1fd13f");
+ match = compare_surface(ctx.surface, "b44510bf2d2e61a8d7c0ad862de49a471f1fd13f");
ok(match, "Surface does not match.\n");
ID2D1RenderTarget_BeginDraw(rt);
@@ -4218,7 +4189,7 @@ static void test_alpha_mode(void)
ID2D1RenderTarget_Clear(rt, &color);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(surface, "2184f4a9198fc1de09ac85301b7a03eebadd9b81");
+ match = compare_surface(ctx.surface, "2184f4a9198fc1de09ac85301b7a03eebadd9b81");
ok(match, "Surface does not match.\n");
ID2D1RenderTarget_BeginDraw(rt);
@@ -4226,7 +4197,7 @@ static void test_alpha_mode(void)
ID2D1RenderTarget_Clear(rt, &color);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(surface, "6527ec83b4039c895b50f9b3e144fe0cf90d1889");
+ match = compare_surface(ctx.surface, "6527ec83b4039c895b50f9b3e144fe0cf90d1889");
ok(match, "Surface does not match.\n");
ID2D1RenderTarget_BeginDraw(rt);
@@ -4267,7 +4238,7 @@ static void test_alpha_mode(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(surface, "465f5a3190d7bde408b3206b4be939fb22f8a3d6");
+ match = compare_surface(ctx.surface, "465f5a3190d7bde408b3206b4be939fb22f8a3d6");
ok(match, "Surface does not match.\n");
refcount = ID2D1Bitmap_Release(bitmap);
@@ -4275,7 +4246,6 @@ static void test_alpha_mode(void)
ID2D1SolidColorBrush_Release(color_brush);
ID2D1BitmapBrush_Release(bitmap_brush);
ID2D1RenderTarget_Release(rt);
- IDXGISurface_Release(surface);
release_test_context(&ctx);
}
@@ -4286,7 +4256,7 @@ static void test_shared_bitmap(void)
D2D1_RENDER_TARGET_PROPERTIES desc;
D2D1_BITMAP_PROPERTIES bitmap_desc;
ID2D1RenderTarget *rt1, *rt2, *rt3;
- IDXGISurface *surface1, *surface2;
+ IDXGISurface *surface2;
ID2D1Factory *factory1, *factory2;
IWICImagingFactory *wic_factory;
ID2D1Bitmap *bitmap1, *bitmap2;
@@ -4305,8 +4275,6 @@ static void test_shared_bitmap(void)
window2 = create_window();
swapchain2 = create_swapchain(ctx.device, window2, TRUE);
- hr = IDXGISwapChain_GetBuffer(ctx.swapchain, 0, &IID_IDXGISurface, (void **)&surface1);
- ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
hr = IDXGISwapChain_GetBuffer(swapchain2, 0, &IID_IDXGISurface, (void **)&surface2);
ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
@@ -4341,7 +4309,7 @@ static void test_shared_bitmap(void)
ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
/* DXGI surface render targets with the same device and factory. */
- hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory1, surface1, &desc, &rt1);
+ hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory1, ctx.surface, &desc, &rt1);
ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
hr = ID2D1RenderTarget_CreateBitmap(rt1, size, NULL, 0, &bitmap_desc, &bitmap1);
check_bitmap_surface(bitmap1, TRUE, 0);
@@ -4521,7 +4489,6 @@ static void test_shared_bitmap(void)
IWICBitmap_Release(wic_bitmap2);
IWICBitmap_Release(wic_bitmap1);
IDXGISurface_Release(surface2);
- IDXGISurface_Release(surface1);
IDXGISwapChain_Release(swapchain2);
ID3D10Device1_Release(device2);
release_test_context(&ctx);
@@ -4534,7 +4501,6 @@ static void test_bitmap_updates(void)
D2D1_BITMAP_PROPERTIES bitmap_desc;
struct d2d1_test_context ctx;
ID2D1RenderTarget *rt;
- IDXGISurface *surface;
D2D1_RECT_U dst_rect;
ID2D1Bitmap *bitmap;
D2D1_COLOR_F color;
@@ -4554,9 +4520,7 @@ static void test_bitmap_updates(void)
if (!init_test_context(&ctx))
return;
- hr = IDXGISwapChain_GetBuffer(ctx.swapchain, 0, &IID_IDXGISurface, (void **)&surface);
- ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
- rt = create_render_target(surface);
+ rt = create_render_target(ctx.surface);
ok(!!rt, "Failed to create render target.\n");
ID2D1RenderTarget_SetAntialiasMode(rt, D2D1_ANTIALIAS_MODE_ALIASED);
@@ -4615,12 +4579,11 @@ static void test_bitmap_updates(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(surface, "cb8136c91fbbdc76bb83b8c09edc1907b0a5d0a6");
+ match = compare_surface(ctx.surface, "cb8136c91fbbdc76bb83b8c09edc1907b0a5d0a6");
ok(match, "Surface does not match.\n");
ID2D1Bitmap_Release(bitmap);
ID2D1RenderTarget_Release(rt);
- IDXGISurface_Release(surface);
release_test_context(&ctx);
}
@@ -4633,7 +4596,6 @@ static void test_opacity_brush(void)
struct d2d1_test_context ctx;
D2D1_MATRIX_3X2_F matrix;
ID2D1RenderTarget *rt;
- IDXGISurface *surface;
ID2D1Factory *factory;
ID2D1Bitmap *bitmap;
D2D1_COLOR_F color;
@@ -4654,9 +4616,7 @@ static void test_opacity_brush(void)
if (!init_test_context(&ctx))
return;
- hr = IDXGISwapChain_GetBuffer(ctx.swapchain, 0, &IID_IDXGISurface, (void **)&surface);
- ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
- rt = create_render_target(surface);
+ rt = create_render_target(ctx.surface);
ok(!!rt, "Failed to create render target.\n");
ID2D1RenderTarget_GetFactory(rt, &factory);
@@ -4742,7 +4702,7 @@ static void test_opacity_brush(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(hr == D2DERR_INCOMPATIBLE_BRUSH_TYPES, "Got unexpected hr %#x.\n", hr);
- match = compare_surface(surface, "7141c6c7b3decb91196428efb1856bcbf9872935");
+ match = compare_surface(ctx.surface, "7141c6c7b3decb91196428efb1856bcbf9872935");
ok(match, "Surface does not match.\n");
ID2D1RenderTarget_BeginDraw(rt);
@@ -4784,7 +4744,7 @@ static void test_opacity_brush(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_surface(surface, "c3a5802d1750efa3e9122c1a92f6064df3872732");
+ match = compare_surface(ctx.surface, "c3a5802d1750efa3e9122c1a92f6064df3872732");
ok(match, "Surface does not match.\n");
ID2D1BitmapBrush_Release(bitmap_brush);
@@ -4793,7 +4753,6 @@ static void test_opacity_brush(void)
ID2D1RenderTarget_Release(rt);
refcount = ID2D1Factory_Release(factory);
ok(!refcount, "Factory has %u references left.\n", refcount);
- IDXGISurface_Release(surface);
release_test_context(&ctx);
}
@@ -4802,7 +4761,6 @@ static void test_create_target(void)
struct d2d1_test_context ctx;
ID2D1Factory *factory;
ID2D1RenderTarget *rt;
- IDXGISurface *surface;
HRESULT hr;
static const struct
{
@@ -4824,8 +4782,6 @@ static void test_create_target(void)
if (!init_test_context(&ctx))
return;
- hr = IDXGISwapChain_GetBuffer(ctx.swapchain, 0, &IID_IDXGISurface, (void **)&surface);
- ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
@@ -4846,7 +4802,7 @@ static void test_create_target(void)
desc.usage = D2D1_RENDER_TARGET_USAGE_NONE;
desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
- hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory, surface, &desc, &rt);
+ hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory, ctx.surface, &desc, &rt);
ok(hr == create_dpi_tests[i].hr, "Wrong return code, hr %#x, expected %#x, test %u.\n", hr,
create_dpi_tests[i].hr, i);
@@ -4876,7 +4832,6 @@ static void test_create_target(void)
}
ID2D1Factory_Release(factory);
- IDXGISurface_Release(surface);
release_test_context(&ctx);
}
@@ -4916,7 +4871,6 @@ static void test_draw_text_layout(void)
D2D1_RENDER_TARGET_PROPERTIES desc;
ID2D1Factory *factory, *factory2;
ID2D1RenderTarget *rt, *rt2;
- IDXGISurface *surface;
HRESULT hr;
IDWriteFactory *dwrite_factory;
IDWriteTextFormat *text_format;
@@ -4933,8 +4887,6 @@ static void test_draw_text_layout(void)
if (!init_test_context(&ctx))
return;
- hr = IDXGISwapChain_GetBuffer(ctx.swapchain, 0, &IID_IDXGISurface, (void **)&surface);
- ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
@@ -4951,10 +4903,10 @@ static void test_draw_text_layout(void)
desc.usage = D2D1_RENDER_TARGET_USAGE_NONE;
desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
- hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory, surface, &desc, &rt);
+ hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory, ctx.surface, &desc, &rt);
ok(SUCCEEDED(hr), "Failed to create a target, hr %#x.\n", hr);
- hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory2, surface, &desc, &rt2);
+ hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory2, ctx.surface, &desc, &rt2);
ok(SUCCEEDED(hr), "Failed to create a target, hr %#x.\n", hr);
hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, &IID_IDWriteFactory, (IUnknown **)&dwrite_factory);
@@ -5038,7 +4990,6 @@ todo_wine
ID2D1Factory_Release(factory);
ID2D1Factory_Release(factory2);
- IDXGISurface_Release(surface);
release_test_context(&ctx);
}
@@ -5802,7 +5753,6 @@ static void test_gradient(void)
D2D1_GRADIENT_STOP stops[3], stops2[3];
struct d2d1_test_context ctx;
ID2D1RenderTarget *rt;
- IDXGISurface *surface;
D2D1_COLOR_F color;
unsigned int i;
UINT32 count;
@@ -5811,9 +5761,7 @@ static void test_gradient(void)
if (!init_test_context(&ctx))
return;
- hr = IDXGISwapChain_GetBuffer(ctx.swapchain, 0, &IID_IDXGISurface, (void **)&surface);
- ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
- rt = create_render_target(surface);
+ rt = create_render_target(ctx.surface);
ok(!!rt, "Failed to create render target.\n");
stops2[0].position = 0.5f;
@@ -5842,7 +5790,6 @@ static void test_gradient(void)
ID2D1GradientStopCollection_Release(gradient);
ID2D1RenderTarget_Release(rt);
- IDXGISurface_Release(surface);
release_test_context(&ctx);
}
@@ -5858,7 +5805,6 @@ static void test_draw_geometry(void)
D2D1_MATRIX_3X2_F matrix;
ID2D1GeometrySink *sink;
ID2D1RenderTarget *rt;
- IDXGISurface *surface;
ID2D1Factory *factory;
D2D1_POINT_2F p0, p1;
D2D1_ELLIPSE ellipse;
@@ -5871,9 +5817,7 @@ static void test_draw_geometry(void)
if (!init_test_context(&ctx))
return;
- hr = IDXGISwapChain_GetBuffer(ctx.swapchain, 0, &IID_IDXGISurface, (void **)&surface);
- ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
- rt = create_render_target(surface);
+ rt = create_render_target(ctx.surface);
ok(!!rt, "Failed to create render target.\n");
ID2D1RenderTarget_GetFactory(rt, &factory);
@@ -5920,18 +5864,18 @@ static void test_draw_geometry(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_figure(surface, 0, 0, 160, 160, 0xff652e89, 0, "");
+ match = compare_figure(ctx.surface, 0, 0, 160, 160, 0xff652e89, 0, "");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 0, 160, 160, 0xff652e89, 0, "yGBQUFBQUFBQUFDoYQAA");
+ match = compare_figure(ctx.surface, 160, 0, 160, 160, 0xff652e89, 0, "yGBQUFBQUFBQUFDoYQAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 320, 0, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 320, 0, 160, 160, 0xff652e89, 0,
"xjIUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUxjIA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 480, 0, 160, 160, 0xff652e89, 2,
+ match = compare_figure(ctx.surface, 480, 0, 160, 160, 0xff652e89, 2,
"zjECnQETjAEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEV"
"igEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEV"
"igEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEV"
@@ -5939,18 +5883,18 @@ static void test_draw_geometry(void)
"igEVigEVigEVigEVjAETnQECzjEA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 0, 160, 160, 160, 0xff652e89, 0, "5mAUjAEUjAEUjAEUjAEUhmIA");
+ match = compare_figure(ctx.surface, 0, 160, 160, 160, 0xff652e89, 0, "5mAUjAEUjAEUjAEUjAEUhmIA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 160, 160, 160, 0xff652e89, 0, "vmBkPGQ8ZDxkPGTeYQAA");
+ match = compare_figure(ctx.surface, 160, 160, 160, 160, 0xff652e89, 0, "vmBkPGQ8ZDxkPGTeYQAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 320, 160, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 320, 160, 160, 160, 0xff652e89, 0,
"5i4UjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUhjAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 480, 160, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 480, 160, 160, 160, 0xff652e89, 0,
"vi5kPGQ8ZDxkPGQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
"FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
@@ -5959,18 +5903,18 @@ static void test_draw_geometry(void)
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8ZDxkPGQ8ZDxk3i8A");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 0, 320, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
+ match = compare_figure(ctx.surface, 0, 320, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 320, 160, 160, 0xff652e89, 0, "yGBQSGA+ZDxkPmDgYQAA");
+ match = compare_figure(ctx.surface, 160, 320, 160, 160, 0xff652e89, 0, "yGBQSGA+ZDxkPmDgYQAA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 320, 320, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 320, 320, 160, 160, 0xff652e89, 0,
"iDAQjgEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjgEQiDAA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 480, 320, 160, 160, 0xff652e89, 10,
+ match = compare_figure(ctx.surface, 480, 320, 160, 160, 0xff652e89, 10,
"hDAYgwEieyh1LnAybBcIF2gWDhZkFhIWYRUWFV4VGhVbFRwVWRUeFVcVIBVVFCQUUxQmFFEUKBRP"
"FSgVTRUqFUwULBRLFC4USRQwFEgUMBRHFDIURhQyFEUUNBREFDQUQxQ2FEIUNhRBFDgUQBQ4FEAU"
"OBQ/FDoUPhQ6FD4UOhQ+FDoUPhQ6FD0UPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
@@ -6013,18 +5957,18 @@ static void test_draw_geometry(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_figure(surface, 0, 0, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
+ match = compare_figure(ctx.surface, 0, 0, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 0, 160, 160, 0xff652e89, 0, "yGBQSGA+ZDxkPmDgYQAA");
+ match = compare_figure(ctx.surface, 160, 0, 160, 160, 0xff652e89, 0, "yGBQSGA+ZDxkPmDgYQAA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 320, 0, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 320, 0, 160, 160, 0xff652e89, 0,
"iDAQjgEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjgEQiDAA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 480, 0, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 480, 0, 160, 160, 0xff652e89, 0,
"3C4oaUZVUExYRlxCHCgcPxU4FT0UPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
"FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
@@ -6033,18 +5977,18 @@ static void test_draw_geometry(void)
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FD0VOBU/YEJcRlhMUFVG7S8A");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 0, 160, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
+ match = compare_figure(ctx.surface, 0, 160, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 160, 160, 160, 0xff652e89, 0, "yGBQSGA+ZDxkPmDgYQAA");
+ match = compare_figure(ctx.surface, 160, 160, 160, 160, 0xff652e89, 0, "yGBQSGA+ZDxkPmDgYQAA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 320, 160, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 320, 160, 160, 160, 0xff652e89, 0,
"iDAQjgEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjgEQiDAA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 480, 160, 160, 160, 0xff652e89, 8,
+ match = compare_figure(ctx.surface, 480, 160, 160, 160, 0xff652e89, 8,
"3C4obT5dSFRQTlRKGCgYRhYwFkMVNBVBFTYVPxU5FD4UOhQ9FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
"FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
@@ -6053,18 +5997,18 @@ static void test_draw_geometry(void)
"PBQ8FDwUPRQ6FD4UOhQ/FTYVQRU0FUMWMBZGWEpVTVBTSltA8C8A");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 0, 320, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
+ match = compare_figure(ctx.surface, 0, 320, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 320, 160, 160, 0xff652e89, 0, "yGBQSGA+ZDxkPmDgYQAA");
+ match = compare_figure(ctx.surface, 160, 320, 160, 160, 0xff652e89, 0, "yGBQSGA+ZDxkPmDgYQAA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 320, 320, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 320, 320, 160, 160, 0xff652e89, 0,
"iDAQjgEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjgEQiDAA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 480, 320, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 480, 320, 160, 160, 0xff652e89, 0,
"3C4oZU5NWERgP2I9HigePBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
"FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
@@ -6107,18 +6051,18 @@ static void test_draw_geometry(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_figure(surface, 0, 0, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
+ match = compare_figure(ctx.surface, 0, 0, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 0, 160, 160, 0xff652e89, 0, "yGBQSGA+ZDxkPmDgYQAA");
+ match = compare_figure(ctx.surface, 160, 0, 160, 160, 0xff652e89, 0, "yGBQSGA+ZDxkPmDgYQAA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 320, 0, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 320, 0, 160, 160, 0xff652e89, 0,
"iDAQjgEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjgEQiDAA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 480, 0, 160, 160, 0xff652e89, 16,
+ match = compare_figure(ctx.surface, 480, 0, 160, 160, 0xff652e89, 16,
"hDAYgwEieyh1LnAybBcIF2gWDhZkFhIWYRUWFV4WGRVbFRwVWRUeFVcVIBVVFSMUUxQmFFEVJxRP"
"FSgVTRUqFUwULBRLFC4USRUvFEgUMBRHFDIURhQyFEUUNBREFDQUQxQ2FEIUNhRBFDgUQBQ4FEAU"
"OBQ/FTkUPhQ6FD4UOhQ+FDoUPhQ6FD0UPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
@@ -6127,18 +6071,18 @@ static void test_draw_geometry(void)
"FRwVWxUaFV4VFhVhFhIWZBYOFmgWChZsMnAudCp6IoMBGIQw");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 0, 160, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
+ match = compare_figure(ctx.surface, 0, 160, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 160, 160, 160, 0xff652e89, 0, "yGBQSGA+ZDxkPmDgYQAA");
+ match = compare_figure(ctx.surface, 160, 160, 160, 160, 0xff652e89, 0, "yGBQSGA+ZDxkPmDgYQAA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 320, 160, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 320, 160, 160, 160, 0xff652e89, 0,
"iDAQjgEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjgEQiDAA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 480, 160, 160, 160, 0xff652e89, 16,
+ match = compare_figure(ctx.surface, 480, 160, 160, 160, 0xff652e89, 16,
"3C4obzpjQF5EWkhXFSAVVRQkFFMUJhRRFCgUTxQqFE0VKhVMFCwUSxQuFEoULhVIFDAUSBQwFUYU"
"MhRGFDIURRQ0FEQUNBRDFTQVQhQ2FEIUNhRCFDYUQRQ4FEAUOBRAFDgUQBQ4FD8UOhQ+FDoUPhQ6"
"FD4UOhQ+FDoUPhQ6FD0VOxQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
@@ -6147,18 +6091,18 @@ static void test_draw_geometry(void)
"LhRLFCwUTBUrFE0UKhRPFCgUURQmFFMUJBRVSldIWUZdQWI78i8A");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 0, 320, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
+ match = compare_figure(ctx.surface, 0, 320, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 320, 160, 160, 0xff652e89, 0, "yGBQSGA+ZDxkPmDgYQAA");
+ match = compare_figure(ctx.surface, 160, 320, 160, 160, 0xff652e89, 0, "yGBQSGA+ZDxkPmDgYQAA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 320, 320, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 320, 320, 160, 160, 0xff652e89, 0,
"iDAQjgEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
"jAEUjAEUjAEUjAEUjAEUjAEUjAEUjgEQiDAA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 480, 320, 160, 160, 0xff652e89, 8,
+ match = compare_figure(ctx.surface, 480, 320, 160, 160, 0xff652e89, 8,
"9i80ZERWUExYRV5AHCocPRY4FjwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
"FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
@@ -6250,18 +6194,18 @@ static void test_draw_geometry(void)
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
ID2D1PathGeometry_Release(geometry);
- match = compare_figure(surface, 0, 0, 160, 160, 0xff652e89, 0, "");
+ match = compare_figure(ctx.surface, 0, 0, 160, 160, 0xff652e89, 0, "");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 0, 160, 160, 0xff652e89, 0, "");
+ match = compare_figure(ctx.surface, 160, 0, 160, 160, 0xff652e89, 0, "");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 320, 0, 160, 160, 0xff652e89, 0, "");
+ match = compare_figure(ctx.surface, 320, 0, 160, 160, 0xff652e89, 0, "");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 480, 0, 160, 160, 0xff652e89, 0, "q2MKlgEKq2MA");
+ match = compare_figure(ctx.surface, 480, 0, 160, 160, 0xff652e89, 0, "q2MKlgEKq2MA");
todo_wine ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 0, 160, 160, 160, 0xff652e89, 0, "iGNQUFCIYwAA");
+ match = compare_figure(ctx.surface, 0, 160, 160, 160, 0xff652e89, 0, "iGNQUFCIYwAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 160, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 160, 160, 160, 160, 0xff652e89, 0,
"qyIKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEK"
"lgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEK"
"lgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKQQpLCkEKSwqWAQqW"
@@ -6269,9 +6213,9 @@ static void test_draw_geometry(void)
"AQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqW"
"AQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQrLIwAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 320, 160, 160, 160, 0xff652e89, 0, "4GLAAuBi");
+ match = compare_figure(ctx.surface, 320, 160, 160, 160, 0xff652e89, 0, "4GLAAuBi");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 480, 160, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 480, 160, 160, 160, 0xff652e89, 0,
"qyIKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEK"
"lgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEK"
"lgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKSwpBCksKQQqWAQqWAQqW"
@@ -6280,7 +6224,7 @@ static void test_draw_geometry(void)
"AQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQrLIwAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 0, 320, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 0, 320, 160, 160, 0xff652e89, 0,
"rycCngECnQEEnAEEmwEGmgEGmQEImAEIlwEKlgEKlQEMlAEMkwEOkgEOkQEQkAEQjwESjgESjQEU"
"jAEUiwEKAgqKAQoCCokBCgQKiAEKBAqHAQoGCoYBCgYKhQEKCAqEAQoICoMBCgoKggEKCgqBAQoM"
"CoABCgwKfwoOCn4KDgp9ChAKfAoQCnsKEgp6ChIKeQoUCngKFAp3ChYKdgoWCnUKGAp0ChgKcwoa"
@@ -6289,7 +6233,7 @@ static void test_draw_geometry(void)
"CjYKVQo4ClQKOApTCjoKUgo6ClEKPApQCjwKTwo+Ck4KPgpNCkAKTApACksKQgpKCkIKSQpECkgK"
"RApHCkYKozIA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 320, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 160, 320, 160, 160, 0xff652e89, 0,
"ozIKRgpHCkQKSApECkkKQgpKCkIKSwpACkwKQApNCj4KTgo+Ck8KPApQCjwKUQo6ClIKOgpTCjgK"
"VAo4ClUKNgpWCjYKVwo0ClgKNApZCjIKWgoyClsKMApcCjAKXQouCl4KLgpfCiwKYAosCmEKKgpi"
"CioKYwooCmQKKAplCiYKZgomCmcKJApoCiQKaQoiCmoKIgprCiAKbAogCm0KHgpuCh4KbwocCnAK"
@@ -6298,7 +6242,7 @@ static void test_draw_geometry(void)
"CgIKiwEUjAEUjQESjgESjwEQkAEQkQEOkgEOkwEMlAEMlQEKlgEKlwEImAEImQEGmgEGmwEEnAEE"
"nQECngECrycA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 320, 320, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 320, 320, 160, 160, 0xff652e89, 0,
"rycCngECnQEEnAEEmwEGmgEGmQEImAEIlwEKlgEKlQEMlAEMkwEOkgEOkQEQkAEQjwESjgESjQEU"
"jAEUiwEKAgqKAQoCCokBCgQKiAEKBAqHAQoGCoYBCgYKhQEKCAqEAQoICoMBCgoKggEKCgqBAQoM"
"CoABCgwKfwoOCn4KDgp9ChAKfAoQCnsKEgp6ChIKeQoUCngKFAp3ChYKdgoWCnUKGAp0ChgKcwoa"
@@ -6307,7 +6251,7 @@ static void test_draw_geometry(void)
"CjYKVQo4ClQKOApTCjoKUgo6ClEKPApQCjwKTwo+Ck4KPgpNCkAKTApACksKQgpKCkIKSQpECkgK"
"RApHWkZagzEA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 480, 320, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 480, 320, 160, 160, 0xff652e89, 0,
"gzFaRlpHCkQKSApECkkKQgpKCkIKSwpACkwKQApNCj4KTgo+Ck8KPApQCjwKUQo6ClIKOgpTCjgK"
"VAo4ClUKNgpWCjYKVwo0ClgKNApZCjIKWgoyClsKMApcCjAKXQouCl4KLgpfCiwKYAosCmEKKgpi"
"CioKYwooCmQKKAplCiYKZgomCmcKJApoCiQKaQoiCmoKIgprCiAKbAogCm0KHgpuCh4KbwocCnAK"
@@ -6362,7 +6306,7 @@ static void test_draw_geometry(void)
ID2D1RectangleGeometry_Release(rect_geometry[1]);
ID2D1RectangleGeometry_Release(rect_geometry[0]);
- match = compare_figure(surface, 0, 0, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 0, 0, 160, 160, 0xff652e89, 0,
"vi5kPGQ8ZDxkPGQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
"FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
@@ -6370,7 +6314,7 @@ static void test_draw_geometry(void)
"FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8ZDxkPGQ8ZDxk3i8A");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 0, 320, 160, 0xff652e89, 32,
+ match = compare_figure(ctx.surface, 160, 0, 320, 160, 0xff652e89, 32,
"8XYGtQIOrAIXpAIfmwIokwIwigI4gwJA+gFJ8gFR6QEzAiXhATMKJdgBMxMl0AEzGyXHATMkJb8B"
"MysmtgEzNCWvATM8JaYBM0UlngEzTSWVATNWJY0BM14lhAEzZyV8M28lczN4JWszgAElYjOIASZa"
"M5ABJVgtmQElWCWhASVYJaEBJVgloQElWCWhASVYJaEBJVgloQElWCWhASVYJaEBJVglmQEtWCWQ"
@@ -6378,7 +6322,7 @@ static void test_draw_geometry(void)
"KzO/ASUkM8cBJRsz0AElEzPYASUKM+EBJQIz6QFR8gFJ+gFAgwI4igIwkwIomwIfpAIXrAIOtQIG"
"8XYA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 0, 160, 160, 320, 0xff652e89, 32,
+ match = compare_figure(ctx.surface, 0, 160, 160, 320, 0xff652e89, 32,
"ujEBngECnQEDnQEEmwEFmgEHmQEHmAEIlwEKlgEKlQELlAENkwENkgEOkQEQjwERjwESjQETjAEU"
"jAEKAQqKAQoCCokBCgMKiQEKBAqHAQoFCoYBCgYKhgEKBwqEAQoICoMBCgkKgwEKCgqBAQoLCoAB"
"Cg0KfgsNCn4KDgp9ChAKewsQCnsKEQp6ChMKeAoUCngKFAp3ChYKdQoXCnUKGApzChkKcgoaCnIK"
@@ -6397,7 +6341,7 @@ static void test_draw_geometry(void)
"CoMBCggKhAEKBwqGAQoGCoYBCgUKhwEKBAqJAQoDCokBCgIKigEKAQqMARSMARONARKPARGPARCR"
"AQ6SAQ2TAQ2UAQuVAQqWAQqXAQiYAQeZAQeaAQWbAQSdAQOdAQKeAQG6MQAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 160, 320, 320, 0xff652e89, 64,
+ match = compare_figure(ctx.surface, 160, 160, 320, 320, 0xff652e89, 64,
"82ICvQIEugIHuAIJtgIKtAINsgIPsAIRrQITrAIVqQIYpwIZpgIbowIeoQIgnwIhnQIkmwImmAIp"
"lgIVARSVAhUDFJICFQUVkAIVBxSPAhUJFIwCFQwUigIVDRWHAhYPFIYCFRIUhAIVFBSBAhUWFf8B"
"FRgU/gEVGhT7ARUcFfkBFR4U9wEWIBT1ARUjFPMBFSQV8AEVJxTvARUpFOwBFisU6gEVLRXoARUv"
@@ -6533,7 +6477,7 @@ static void test_draw_geometry(void)
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
ID2D1PathGeometry_Release(geometry);
- match = compare_figure(surface, 0, 0, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 0, 0, 160, 160, 0xff652e89, 0,
"vi5kPGQ8ZDxkPGQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
"FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
@@ -6541,7 +6485,7 @@ static void test_draw_geometry(void)
"FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8ZDxkPGQ8ZDxk3i8A");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 0, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 160, 0, 160, 160, 0xff652e89, 0,
"vi5kPGQ8ZDxkPGQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
"FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
@@ -6549,7 +6493,7 @@ static void test_draw_geometry(void)
"FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8ZDxkPGQ8ZDxk3i8A");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 320, 0, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 320, 0, 160, 160, 0xff652e89, 0,
"vi5kPGQ8ZDxkPGQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
"FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
@@ -6557,7 +6501,7 @@ static void test_draw_geometry(void)
"FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8ZDxkPGQ8ZDxk3i8A");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 480, 0, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 480, 0, 160, 160, 0xff652e89, 0,
"yC5aRlpGWjxkPGQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
"FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
@@ -6566,7 +6510,7 @@ static void test_draw_geometry(void)
"PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8ZDxkPGQ8ZDxk3i8A");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 0, 160, 160, 160, 0xff652e89, 64,
+ match = compare_figure(ctx.surface, 0, 160, 160, 160, 0xff652e89, 64,
"3SoDYAM6B1gHOgtQCzoPSA87EkASPBc2FzwcLBw8IiAiPWI+Yj5iPhQBOAEUPhQKJgoUPxQ4FEAU"
"OBRAFDgUQBQ4FEAUOBRBFDYUQhQ2FEIUNhRCFDYUQhQ2FEIUNhRDFDQURBQ0FEQUNBREFDQURBQ0"
"FEQUNBREFDQURBQ0FEQUNBREFDQURRQyFEYUMhRGFDIURhQyFEYUMhRGFDIURhQyFEYUMhRGFDIU"
@@ -6575,7 +6519,7 @@ static void test_draw_geometry(void)
"NhRCFDYUQhQ2FEEUOBRAFDgUQBQ4FEAUOBRAFDgUPxQKJgoUPhQBOAEUPmI+Yj5iPSIgIjwcLBw8"
"FzYXPBJAEjsPSA86C1ALOgdYBzoDYAPdKgAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 160, 160, 160, 0xff652e89, 1024,
+ match = compare_figure(ctx.surface, 160, 160, 160, 160, 0xff652e89, 1024,
"uxUBnwECngEDnQEEnAEFmwEGmwEGmgEHmQEImAEJlwEKlgELlQEMlQEMlAENkwEOkgEPkQEQkAER"
"VQQ2Ek0KOBJFEDkTPRY6FDUcOxUrJDwYHi09Yj5iP2BAQwkUQDgUFEAUOBRAFDcUQRQ3FEEUNxRC"
"FDYUQhQ2FEIUNhRCFDUUQxQ1FEMUNRRDFDUUQxQ1FEQUNBREFDQURBQ0FEQUNBREFDQURBQ0FEQU"
@@ -6586,7 +6530,7 @@ static void test_draw_geometry(void)
"NgRVEZABEJEBD5IBDpMBDZQBDJUBDJUBC5YBCpcBCZgBCJkBB5oBBpsBBpsBBZwBBJ0BA54BAp8B"
"AbsV");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 320, 160, 160, 160, 0xff652e89, 1024,
+ match = compare_figure(ctx.surface, 320, 160, 160, 160, 0xff652e89, 1024,
"pBYBngECnQEDnAEEmwEFmgEGmQEGmQEHmAEIlwEJlgEKlQELlAEMkwEMkwENkgEOkQEPkAEQNgRV"
"ETcKTRI4EEUSOhY9EzscNRQ8JCsVPS0eGD5iPmI/YEAUCUNAFBQ4QBQ4FEEUNxRBFDcUQRQ3FEEU"
"NhRCFDYUQhQ2FEMUNRRDFDUUQxQ1FEMUNRRDFDUUQxQ0FEQUNBREFDQURBQ0FEQUNBREFDQURBQ0"
@@ -6597,7 +6541,7 @@ static void test_draw_geometry(void)
"EVUENhCQAQ+RAQ6SAQ2TAQyTAQyUAQuVAQqWAQmXAQiYAQeZAQaZAQaaAQWbAQScAQOdAQKeAQGk"
"FgAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 480, 160, 160, 160, 0xff652e89, 64,
+ match = compare_figure(ctx.surface, 480, 160, 160, 160, 0xff652e89, 64,
"wCsDmQEHlQELkQEPSwJAEkgLNhc8HCwcPCIgIj1iPmI+Yj4UATgBFD4UCiYKFD8UOBRAFDgUQBQ4"
"FEAUOBRAFDgUQRQ2FEIUNhRCFDYUQhQ2FEIUNhRCFDYUQxQ0FEQUNBREFDQURBQ0FEQUNBREFDQU"
"RBQ0FEQUNBREFDQURBQ0FEUUMhRGFDIURhQyFEYUMhRGFDIURhQyFEYUMhRGFDIURhQyFEYUMhRG"
@@ -6607,7 +6551,7 @@ static void test_draw_geometry(void)
"QBI7D0gPOgtQCzoHWAc6A2AD3SoA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 0, 320, 160, 160, 0xff652e89, 64,
+ match = compare_figure(ctx.surface, 0, 320, 160, 160, 0xff652e89, 64,
"3SkmcThiRFdOTVhEICAgPhwsHDwXNhc8FDwUOxQ+FDoUPhQ6FD4UOhQ+FDoUPhQ5FEAUOBRAFDgU"
"QBQ4FEAUOBRAFDcUQhQ2FEIUNhRCFDYUQhQ2FEIUNhRCFDUURBQ0FEQUNBREFDQURBQ0FEQUNBRE"
"FDQURBQ0FEQUNBREFDQURBQzFEYUMhRGFDIURhQyFEYUMhRGFDIURhQyFEYUMhRGFDIURhQyFEYU"
@@ -6616,7 +6560,7 @@ static void test_draw_geometry(void)
"QhQ2FEIUNxRAFDgUQBQ4FEAUOBRAFDgUQBQ5FD4UOhQ+FDoUPhQ6FD4UOhQ+FDsUPBQ8FzYXPBws"
"HD4gICBEWE1OV0RiOHEm3SkA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 320, 160, 160, 0xff652e89, 1024,
+ match = compare_figure(ctx.surface, 160, 320, 160, 160, 0xff652e89, 1024,
"zykoczhkRVhQTlpEFx4tPRUrJDwUNRw7FDwVOxQ+FDoUPhQ5FEAUOBRAFDgUQBQ4FEAUOBRBFDcU"
"QRQ3FEEUNhRCFDYUQhQ2FEIUNhRDFDUUQxQ1FEMUNRRDFDUUQxQ0FEQUNBREFDQURBQ0FEQUNBRE"
"FDQURBQ0FEQUNBREFDQURBQ0FEQUMxRFFDMURRQzFEUUMxRFFDMURRQzFEUUMxRFFDMURRQzFEUU"
@@ -6625,7 +6569,7 @@ static void test_draw_geometry(void)
"QhQ2FEIUNhRCFDYUQRQ3FEEUNxRBFDgUQBQ4FEAUOBRAFDgUQBQ5FD4UOhQ+FDsVPBQ7HDUUPCQr"
"FT0tHhdEWk5QWEVkOHMozykA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 320, 320, 160, 160, 0xff652e89, 1024,
+ match = compare_figure(ctx.surface, 320, 320, 160, 160, 0xff652e89, 1024,
"6SkobThfRVNQSFpALR4XPSQrFTscNRQ7FTwUOhQ+FDoUPhQ5FEAUOBRAFDgUQBQ4FEAUNxRBFDcU"
"QRQ3FEEUNxRCFDYUQhQ2FEIUNRRDFDUUQxQ1FEMUNRRDFDUUQxQ1FEQUNBREFDQURBQ0FEQUNBRE"
"FDQURBQ0FEQUNBREFDQURBQ0FEQUNBRFFDMURRQzFEUUMxRFFDMURRQzFEUUMxRFFDMURRQzFEUU"
@@ -6634,7 +6578,7 @@ static void test_draw_geometry(void)
"QhQ2FEIUNhRCFDcUQRQ3FEEUNxRBFDcUQBQ4FEAUOBRAFDgUQBQ5FD4UOhQ+FDoUPBU7FDUcOxUr"
"JD0XHi1AWkhQU0VfOG0o6SkA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 480, 320, 160, 160, 0xff652e89, 64,
+ match = compare_figure(ctx.surface, 480, 320, 160, 160, 0xff652e89, 64,
"3SkmcThiRFdOTVhGHiAgRhQsHDwXNhc8FDwUOxQ+FDoUPhQ6FD4UOhQ+FDoUPhQ5FEAUOBRAFDgU"
"QBQ4FEAUOBRAFDcUQhQ2FEIUNhRCFDYUQhQ2FEIUNhRCFDUURBQ0FEQUNBREFDQURBQ0FEQUNBRE"
"FDQURBQ0FEQUNBREFDQURBQzFEYUMhRGFDIURhQyFEYUMhRGFDIURhQyFEYUMhRGFDIURhQyFEYU"
@@ -6713,7 +6657,7 @@ static void test_draw_geometry(void)
ID2D1TransformedGeometry_Release(transformed_geometry[1]);
ID2D1TransformedGeometry_Release(transformed_geometry[0]);
- match = compare_figure(surface, 0, 0, 160, 160, 0xff652e89, 128,
+ match = compare_figure(ctx.surface, 0, 0, 160, 160, 0xff652e89, 128,
"yjIJkQEHBwaIAQUSBYMBBBYEggEEFgSCAQQWBIIBBBYEggEEFgSCAQQWBIIBBBYEggEEFgSCAQQW"
"BIIBBBYEggEEFgSDAQQVBIMBBBUEgwEEFQSDAQQVBIMBBBUEgwEEFQSDAQQVBIMBBBUEgwEEFQSD"
"AQQVBIQBBBQEhAEEFASEAQQTBIUBBBMEhQEEEwSFAQQTBIUBBBMEhQEEEwSGAQQSBIYBBBIEhgEE"
@@ -6722,13 +6666,13 @@ static void test_draw_geometry(void)
"AQaaAQaaAQaaAQabAQWbAQWbAQWbAQWaAQeZAQeZAQeZAQiXAQQBBJYBBAMElQEEAwWRAQUGBY0B"
"BQwFhwEFEgSCAQUXBYABBBoFfgUYBIIBBhEFiAEUpTEA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 0, 320, 160, 0xff652e89, 512,
+ match = compare_figure(ctx.surface, 160, 0, 320, 160, 0xff652e89, 512,
"yJIBArkCDa4CGKMCIZoCK5ECM4gCO4ECQ/gBS/EBUesBLAYl5QEsDiPeASwWIdkBLBwh0wEsISHO"
"ASsgKMsBKR4vyAEnHDPIASUaNMsBIxg1mQEFMCIUN54BCygiDzijAREhIgY9qAEYGWGuAR4RXbMB"
"JAhbuQGAAcABesYBc84Ba9YBTvQBP4MCOIoCNI4CM5ACMZICL5QCLZYCK5kCKJsCJ54CI6MCHq8C"
"EraSAQAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 0, 160, 160, 320, 0xff652e89, 512,
+ match = compare_figure(ctx.surface, 0, 160, 160, 320, 0xff652e89, 512,
"xWkCmwEFmAEJlQELlAENkgEOkQEPjwESjQETjAEVigELAQqJAQsCCogBCwQKhwEKBQqGAQoGCoYB"
"CgcKhAEKCAqEAQoIC4IBCgoKggEKCgqBAQoMCoABCgwKfwoNCn8KDgp9Cg8KfQoPCnwKEQp7ChEK"
"egoSCnoKEwp4ChQKeAoUCncLFQp2ChYKdgoWCnYKFwp2ChYKdgoWCncKFgp2ChYKdgoWCncKFQt2"
@@ -6742,7 +6686,7 @@ static void test_draw_geometry(void)
"iQEKAgqJAQoCCooBCgIKiQEKAgqKAQoBCosBCgEKigEKAQqLARSMARSLARSMAROMARONARKOARGO"
"ARGPARCQAQ6RAQ2YAQTEZAAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 160, 320, 320, 0xff652e89, 1024,
+ match = compare_figure(ctx.surface, 160, 160, 320, 320, 0xff652e89, 1024,
"ytABA7gCCbICD60CFKkCF6cCGqMCHqACIZ0CJJoCJpgCKZUCFgIUkgIWBBWPAhYHFI4CFQoUjAIV"
"DBSKAhUNFYgCFQ8UhwIVERSFAhUTFIMCFRQVgQIUFxSAAhQZFP4BFBoV/AEUHBT7ARQeFPkBFB8V"
"9wEUIRT2ARQjFPQBFSMV8gEVJRTxARUnFPABFCgV7gEUKhTtARQsFOwBFCwV7AEULBTsARUsFOwB"
@@ -6762,7 +6706,6 @@ static void test_draw_geometry(void)
ID2D1RenderTarget_Release(rt);
refcount = ID2D1Factory_Release(factory);
ok(!refcount, "Factory has %u references left.\n", refcount);
- IDXGISurface_Release(surface);
release_test_context(&ctx);
}
@@ -6778,7 +6721,6 @@ static void test_fill_geometry(void)
D2D1_MATRIX_3X2_F matrix;
ID2D1GeometrySink *sink;
ID2D1RenderTarget *rt;
- IDXGISurface *surface;
ID2D1Factory *factory;
D2D1_ELLIPSE ellipse;
D2D1_COLOR_F color;
@@ -6790,9 +6732,7 @@ static void test_fill_geometry(void)
if (!init_test_context(&ctx))
return;
- hr = IDXGISwapChain_GetBuffer(ctx.swapchain, 0, &IID_IDXGISurface, (void **)&surface);
- ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
- rt = create_render_target(surface);
+ rt = create_render_target(ctx.surface);
ok(!!rt, "Failed to create render target.\n");
ID2D1RenderTarget_GetFactory(rt, &factory);
@@ -6827,25 +6767,25 @@ static void test_fill_geometry(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_figure(surface, 0, 160, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(ctx.surface, 0, 160, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 160, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(ctx.surface, 160, 160, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 320, 160, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(ctx.surface, 320, 160, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 480, 160, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 480, 160, 160, 160, 0xff652e89, 0,
"qDJQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFCoMgAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 0, 320, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(ctx.surface, 0, 320, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 320, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(ctx.surface, 160, 320, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 320, 320, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(ctx.surface, 320, 320, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 480, 320, 160, 160, 0xff652e89, 8,
+ match = compare_figure(ctx.surface, 480, 320, 160, 160, 0xff652e89, 8,
"yjIMjwEWhwEcggEgfiR6KHYscy5xMG40azZpOGc6ZTxjPmI+YUBfQl1EXERbRlpGWUhYSFdKVkpV"
"TFRMVExTTlJOUk5STlJOUVBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUU5STlJOUk5STlNMVExUTFVK"
"VkpXSFhIWUZaRltEXERdQl9AYT5iPmM8ZTpnOGk2azRuMHEucyx2KHokfiCCARyHARaPAQzKMgAA");
@@ -6885,37 +6825,37 @@ static void test_fill_geometry(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_figure(surface, 0, 0, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(ctx.surface, 0, 0, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 0, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(ctx.surface, 160, 0, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 320, 0, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(ctx.surface, 320, 0, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 480, 0, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 480, 0, 160, 160, 0xff652e89, 0,
"szI6YURZSlROUVBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUU5USllEYTqzMgAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 0, 160, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(ctx.surface, 0, 160, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 160, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(ctx.surface, 160, 160, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 320, 160, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(ctx.surface, 320, 160, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 480, 160, 160, 160, 0xff652e89, 2,
+ match = compare_figure(ctx.surface, 480, 160, 160, 160, 0xff652e89, 2,
"tjI0aDxhQlxGWEpVTFNOUk5RUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFFOUk5TTFVKWEZcQmA+ZzS2MgAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 0, 320, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(ctx.surface, 0, 320, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 320, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(ctx.surface, 160, 320, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 320, 320, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(ctx.surface, 320, 320, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 480, 320, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 480, 320, 160, 160, 0xff652e89, 0,
"sDJAWkxSUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFJMWkCwMgAA");
@@ -6955,37 +6895,37 @@ static void test_fill_geometry(void)
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
- match = compare_figure(surface, 0, 0, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(ctx.surface, 0, 0, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 0, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(ctx.surface, 160, 0, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 320, 0, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(ctx.surface, 320, 0, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 480, 0, 160, 160, 0xff652e89, 10,
+ match = compare_figure(ctx.surface, 480, 0, 160, 160, 0xff652e89, 10,
"yjIMjwEWhwEcggEgfiR6KHYscy5xMG40azZpOGc6ZTxjPmI+YUBfQl1EXERbRlpGWUhYSFdKVkpV"
"TFRMVExTTlJOUk5STlJOUVBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUU5STlJOUk5STlNMVExUTFVK"
"VkpXSFhIWUZaRltEXERdQl9AYT5iPmM8ZTpnOGk2azRuMHEucyx2KHokfiCCARyHARaPAQzKMgAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 0, 160, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(ctx.surface, 0, 160, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 160, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(ctx.surface, 160, 160, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 320, 160, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(ctx.surface, 320, 160, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 480, 160, 160, 160, 0xff652e89, 10,
+ match = compare_figure(ctx.surface, 480, 160, 160, 160, 0xff652e89, 10,
"uTIucDJsNmk4ZzplPGM+YUBgQF9CXkJdRFxEW0ZaRllIWEhXSlZKVkpWSlVMVExUTFRMU05STlJO"
"Uk5STlJOUk9QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFFPUU5STlJOUk5STlJOU0xU"
"TFRMVExVSlZKVkpWSldIWEhZRlpGW0RcRF1CXkJfQGBAYT5jPGU6ZzhpNmwycC65MgAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 0, 320, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(ctx.surface, 0, 320, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 320, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(ctx.surface, 160, 320, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 320, 320, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(ctx.surface, 320, 320, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 480, 320, 160, 160, 0xff652e89, 10,
+ match = compare_figure(ctx.surface, 480, 320, 160, 160, 0xff652e89, 10,
"vzIiczhhRldMUlBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUkxXRmA6cSS+MgAA");
@@ -7074,43 +7014,43 @@ static void test_fill_geometry(void)
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
ID2D1PathGeometry_Release(geometry);
- match = compare_figure(surface, 0, 0, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(ctx.surface, 0, 0, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 0, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(ctx.surface, 160, 0, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 320, 0, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(ctx.surface, 320, 0, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 480, 0, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(ctx.surface, 480, 0, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 0, 160, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(ctx.surface, 0, 160, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 160, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(ctx.surface, 160, 160, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 320, 160, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(ctx.surface, 320, 160, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 480, 160, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(ctx.surface, 480, 160, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 0, 320, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 0, 320, 160, 160, 0xff652e89, 0,
"7zMCngECnQEEnAEEmwEGmgEGmQEImAEIlwEKlgEKlQEMlAEMkwEOkgEOkQEQkAEQjwESjgESjQEU"
"jAEUiwEWigEWiQEYiAEYhwEahgEahQEchAEcgwEeggEegQEggAEgfyJ+In0kfCR7JnomeSh4KHcq"
"dip1LHQscy5yLnEwcDBvMm4ybTRsNGs2ajZpOGg4ZzpmOmU8ZDxjPmI+YUBgQF9CXkJdRFxEW0Za"
"RllIWEhXSlZKVUxUTFNOUk5RUKgy");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 320, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 160, 320, 160, 160, 0xff652e89, 0,
"qDJQUU5STlNMVExVSlZKV0hYSFlGWkZbRFxEXUJeQl9AYEBhPmI+YzxkPGU6ZjpnOGg4aTZqNms0"
"bDRtMm4ybzBwMHEuci5zLHQsdSp2KncoeCh5JnomeyR8JH0ifiJ/IIABIIEBHoIBHoMBHIQBHIUB"
"GoYBGocBGIgBGIkBFooBFosBFIwBFI0BEo4BEo8BEJABEJEBDpIBDpMBDJQBDJUBCpYBCpcBCJgB"
"CJkBBpoBBpsBBJwBBJ0BAp4BAu8z");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 320, 320, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 320, 320, 160, 160, 0xff652e89, 0,
"7zMCngECnQEEnAEEmwEGmgEGmQEImAEIlwEKlgEKlQEMlAEMkwEOkgEOkQEQkAEQjwESjgESjQEU"
"jAEUiwEWigEWiQEYiAEYhwEahgEahQEchAEcgwEeggEegQEggAEgfyJ+In0kfCR7JnomeSh4KHcq"
"dip1LHQscy5yLnEwcDBvMm4ybTRsNGs2ajZpOGg4ZzpmOmU8ZDxjPmI+YUBgQF9CXkJdRFxEW0Za"
"RllIWEhXSlZKVUxUTFNOUk5RUKgy");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 480, 320, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 480, 320, 160, 160, 0xff652e89, 0,
"qDJQUU5STlNMVExVSlZKV0hYSFlGWkZbRFxEXUJeQl9AYEBhPmI+YzxkPGU6ZjpnOGg4aTZqNms0"
"bDRtMm4ybzBwMHEuci5zLHQsdSp2KncoeCh5JnomeyR8JH0ifiJ/IIABIIEBHoIBHoMBHIQBHIUB"
"GoYBGocBGIgBGIkBFooBFosBFIwBFI0BEo4BEo8BEJABEJEBDpIBDpMBDJQBDJUBCpYBCpcBCJgB"
@@ -7162,18 +7102,18 @@ static void test_fill_geometry(void)
ID2D1RectangleGeometry_Release(rect_geometry[1]);
ID2D1RectangleGeometry_Release(rect_geometry[0]);
- match = compare_figure(surface, 0, 0, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 0, 0, 160, 160, 0xff652e89, 0,
"qDJQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFCoMgAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 0, 320, 160, 0xff652e89, 32,
+ match = compare_figure(ctx.surface, 160, 0, 320, 160, 0xff652e89, 32,
"sIMBA7cCDK8CFKYCHZ4CJJYCLY4CNYUCPv0BRvQBT+wBV+MBYNsBaNIBccoBecEBgQG6AYkBsQGS"
"AakBmgGgAaMBmAGrAY8BtAGHAbwBfsUBfcYBfcYBfcUBfsUBfcYBfcYBfcYBfcYBfcUBfr0BhgG0"
"AY8BrAGXAaMBoAGbAagBkgGwAYsBuAGCAcEBeskBcdIBadoBYOMBWOsBT/QBR/wBPoUCNowCLpUC"
"Jp0CHaYCFa4CDLcCBK+DAQAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 0, 160, 160, 320, 0xff652e89, 32,
+ match = compare_figure(ctx.surface, 0, 160, 160, 320, 0xff652e89, 32,
"+D0BngEDnQEDnAEEmwEGmgEGmQEHmAEJlwEJlgELlAEMkwENkwEOkQEPkAEQkAERjgESjQETjQEU"
"iwEVigEXiQEXiAEYhwEahgEahQEbhAEdggEeggEegQEgfyF/In0jfCR8JXomeSd5KHcpdip2K3Qs"
"cy5xL3EvcDFuMm4ybTRrNWs1ajdoOGg5ZjplO2U8Yz1iPmFAYEBfQV5DXUNcRVpGWkZZSFdJV0lW"
@@ -7184,7 +7124,7 @@ static void test_fill_geometry(void)
"KXgneSZ6JXwkfCN9In8hfyCBAR6CAR6CAR2EARuFARuFARqHARiIAReJAReKARWLARSNARONARKO"
"ARGQARCQAQ+RAQ6TAQ2TAQyUAQuWAQqWAQmYAQeZAQaaAQabAQScAQOdAQOeAQH4PQAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 160, 320, 320, 0xff652e89, 32,
+ match = compare_figure(ctx.surface, 160, 160, 320, 320, 0xff652e89, 32,
"sXkBvgIDvAIEugIHuAIJtgILswINsgIPrwISrQITrAIVqQIYpwIapQIbowIeoQIgngIjnAIkmwIm"
"mAIplgIqlQIskgIvkAIxjQIzjAI1igI3hwI5hgI7hAI9gQJA/wFB/QFE+wFG+QFI9gFK9QFM8wFO"
"8AFQ7wFS7AFV6gFX6AFY5gFb5AFd4gFf3wFh3gFj2wFm2QFn2AFp1QFs0wFu0QFvzwFyzQF0ygF3"
@@ -7312,70 +7252,70 @@ static void test_fill_geometry(void)
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
ID2D1PathGeometry_Release(geometry);
- match = compare_figure(surface, 0, 0, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 0, 0, 160, 160, 0xff652e89, 0,
"qDJQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFCoMgAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 0, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 160, 0, 160, 160, 0xff652e89, 0,
"qDJQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFCoMgAA");
- match = compare_figure(surface, 320, 0, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 320, 0, 160, 160, 0xff652e89, 0,
"qDJQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFCoMgAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 480, 0, 160, 160, 0xff652e89, 0,
+ match = compare_figure(ctx.surface, 480, 0, 160, 160, 0xff652e89, 0,
"qDJQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
"UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFCoMgAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 0, 160, 160, 160, 0xff652e89, 16,
+ match = compare_figure(ctx.surface, 0, 160, 160, 160, 0xff652e89, 16,
"qDICTAJQB0IHUQs4C1IRLBFSGxgbUk5STlNMVExUTFRMVExVSlZKVkpWSlZKVkpXSFhIWEhYSFhI"
"WEhYSFhIWEhYSFlGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZa"
"RllIWEhYSFhIWEhYSFhIWEhYSFhIV0pWSlZKVkpWSlZKVUxUTFRMVExUTFNOUk5SGxgbUhEsEVIL"
"OAtRB0IHUAJMAqgy");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 160, 160, 160, 0xff652e89, 16,
+ match = compare_figure(ctx.surface, 160, 160, 160, 160, 0xff652e89, 16,
"qDIBSwRQAkMKUQQ5EVIIKxtTDRkmVExUTFRMVEtVS1VLVkpWSlZKVklXSVdJV0lXSVhIWEhYSFhI"
"WEhYSFhIWEhYSFhIWUdZR1lHWUdZR1lHWUdZR1lHWUdZSFhIWUdZR1lHWUdZR1lHWUdZR1lHWUdZ"
"SFhIWEhYSFhIWEhYSFhIWEhYSFhJV0lXSVdJV0lWSlZKVkpWS1VLVUtUTFRMVExUJhkNUxsrCFIR"
"OQRRCkMCUARLAagy");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 320, 160, 160, 160, 0xff652e89, 16,
+ match = compare_figure(ctx.surface, 320, 160, 160, 160, 0xff652e89, 16,
"qDIESwFRCkMCUhE5BFIbKwhTJhkNVExUTFRMVUtVS1VLVUpWSlZKV0lXSVdJV0lXSVdIWEhYSFhI"
"WEhYSFhIWEhYSFhIWEdZR1lHWUdZR1lHWUdZR1lHWUdYSFhIWEdZR1lHWUdZR1lHWUdZR1lHWUdY"
"SFhIWEhYSFhIWEhYSFhIWEhYSFdJV0lXSVdJV0lXSlZKVkpVS1VLVUtVTFRMVExUDRkmUwgrG1IE"
"ORFSAkMKUQFLBKgy");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 480, 160, 160, 160, 0xff652e89, 16,
+ match = compare_figure(ctx.surface, 480, 160, 160, 160, 0xff652e89, 16,
"qDICTAJQB0IHUQs4C1IRLBFSGxgbUk5STlNMVExUTFRMVExVSlZKVkpWSlZKVkpXSFhIWEhYSFhI"
"WEhYSFhIWEhYSFlGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZa"
"RllIWEhYSFhIWEhYSFhIWEhYSFhIV0pWSlZKVkpWSlZKVUxUTFRMVExUTFNOUk5SGxgbUhEsEVIL"
"OAtRB0IHUAJMAqgy");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 0, 320, 160, 160, 0xff652e89, 16,
+ match = compare_figure(ctx.surface, 0, 320, 160, 160, 0xff652e89, 16,
"pCwYfixuOGNCWUxSUFBQT1JOUk5STlJOUk1UTFRMVExUTFRLVkpWSlZKVkpWSlZJWEhYSFhIWEhY"
"SFhIWEhYSFhIWEdaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpG"
"WkdYSFhIWEhYSFhIWEhYSFhIWEhYSVZKVkpWSlZKVkpWS1RMVExUTFRMVE1STlJOUk5STlJPUFBQ"
"UkxZQmM4bix+GKQs");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 320, 160, 160, 0xff652e89, 16,
+ match = compare_figure(ctx.surface, 160, 320, 160, 160, 0xff652e89, 16,
"liwZgQErcTllQ1xLVFBQUU9STlJNVExUTFRMVExVS1VLVUpWSlZKVkpXSVdJV0lXSVdIWEhYSFhI"
"WEhYSFhIWEhYSFhIWEdZR1lHWUdZR1lHWUdZR1lHWUdZR1hIWEdZR1lHWUdZR1lHWUdZR1lHWUdZ"
"R1hIWEhYSFhIWEhYSFhIWEhYSFhIV0lXSVdJV0lXSlZKVkpWSlVLVUtVTFRMVExUTFRNUk5ST1FQ"
"UFRLXENlOXErgQEZliwA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 320, 320, 160, 160, 0xff652e89, 16,
+ match = compare_figure(ctx.surface, 320, 320, 160, 160, 0xff652e89, 16,
"sSwZeytrOV9DVktRUE9RTlJOUk1UTFRMVExUS1VLVUtVS1ZKVkpWSVdJV0lXSVdJV0lYSFhIWEhY"
"SFhIWEhYSFhIWEhYSFlHWUdZR1lHWUdZR1lHWUdZR1lIWEhYSFlHWUdZR1lHWUdZR1lHWUdZR1lI"
"WEhYSFhIWEhYSFhIWEhYSFhIWElXSVdJV0lXSVdJVkpWSlZLVUtVS1VLVExUTFRMVE1STlJOUU9Q"
"UUtWQ185ayt7GbEs");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 480, 320, 160, 160, 0xff652e89, 16,
+ match = compare_figure(ctx.surface, 480, 320, 160, 160, 0xff652e89, 16,
"pCwYfixuOGNCWUxSUFBQT1JOUk5STlJOUk1UTFRMVExUTFRLVkpWSlZKVkpWSlZJWEhYSFhIWEhY"
"SFhIWEhYSFhIWEdaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpG"
"WkdYSFhIWEhYSFhIWEhYSFhIWEhYSVZKVkpWSlZKVkpWS1RMVExUTFRMVE1STlJOUk5STlJPUFBQ"
@@ -7451,19 +7391,19 @@ static void test_fill_geometry(void)
ID2D1TransformedGeometry_Release(transformed_geometry[1]);
ID2D1TransformedGeometry_Release(transformed_geometry[0]);
- match = compare_figure(surface, 0, 0, 160, 160, 0xff652e89, 32,
+ match = compare_figure(ctx.surface, 0, 0, 160, 160, 0xff652e89, 32,
"6DMNjgEWiAEahgEahgEahgEahgEahgEahgEahgEahgEahgEahgEahwEZhwEZhwEZhwEZhwEZhwEZ"
"hwEZhwEZhwEZiAEYiAEYiAEYiAEYiAEXiQEXiQEXiQEXigEWigEWigEWigEWigEWigEWigEWiwEU"
"jAEUjAEUjAEUjQESjgESjwEQkAEQkQEOkgENlAEMlQEKlgEKlwEImAEImQEHmQEGmwEFmwEEnQED"
"nQECngECngECnwEBnwEBnwEBnwEBnwEBnwECnQEDnQEDnQEEmwEFmgEHmQEHlwELkQERjAEXhgEd"
"hAEfgwEchgEXjwEMqTEA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 0, 320, 160, 0xff652e89, 32,
+ match = compare_figure(ctx.surface, 160, 0, 320, 160, 0xff652e89, 32,
"h58BBrYCDq0CF6QCIJwCKJMCMIwCNoUCPf8BQ/kBSPQBTu4BTe8BTPEBSfUBRvgBQf0BPYECOYUC"
"NIoCMI4CK+UBAS0W/AEHIwiPAgsaBZcCEAwIngIepAIaqAIWrAITsAIRsgIPtQIMtwILugIHwAIB"
"ypwB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 0, 160, 160, 320, 0xff652e89, 32,
+ match = compare_figure(ctx.surface, 0, 160, 160, 320, 0xff652e89, 32,
"wW4DnAEEmwEFmgEHmAEIlwEKlQELlAEMkwEOkQEPkAEQkAERjgESjgETjAEUjAEUiwEWigEWiQEX"
"iQEYhwEZhwEZhgEbhQEbhAEchAEdggEeggEeggEfgAEggAEggAEhgAEggAEggQEggAEggAEggQEg"
"gAEggQEfgQEfggEfgQEfgQEfggEfgQEfggEeggEfggEeggEegwEdgwEeggEegwEdgwEegwEdgwEd"
@@ -7474,7 +7414,7 @@ static void test_fill_geometry(void)
"AQ6SAQ2TAQ2SAQ2TAQ2TAQyTAQyUAQyUAQuUAQuVAQuUAQuVAQqWAQmWAQqWAQmXAQiXAQiYAQeY"
"AQeZAQWbAQSDZwAA");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 160, 320, 320, 0xff652e89, 32,
+ match = compare_figure(ctx.surface, 160, 160, 320, 320, 0xff652e89, 32,
"g90BBLkCCLYCC7ICDrACEa0CFKoCF6cCGqQCHKMCHqECIJ8CIpwCJJsCJpkCKJcCKZYCK5QCLZIC"
"L5ACMI8CMo0CNIsCNYoCN4gCOYcCOYYCO4QCPYICPoECQIACQYACQIECQIACQIECQIECQIECP4IC"
"P4ICP4ECP4ICP4ICPoMCPoMCPoMCPYQCPYMCPYQCPYQCPYQCPIUCPIUCPIUCO4YCO4YCOoYCO4YC"
@@ -7555,20 +7495,19 @@ static void test_fill_geometry(void)
ID2D1TransformedGeometry_Release(transformed_geometry[1]);
ID2D1TransformedGeometry_Release(transformed_geometry[0]);
- match = compare_figure(surface, 0, 0, 160, 160, 0xff652e89, 0, "gMgB");
+ match = compare_figure(ctx.surface, 0, 0, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 0, 320, 160, 0xff652e89, 0, "gJAD");
+ match = compare_figure(ctx.surface, 160, 0, 320, 160, 0xff652e89, 0, "gJAD");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 0, 160, 160, 320, 0xff652e89, 0, "gJAD");
+ match = compare_figure(ctx.surface, 0, 160, 160, 320, 0xff652e89, 0, "gJAD");
ok(match, "Figure does not match.\n");
- match = compare_figure(surface, 160, 160, 320, 320, 0xff652e89, 0, "gKAG");
+ match = compare_figure(ctx.surface, 160, 160, 320, 320, 0xff652e89, 0, "gKAG");
ok(match, "Figure does not match.\n");
ID2D1SolidColorBrush_Release(brush);
ID2D1RenderTarget_Release(rt);
refcount = ID2D1Factory_Release(factory);
ok(!refcount, "Factory has %u references left.\n", refcount);
- IDXGISurface_Release(surface);
release_test_context(&ctx);
}
@@ -7708,7 +7647,6 @@ static void test_layer(void)
ID2D1Factory *factory, *layer_factory;
struct d2d1_test_context ctx;
ID2D1RenderTarget *rt;
- IDXGISurface *surface;
ID2D1Layer *layer;
D2D1_SIZE_F size;
ULONG refcount;
@@ -7717,9 +7655,7 @@ static void test_layer(void)
if (!init_test_context(&ctx))
return;
- hr = IDXGISwapChain_GetBuffer(ctx.swapchain, 0, &IID_IDXGISurface, (void **)&surface);
- ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
- rt = create_render_target(surface);
+ rt = create_render_target(ctx.surface);
ok(!!rt, "Failed to create render target.\n");
ID2D1RenderTarget_GetFactory(rt, &factory);
@@ -7747,7 +7683,6 @@ static void test_layer(void)
ID2D1RenderTarget_Release(rt);
refcount = ID2D1Factory_Release(factory);
ok(!refcount, "Factory has %u references left.\n", refcount);
- IDXGISurface_Release(surface);
release_test_context(&ctx);
}
@@ -7759,7 +7694,6 @@ static void test_bezier_intersect(void)
ID2D1PathGeometry *geometry;
ID2D1GeometrySink *sink;
ID2D1RenderTarget *rt;
- IDXGISurface *surface;
ID2D1Factory *factory;
D2D1_COLOR_F color;
ULONG refcount;
@@ -7769,9 +7703,7 @@ static void test_bezier_intersect(void)
if (!init_test_context(&ctx))
return;
- hr = IDXGISwapChain_GetBuffer(ctx.swapchain, 0, &IID_IDXGISurface, (void **)&surface);
- ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
- rt = create_render_target(surface);
+ rt = create_render_target(ctx.surface);
ok(!!rt, "Failed to create render target.\n");
ID2D1RenderTarget_GetFactory(rt, &factory);
@@ -7816,7 +7748,7 @@ static void test_bezier_intersect(void)
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
ID2D1PathGeometry_Release(geometry);
- match = compare_figure(surface, 160, 120, 320, 240, 0xff652e89, 2048,
+ match = compare_figure(ctx.surface, 160, 120, 320, 240, 0xff652e89, 2048,
"aRQjIxRpYiIcHCJiXSwXFyxdWTQTEzRZVTsQEDtVUkIMDEJST0cKCkdPTUsICEtNSlEFBVFKSFUD"
"A1VIRlkBAVlGRFsBAVtEQlwCAlxCQFwEBFxAPl0FBV0+PF0HB108Ol4ICF46OV0KCl05N14LC143"
"Nl4MDF42NF8NDV80M14PD14zMV8QEF8xMF8REV8wL18SEl8vLWATE2AtLGAUFGAsK2EUFGErKWIV"
@@ -7866,7 +7798,7 @@ static void test_bezier_intersect(void)
ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
ID2D1PathGeometry_Release(geometry);
- match = compare_figure(surface, 160, 120, 320, 240, 0xff652e89, 2048,
+ match = compare_figure(ctx.surface, 160, 120, 320, 240, 0xff652e89, 2048,
"pQIZkgIrhAI5/QE/9gFH7wFO6wFS5wFW4gFb3gFf2wFi2AFl1gFn1AFp0gFszwFuzQFxywFyyQF1"
"xwF2xgF4xAF5xAF6wgF8wAF+vwF+vwF/vQGBAbwBggG7AYMBugGEAbkBhQG4AYYBtwGHAbcBiAG1"
"AYkBtAGKAbQBigGzAYsBswGMAbEBjQGxAY0BsQGOAa8BjwGvAZABrgGQAa4BkQGtAZEBrQGSAawB"
@@ -7889,7 +7821,6 @@ static void test_bezier_intersect(void)
ID2D1RenderTarget_Release(rt);
refcount = ID2D1Factory_Release(factory);
ok(!refcount, "Factory has %u references left.\n", refcount);
- IDXGISurface_Release(surface);
release_test_context(&ctx);
}
@@ -8164,7 +8095,7 @@ static void test_bitmap_surface(void)
D2D1_RENDER_TARGET_PROPERTIES rt_desc;
D2D1_BITMAP_PROPERTIES1 bitmap_desc;
ID2D1DeviceContext *device_context;
- IDXGISurface *surface, *surface2;
+ IDXGISurface *surface2;
D2D1_PIXEL_FORMAT pixel_format;
struct d2d1_test_context ctx;
IDXGIDevice *dxgi_device;
@@ -8192,9 +8123,7 @@ static void test_bitmap_surface(void)
}
/* DXGI target */
- hr = IDXGISwapChain_GetBuffer(ctx.swapchain, 0, &IID_IDXGISurface, (void **)&surface);
- ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
- rt = create_render_target(surface);
+ rt = create_render_target(ctx.surface);
ok(!!rt, "Failed to create render target.\n");
hr = ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1DeviceContext, (void **)&device_context);
@@ -8228,7 +8157,7 @@ static void test_bitmap_surface(void)
bitmap_desc.pixelFormat = bitmap_format_tests[i].original;
bitmap_desc.bitmapOptions = D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW;
- hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(device_context, surface, &bitmap_desc, &bitmap);
+ hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(device_context, ctx.surface, &bitmap_desc, &bitmap);
todo_wine_if(bitmap_format_tests[i].hr == WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT)
ok(hr == bitmap_format_tests[i].hr, "%u: unexpected hr %#x.\n", i, hr);
@@ -8246,7 +8175,7 @@ static void test_bitmap_surface(void)
}
/* A8 surface */
- hr = IDXGISurface_GetDevice(surface, &IID_IDXGIDevice, (void **)&dxgi_device);
+ hr = IDXGISurface_GetDevice(ctx.surface, &IID_IDXGIDevice, (void **)&dxgi_device);
ok(SUCCEEDED(hr), "Failed to get the device, hr %#x.\n", hr);
surface2 = create_surface(dxgi_device, DXGI_FORMAT_A8_UNORM);
@@ -8267,7 +8196,7 @@ static void test_bitmap_surface(void)
IDXGIDevice_Release(dxgi_device);
IDXGISurface_Release(surface2);
- hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(device_context, surface, NULL, &bitmap);
+ hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(device_context, ctx.surface, NULL, &bitmap);
ok(SUCCEEDED(hr), "Failed to create a bitmap, hr %#x.\n", hr);
pixel_format = ID2D1Bitmap1_GetPixelFormat(bitmap);
@@ -8325,7 +8254,6 @@ static void test_bitmap_surface(void)
ID2D1Device_Release(device);
IDXGIDevice_Release(dxgi_device);
- IDXGISurface_Release(surface);
/* DC target */
rt_desc.type = D2D1_RENDER_TARGET_TYPE_DEFAULT;
@@ -8442,9 +8370,7 @@ static void test_device_context(void)
ID2D1DeviceContext_Release(device_context);
/* DXGI target */
- hr = IDXGISwapChain_GetBuffer(ctx.swapchain, 0, &IID_IDXGISurface, (void **)&surface);
- ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
- rt = create_render_target(surface);
+ rt = create_render_target(ctx.surface);
ok(!!rt, "Failed to create render target.\n");
hr = ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1DeviceContext, (void **)&device_context);
@@ -8455,13 +8381,13 @@ static void test_device_context(void)
"Unexpected bitmap options %#x.\n", options);
hr = ID2D1Bitmap1_GetSurface(bitmap, &surface2);
ok(SUCCEEDED(hr), "Failed to get bitmap surface, hr %#x.\n", hr);
- ok(surface2 == surface, "Unexpected surface instance.\n");
+ ok(surface2 == ctx.surface, "Unexpected surface instance.\n");
IDXGISurface_Release(surface2);
ID2D1DeviceContext_BeginDraw(device_context);
hr = ID2D1Bitmap1_GetSurface(bitmap, &surface2);
ok(SUCCEEDED(hr), "Failed to get bitmap surface, hr %#x.\n", hr);
- ok(surface2 == surface, "Unexpected surface instance.\n");
+ ok(surface2 == ctx.surface, "Unexpected surface instance.\n");
IDXGISurface_Release(surface2);
ID2D1DeviceContext_EndDraw(device_context, NULL, NULL);
ID2D1Bitmap1_Release(bitmap);
@@ -8472,7 +8398,6 @@ static void test_device_context(void)
ID2D1DeviceContext_Release(device_context);
ID2D1RenderTarget_Release(rt);
- IDXGISurface_Release(surface);
/* WIC target */
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
@@ -9100,7 +9025,6 @@ static void test_dpi(void)
IWICImagingFactory *wic_factory;
struct d2d1_test_context ctx;
ID2D1Factory1 *factory;
- IDXGISurface *surface;
ID2D1Bitmap1 *bitmap;
float dpi_x, dpi_y;
HRESULT hr;
@@ -9135,8 +9059,6 @@ static void test_dpi(void)
return;
}
- hr = IDXGISwapChain_GetBuffer(ctx.swapchain, 0, &IID_IDXGISurface, (void **)&surface);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
device_context = create_device_context(factory, ctx.device);
ok(!!device_context, "Failed to create device context.\n");
@@ -9156,7 +9078,7 @@ static void test_dpi(void)
bitmap_desc.dpiY = create_dpi_tests[i].dpi_y;
bitmap_desc.bitmapOptions = D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW;
bitmap_desc.colorContext = NULL;
- hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(device_context, surface, &bitmap_desc, &bitmap);
+ hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(device_context, ctx.surface, &bitmap_desc, &bitmap);
/* Native accepts negative DPI values for DXGI surface bitmap. */
ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
@@ -9304,7 +9226,6 @@ static void test_dpi(void)
ok(dpi_y == dc_dpi_y, "Got unexpected dpi_y %.8e, expected %.8e.\n", dpi_y, dc_dpi_y);
ID2D1DeviceContext_Release(device_context);
- IDXGISurface_Release(surface);
ID2D1Factory1_Release(factory);
release_test_context(&ctx);
}
@@ -9316,7 +9237,6 @@ static void test_wic_bitmap_format(void)
D2D1_PIXEL_FORMAT format;
IWICBitmap *wic_bitmap;
ID2D1RenderTarget *rt;
- IDXGISurface *surface;
ID2D1Bitmap *bitmap;
unsigned int i;
HRESULT hr;
@@ -9336,9 +9256,7 @@ static void test_wic_bitmap_format(void)
if (!init_test_context(&ctx))
return;
- hr = IDXGISwapChain_GetBuffer(ctx.swapchain, 0, &IID_IDXGISurface, (void **)&surface);
- ok(hr == S_OK, "Failed to get buffer, hr %#x.\n", hr);
- rt = create_render_target(surface);
+ rt = create_render_target(ctx.surface);
ok(!!rt, "Failed to create render target.\n");
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
@@ -9368,7 +9286,6 @@ static void test_wic_bitmap_format(void)
IWICImagingFactory_Release(wic_factory);
CoUninitialize();
ID2D1RenderTarget_Release(rt);
- IDXGISurface_Release(surface);
release_test_context(&ctx);
}
--
2.20.1
2
1