<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>De :</b> Tomaž Vajngerl <quikee@gmail.com><br>
<b>Envoyé :</b> mardi 12 novembre 2019 10:03<br>
<b>À :</b> Adrien Ollier <adr.ollier@hotmail.fr><br>
<b>Cc :</b> libreoffice@lists.freedesktop.org <libreoffice@lists.freedesktop.org><br>
<b>Objet :</b> Re: VclPtr<VirtualDevice> attribute in the OutputDevice class</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>Hi Adrien,<br>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Tue, Nov 12, 2019 at 7:54 AM Adrien Ollier <<a href="mailto:adr.ollier@hotmail.fr">adr.ollier@hotmail.fr</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
Hello everybody,<br>
<br>
<br>
In the /core/include/vcl/outdev.hxx file, at line 331 we can see the <br>
attribute mpAlphaVDev which is of type VclPtr<VirtualDevice>. And the <br>
comment at line 330 is "TEMP TEMP TEMP".<br>
<br>
</blockquote>
<div><br>
</div>
<div>
<blockquote style="border-color: rgb(200, 200, 200); border-left: 3px solid rgb(200, 200, 200); padding-left: 1ex; margin-left: 0.8ex; color: rgb(102, 102, 102);">
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.
<br>
</blockquote>
</div>
<div> </div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
Does someone know what this attribute is for?<br>
<br>
</blockquote>
<div><br>
</div>
<div>
<blockquote style="border-color: rgb(200, 200, 200); border-left: 3px solid rgb(200, 200, 200); padding-left: 1ex; margin-left: 0.8ex; color: rgb(102, 102, 102);">
It's for the alpha channel of the VirtualDevice to make the it support transparency.
<br>
</blockquote>
</div>
<div> </div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
Using opengrok, when I search for mpAlphaVDev <br>
(<a href="https://opengrok.libreoffice.org/s?refs=mpAlphaVDev&project=core" rel="noreferrer" target="_blank">https://opengrok.libreoffice.org/s?refs=mpAlphaVDev&project=core</a>), I
<br>
see that the pointer is created when the OutputDevice is a VirtualDevice <br>
(in /core/vcl/source/gdi/virdev.cxx at line 367), and I couldn't find <br>
any other line where mpAlphaVDev is instanciated.<br>
</blockquote>
<div> </div>
<div>
<blockquote style="border-color: rgb(200, 200, 200); border-left: 3px solid rgb(200, 200, 200); padding-left: 1ex; margin-left: 0.8ex; color: rgb(102, 102, 102);">
Instantiated in one place, yes, but it is used all over OutputDevice drawing code.<br>
</blockquote>
</div>
<div><br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
Can someone confirm this? If that is true, at least the attribute should <br>
be moved in the VirtualDevice class. But I can't understand the reason <br>
to be of this attribute. Should not it be purely and simply removed?<br>
</blockquote>
<div><br>
</div>
<blockquote style="border-color: rgb(200, 200, 200); border-left: 3px solid rgb(200, 200, 200); padding-left: 1ex; margin-left: 0.8ex; color: rgb(102, 102, 102);">
<div>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.</div>
</blockquote>
<div>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.</div>
<div>
<blockquote style="border-color: rgb(200, 200, 200); border-left: 3px solid rgb(200, 200, 200); padding-left: 1ex; margin-left: 0.8ex; color: rgb(102, 102, 102);">
What could be removed is that "TEMP TEMP TEMP" comment. <br>
</blockquote>
</div>
<div><br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
Best regards,<br>
<br>
Adrien Ollier</blockquote>
<div><br>
</div>
<blockquote style="border-color: rgb(200, 200, 200); border-left: 3px solid rgb(200, 200, 200); padding-left: 1ex; margin-left: 0.8ex; color: rgb(102, 102, 102);">
<div>Best Regards, <br>
</div>
<div>Tomaž Vajngerl <br>
</div>
</blockquote>
<div><br>
</div>
<div>Best regards,</div>
<div>Adrien Ollier<br>
</div>
</div>
</div>
</div>
</div>
</body>
</html>