Otherwise Gecko keeps it running when it is created via put_classid, and
it leaks everything due to holding a ref to it.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
When the plugin host is created, its only ref is being held by the element
it is associated with.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Currently this worked by luck because it is leaking; the element holding
it never releases it.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
lparam != 0 does not imply lparam_size is big enough for a MSG, so we
can end up manipulating memory past the end of the buffer.
Co-authored-by: Jacek Caban <jacek@codeweavers.com>
Store all incoming Wayland output state as pending and make it current
in a thread-safe way when the "done" event arrives. This enables other
threads, with proper locking, to safely read consistent and complete
Wayland output information.
Handle Wayland output events sent after process initialization,
and update the win32u display devices when handling these
events in the desktop window process.
Using TransformMatrixPoints is not needed and all values could
be taken from transformation matrix:
- ShearX from m11, m12
- ShearY from m21, m22
- Translation mdx, mdy
The result could be calculated by taking destination points values:
{{0.0, 0.0}, {1.0, 0.0}, {0.0, 1.0}}
and calculating it with GdipTransformMatrixPoints function:
dst_to_src_points[0].X = dst_to_src.matrix[4];
dst_to_src_points[0].Y = dst_to_src.matrix[5];
dst_to_src_points[1].X = dst_to_src.matrix[0] + dst_to_src.matrix[4];
dst_to_src_points[1].Y = dst_to_src.matrix[1] + dst_to_src.matrix[5];
dst_to_src_points[2].X = dst_to_src.matrix[2] + dst_to_src.matrix[4];
dst_to_src_points[2].Y = dst_to_src.matrix[3] + dst_to_src.matrix[5];
With previous implementation, every iteration pointer value was
calculated by taking row and column of the image.
It needs multiply calculation. With current implementation,
pointer value calculation, is replaced with iterator, which takes
next pixel data.
It improves efficiency by using addition instead of multiplication
for iterating through points data.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53947
Calculating transformation points and not using it it is a waste
of CPU time. With this patch the code was moved where it is used.
It is improving performance of GdipDrawImagePointsRect when
resampling is not needed.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53947