________________________________
De : Tomaž Vajngerl <quikee@gmail.com>
Envoyé : mardi 12 novembre 2019 10:03
À : Adrien Ollier <adr.ollier@hotmail.fr>
Cc : libreoffice@lists.freedesktop.org <libreoffice@lists.freedesktop.org>
Objet : Re: VclPtr<VirtualDevice> attribute in the OutputDevice class
Hi Adrien,
On Tue, Nov 12, 2019 at 7:54 AM Adrien Ollier <adr.ollier@hotmail.fr<mailto:adr.ollier@hotmail.fr>>
wrote:
Hello everybody,
In the /core/include/vcl/outdev.hxx file, at line 331 we can see the
attribute mpAlphaVDev which is of type VclPtr<VirtualDevice>. And the
comment at line 330 is "TEMP TEMP TEMP".
That's one of those permanent temporary variables that was intended to be removed in a week, but is
still in the code after a decade.
Does someone know what this attribute is for?
It's for the alpha channel of the VirtualDevice to make the it support transparency.
Using opengrok, when I search for mpAlphaVDev
(https://opengrok.libreoffice.org/s?refs=mpAlphaVDev&project=core), I
see that the pointer is created when the OutputDevice is a VirtualDevice
(in /core/vcl/source/gdi/virdev.cxx at line 367), and I couldn't find
any other line where mpAlphaVDev is instanciated.
Instantiated in one place, yes, but it is used all over OutputDevice drawing code.
Can someone confirm this? If that is true, at least the attribute should
be moved in the VirtualDevice class. But I can't understand the reason
to be of this attribute. Should not it be purely and simply removed?
No, we can't just remove it just yet. The code needs to be changed so it supports native alpha of
our backend surfaces, but that's quite a lot of very careful work. I'm writing various tests in VCL
just so this could be safely implemented without breaking anything.
OK. Do the changes need mpAlphaVDev? If yes, what I have to do is simple: move mpAlphaVDev in the
VirtualDevice class and make every OutputDevice function that uses mpAlphaVDev virtual and
reimplement them in the VirtualDevice class. If no, I guess it will be removed at end.
What could be removed is that "TEMP TEMP TEMP" comment.
Best regards,
Adrien Ollier
Best Regards,
Tomaž Vajngerl
Best regards,
Adrien Ollier
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.