D22150: [plugins/qpa] Implement native offscreen surface

Roman Gilg <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
romangg accepted this revision.
romangg added inline comments.
This revision is now accepted and ready to land.

INLINE COMMENTS

> sharingplatformcontext.cpp:85
>  {
> -    Window *window = static_cast<Window*>(surface);
> -    auto c = window->shellClient();
> -    if (!c) {
> -        qCDebug(KWIN_QPA) << "SwapBuffers called but there is no ShellClient";
> -        return;
> +    if (surface->surface()->surfaceClass() == QSurface::Window) {
> +        Window *window = static_cast<Window *>(surface);

You could check the opposite and return early. But not crucial.

> sharingplatformcontext.cpp:96
>      }
> -    qCDebug(KWIN_QPA) << "No default framebuffer object for internal window";
>      return 0;

Maybe put this debug line just inside window case in case fbo.isNull(), i.e. not remove but one line above. But not crucial.

> sharingplatformcontext.cpp:101
>  {
>      if (Window *window = dynamic_cast<Window*>(surface)) {
>          const auto &fbo = window->contentFBO();

qobject_cast?

REPOSITORY
  R108 KWin

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

To: zzag, #kwin, romangg
Cc: romangg, alexeymin, kwin, LeGast00n, sbergeron, jraleigh, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, crozbo, bwowk, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.