Age | Commit message (Collapse) | Author |
|
(*) Make all of it use a "Scoped" paradigm
(*) pass by value, no need to allocate on heap
(*) make all of the construction go via the *Access constructors, instead of it being some via the constructors and some via the Acquire*Access methods.
(*) take the Bitmap& by const& in the constructor, so we can avoid doing const_cast in random places.
Change-Id: Ie03a9145c0965980ee8df9a89b8714a425e18f74
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160293
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
(Second attempt at landing this)
Image formats and graphics APIs use alpha, not transparency,
so change our internal formats and data structures to work directly
with alpha, so we don't need to modify data before we push it to
graphics APIs.
Add a couple of new Color constants to make the intention
of the vcl code clearer.
Notes
(*) On macOS, tweaking the logic in CreateWithSalBitmapAndMask
to more accurately reflect the requirements of the
CGImageCreateWithMask function seems to fix some
tests.
(*) The vcl code does not properly support gradients
with transparency. So the previous code was wrong, and this
change is going to result in slightly different wrongness.
Change-Id: I9e21c2e98d88ecfdc5f75db13bd1ffff7c38db98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114168
Tested-by: Jenkins
Reviewed-by: Patrick Luby <plubius@neooffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
ever since
commit 4160be791daaef1a0c059a248f678cbad6408a69
Author: Caolán McNamara <caolanm@redhat.com>
Date: Tue Jan 10 20:55:31 2023 +0000
no more X11SalBitmap
Change-Id: I9dd55acdde6af1bf7501a71e92725ab739801b0b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154060
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
to ease the reading of code related to an upcoming patch to convert
transparency to alpha, since there is already a GetAlpha in Color.
Change-Id: I1af0f8f6dd94acfe4673c8556c7aff6c20da3f7a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145209
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...so that its TOOLS_WARN_EXCEPTION can be used in
comphelper/source/misc/logging.cxx in a follow-up commit. (And while at it,
rename from diangose_ex.h to the more appropriate diagnose_ex.hxx. The
comphelper module is sufficiently low-level for this immediate use case, so use
that at least for now; o3tl might be even more suitable but doesn't have a
Library until now. Also, for the immediate use case it would have sufficed to
only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION,
TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of
include/tools/diagnose_ex.h into an additional new
include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move
the complete include file as is.)
Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I02b42dc4a825e01363e36d6a82f78519e2c6dfe7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127294
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
So that we have fewer cases to deal with when we transition to
32-bit bitmaps.
(*) rename maMask to maAlphaMask, since now it is only being used
for alpha duties.
(*) drop mbAlpha and mbTransparent to simplify state management,
the only thing we need to check for alpha is if maAlphaMask is
non-empty.
Change-Id: I06252e38e950e846a94b4c2ba8ea763be17801fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111679
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Revert "convert internal bitmap formats transparency->alpha"
This reverts commit c181e510c5f5e74f1f6824b64637849aace9ae63.
and later fix up of
Revert "tdf#141504 qt5: ugly images"
This reverts commit e7424ff25a724ea5bb54b2282d5c3cbf74c92053.
a lot of places are still working int transparency values
and not opacity
Change-Id: I31342cdb76629acbaebfcdfa385407d3291fe06f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114150
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
We can cast the PixelFormat enum to int for the same information
and we can use the enum to reduce ambiguity when possible.
Change-Id: I6ea648139465568cdeb12e5f5f75c7b609365bf4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113188
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
since we have already removed the 4-bit internal bitmap formats.
Change-Id: Ie481aaa8e25642a47e30beb6f37e2d3beda304e9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113412
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
IRC chat:
<quikee[m]> noelgrandin: doesn't adding operator bool to Bitmap
has the same problem as Graphic and the reason why you dropped that
commit 7334034ae93b49fc93b5859a3c047a319d138282
"drop Graphic::operator bool"
<noelgrandin> quikee[m], hmmm, good point
<noelgrandin> maybe I should just drop both operator bool and
operator! in favor of IsEmpty
<quikee[m]> noelgrandin: I don't remember what the problem is I just
remembered we dropped it Graphic :) sure, dropping everything for
IsEmpty is probably the best
Change-Id: Ieae289cda64f0b8d8fdecd5ea9e6f2bb874ff4cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113163
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Image formats and graphics APIs use alpha, not transparency,
so change our internal formats and data structures to work directly
with alpha, so we don't need to modify data before we push it to
graphics APIs.
Change-Id: I537f77f79e83876be11d787901df42710d190842
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108919
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Split class functions into BitmapInfoAccess.cxx, BitmapReadAccess.cxx
and BitmapWriteAccess.cxx
Split header files into BitmapInfoAccess.hxx and BitmapReadAccess.hxx
Change-Id: I7dcbe1d26c5b64d297658a6b809c93d7ad7f053d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108039
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
since
commit 77809fba7d4bf5e0b604ffa3937c18d5530c2d56
Author: Luboš Luňák <l.lunak@collabora.com>
Date: Fri Oct 9 19:28:49 2020 +0200
implement ImplFastBitmapConversion() for 8bit gray source
Change-Id: I730aef10c1705ae6d3141014228cf79b8bfa3c63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105305
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Idc808459b403bcdcccbd86b73dd22b424e507c8e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98897
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
It's much simpler and more performant to work with 8bpp bytes
rather than fiddle with 1bpp bits, and the memory savings don't
really matter nowadays. E.g. the soft edges feature performs
much worse when operating on 1bpp bitmaps (tdf#134237).
I've looked and it seems nothing in LO code actually requires
bitmap masks to really be 1bpp. As a next step we could perhaps
also leave antiquity and embrace the past by dropping 1bpp masks
entirely and using just alpha masks.
The change also moves the workaround for #i75531, it was breaking
CppunitTest_vcl_svm_test and X11-related hacks belong to the X11
code (especially with the X11 backend becoming more and more niche).
Change-Id: I7848f06c8b83bbad2ea35f17f2b65855f8d1f456
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97839
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
none of our supported hardware uses these any more
Change-Id: Ic95d6df619a05df0bec1f5870596cb2bb3bcc6cb
Reviewed-on: https://gerrit.libreoffice.org/79476
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...between adjacent switch labels without any intervening statements
Change-Id: Ieb8a0d9f71ea4382b5f7d005cdf7111d06aeb5d0
Reviewed-on: https://gerrit.libreoffice.org/64789
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I910366753d1d365e0388262c98fca12d000e83e5
Reviewed-on: https://gerrit.libreoffice.org/61979
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Automatic rewrite (of loplugin:cstylecast and loplugin:unnecessaryparen) after
cab0427cadddb3aaf1349c66f2fa13a4234ba4b2 "Enable loplugin:cstylecast for some
more cases" and a409d32e7f6fc09e041079d6dbc3c927497adfed "More
loplugin:cstylecast"
Change-Id: Ib3355159dd08333e1b7a8d091caf2069cdcc7862
Reviewed-on: https://gerrit.libreoffice.org/48317
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I8c81444cbecdc103cc47d9a4133b0b4d9010e0c2
Reviewed-on: https://gerrit.libreoffice.org/34018
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I3e4f9ccbe608a98759f2a9e312839eb909e6b575
Reviewed-on: https://gerrit.libreoffice.org/29878
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Remove L from integer literals in module canvas all 0L, 1L, 2L , 7L and 8L
Change-Id: Idd41a31857b4bb58ed8e7b6f4e727a73806098b1
Reviewed-on: https://gerrit.libreoffice.org/27817
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
|
|
Change-Id: I751ab762b6e6f961e9e73a8a2ca92a3f5a5eb1c8
Reviewed-on: https://gerrit.libreoffice.org/25189
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
|