gdiplus: Improve performance of DrawImagePointsRect by avoid TransformMatrixPoints.
commitf898f206f63744a2cc696d2b9ef81b95816d31cd
authorBartosz Kosiorek <gang65@poczta.onet.pl>
Tue, 23 May 2023 02:39:33 +0000 (23 04:39 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Tue, 23 May 2023 20:19:30 +0000 (23 22:19 +0200)
tree75df7c51d8b357e032ce08e25f761a5be75dec37
parent382603afa751469e5a14c8e3ac1398c3bccbae7c
gdiplus: Improve performance of DrawImagePointsRect by avoid TransformMatrixPoints.

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];
dlls/gdiplus/graphics.c