https://issues.apache.org/ooo/show_bug.cgi?id=122923

Armin Le Grand <armin.le.gr...@me.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|CONFIRMED                   |ACCEPTED

--- Comment #4 from Armin Le Grand <armin.le.gr...@me.com> ---
ALG: Checked and identified. The change compared to 3.4.1 is that the
win-specific part uses GDI+ stuff for bitmap rendering now; so what happens is
that Gdiplus::Bitmap instances get created for low-level painting based on the
vcl Bitmap/BitmapEx classes. These instances are buffered, but thrown away
after some seconds (currently after not being used for 60 seconds or - of
course - when the Bitmap/BitmapEx it is based on is destroyed. This is needed
for better and faster bitmap painting, fast zooming in/out with decent scaling
quality, rotation, shear, etc.
I checked the converters which create the Gdiplus::Bitmap instances on demand.
These can be optimized for both cases (Bitmap and BitmapEx) by not using
SetPixel but instead the Gdiplus::BitmapData approach (see docu on the web).
Did that and the conversion gets much faster; for Bitmap I can even use memcpy
(per scanline, GDI images may be bottom-up and have aligmnents); this makes
these cases (big, non-24-bit images from scanners) much faster. For BitmapEx it
also gets much faster with an inner loop, but memcpy is not possible due to the
nature of BitmapEx having two sources of data: The Bitmap and the alpha channel
which need to be mixed into a single Gdiplus::Bitmap in this conversion (who
ever came up with this idea...?).
This change leads to roughly the same speed as before, and I am using the debug
version.
Both work well and fast, should be possible to apply this to AOO401. Doing some
more tests...

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
You are watching all bug changes.

Reply via email to