D27980: make opengl module support multiple dri devices

Aleix Pol Gonzalez noreply at phabricator.kde.org
Thu Apr 2 15:47:01 BST 2020


apol added inline comments.

INLINE COMMENTS

> opengl.cpp:281
> +    if (ReadPipe("sysctl -n hw.dri.0.name", pci_info)) {
> +        DriInfo info{};
> +        info.module = pci_info[0].mid(0, pci_info[0].indexOf(0x20));

the {} isn't necessary here.

> opengl.cpp:290
>  
> -static bool get_dri_device() { return false; }
> +static QVector<DriInfo> get_dri_devices() { return QVector<DriInfo>(); }
>  

return {}

> opengl.cpp:625
> +                for (const auto &info : infos) {
> +                    l3 = nullptr;
> +                    l3 = newItem(l2, l3, info.deviceId);

setting twice in a row? I'd skip setting a nullptr.

REPOSITORY
  R102 KInfoCenter

REVISION DETAIL
  https://phabricator.kde.org/D27980

To: sitter
Cc: pino, zzag, apol, adridg, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20200402/35bb6479/attachment-0001.html>


More information about the Plasma-devel mailing list