On Fri Sep 13 18:40:16 2024 +0000, Nikolay Sivov wrote:
> It looks to me that there won't be any way to retroactively apply fill
> mode later, once you have copied all the vertices. But I'm not sure
> what's the correct way would be here.
In my opinion the correct way would probably be populating a joint CDT from all the geometries and then erasing triangles depending on the fill_mode. However, this is a bigger undertaking and for the [bug](https://bugs.winehq.org/show_bug.cgi?id=51139) at hand it suffices to just concatenate all lists, since it seems the application uses the geometry groups for assembling glyphs to words and render them all at once. Due to the latter, there is no intersection between the different geometric entities.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6492#note_82177
Nikolay Sivov (@nsivov) commented about dlls/d2d1/geometry.c:
> HRESULT d2d_geometry_group_init(struct d2d_geometry *geometry, ID2D1Factory *factory,
> D2D1_FILL_MODE fill_mode, ID2D1Geometry **geometries, unsigned int geometry_count)
> {
> - unsigned int i;
> + unsigned int i, j;
> + struct d2d_geometry *other_geom;
> + D2D_MATRIX_3X2_F g, gplain;
> + size_t f_vertex_count, f_face_count, f_bezier_vertex_count, f_arc_vertex_count;
> + size_t o_vertex_count, o_face_count, o_bezier_count, o_bezier_face_count, o_arc_count, o_arc_face_count;
>
> + FIXME("Ignoring fill_mode=%#x!\n", fill_mode);
It looks to me that there won't be any way to retroactively apply fill mode later, once you have copied all the vertices. But I'm not sure what's the correct way would be here.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6492#note_82167
On Fri Sep 13 17:35:55 2024 +0000, Rémi Bernon wrote:
> Not sure what to say other than it's pretty arbitrary. Larger than
> common read sizes, to reduce the chances of having to call the callbacks
> multiple times, but otherwise nothing very interesting about it. Maybe
> it should even be a bit shorter to avoid wasting two 64k page instead of
> one though.
Right, guess it's something to test and optimise once all the code is in. Thanks
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6480#note_82153
On Fri Sep 13 17:38:30 2024 +0000, Rémi Bernon wrote:
> Actually looks like it's some leftover of an older version of the code,
> it's not doing that anymore even in later changes.
Woohoo, I helped :sweat_smile:
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6480#note_82152
On Fri Sep 13 17:35:55 2024 +0000, Rémi Bernon wrote:
> The stream context needs to be allocated on the PE side while the
> demuxer is a unix-side pointer. We could create a PE side object
> wrapping both, but that didn't feel very useful.
I was thinking about allocating each on their respective side adding the ctx alongside the handle in `wine/winedmo.h`. Might work, but it doesn't seem too pretty.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6480#note_82151
On Fri Sep 13 17:35:55 2024 +0000, Rémi Bernon wrote:
> That was to return the actual detected media size from the demuxer, in
> case it can figure it out better than the caller (which may also be
> unable to provide it).
Actually looks like it's some leftover of an older version of the code, it's not doing that anymore even in later changes.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6480#note_82148
On Fri Sep 13 16:51:13 2024 +0000, Emil Velikov wrote:
> Out of curiosity: why do we pass stream_size as pointer to an int,
> instead of an int directly?
> Sorry for the belated questions :bow:
That was to return the actual detected media size from the demuxer, in case it can figure it out better than the caller (which may also be unable to provide it).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6480#note_82147
On Fri Sep 13 16:43:58 2024 +0000, Emil Velikov wrote:
> Any chance we get an inline comment saying how `0x10000` was chosen?
Not sure what to say other than it's pretty arbitrary. Larger than common read sizes, to reduce the chances of having to call the callbacks multiple times, but otherwise nothing very interesting about it. Maybe it should even be a bit shorter to avoid wasting two 64k page instead of one though.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6480#note_82146
On Fri Sep 13 16:42:03 2024 +0000, Emil Velikov wrote:
> Out of curiosity: is the `stream_context` expected to have different
> life-time than `winedmo_demuxer`?
> Alternatively it seems cleaner to me to have the `stream_context`
> pointer within the `winedmo_demuxer` itself removing the rather uncommon
> read-back pointer from the destructor.
The stream context needs to be allocated on the PE side while the demuxer is a unix-side pointer. We could create a PE side object wrapping both, but that didn't feel very useful.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6480#note_82145