D23918: RFC: Drop Outputs class
Vlad Zahorodnii
noreply at phabricator.kde.org
Sat Sep 14 20:05:02 BST 2019
zzag added a comment.
In D23918#531302 <https://phabricator.kde.org/D23918#531302>, @gladhorn wrote:
> How would it be to only keep one vector of AbstractOutputs in Platform? Then there is no vector copying. A cast should in my opinion not be a memory intense operation in the first place, but just a change of how types are interpreted.
> In the sub-classes the outputs could then actually be cast as needed (in a convenience function, in case it's more than one or two places). Hopefully this would also reduce code duplication. Of course it only works if there is only one platform in use at a time (I assume that is the case right now already).
Hmm, that might one way to go. Its biggest disadvantage is that we'll have to put a few static_casts here and there as well that Platform would need to have some protected methods to alter private m_outputs field.
> Going one step further, for the public side of things, I'd prefer to use Output as name, instead of AbstractOutput. That there is a platform specific implementation should not matter for the consumer of the public API.
I think Roman just wanted AbstractOutput to be in line with AbstractClient. However, I agree that it's better to drop "Abstract" prefix.
REPOSITORY
R108 KWin
REVISION DETAIL
https://phabricator.kde.org/D23918
To: zzag, #kwin
Cc: gladhorn, anthonyfieroni, romangg, davidedmundson, alexeymin, kwin, LeGast00n, The-Feren-OS-Dev, sbergeron, jraleigh, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, crozbo, bwowk, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20190914/fd6f2846/attachment-0001.html>
More information about the kwin
mailing list