D28708: egl: encapsulate and share duplicated code

Vlad Zahorodnii <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
zzag added a comment.


  The removed TODO comments are about extending GLTexture's API. Ideally, one should be able to create/update a GLTexture object from the given raw pixel data. GLTexture tries to be smart and allocate immutable storage for the texture. The problem is that nothing prohibits a client to flip flop between client buffer types, e.g. in one frame wl-shm, and in another frame wl-drm. So, if immutable storage has been allocated for the texture, we need to re-create the GLTexture if the client has attached a buffer of different type than the current one. In general, this should not be a big problem, but given the current window pixmap abstractions, it's not easy to do. We need to re-work SceneOpenGLTexture or even better get rid of it before extending GLTexture.
  
  Anyway, I think we could merge the proposed code refactoring. However, please keep the TODO comments.

INLINE COMMENTS

> abstract_egl_backend.cpp:482-486
> +
>      m_size = size;
>      updateMatrix();
> +
> +    q->setYInverted(true);

I don't follow this change. setYInverted() must be called before updateMatrix(). Is there a reason why you swapped them?

> remoteaccess_manager.cpp:65
>  
> -void RemoteAccessManager::passBuffer(DrmOutput *output, DrmBuffer *buffer)
> +void RemoteAccessManager::passBuffer(DrmOutput *output, DrmSurfaceBuffer* gbmbuf)
>  {

Coding style: whitespace before `*`.

> remoteaccess_manager.h:48
>  
> -    void passBuffer(DrmOutput *output, DrmBuffer *buffer);
> +    void passBuffer(DrmOutput *output, DrmSurfaceBuffer* gbmbuf);
>  

Coding style: whitespace before `*`.

REPOSITORY
  R108 KWin

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

To: apol, #kwin
Cc: zzag, kwin, Orage, cacarry, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, mkulinski, ragreen, jackyalcine, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, apol, ahiemstra, 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.