graesslin added inline comments.

INLINE COMMENTS

> abstract_egl_backend.cpp:363
>      if (GLPlatform::instance()->isGLES()) {
> +
>          if (s_supportsARGB32 && (image.format() == QImage::Format_ARGB32 || 
> image.format() == QImage::Format_ARGB32_Premultiplied)) {

nitpick

> abstract_egl_backend.cpp:373-384
>              for (const QRect &rect : damage.rects()) {
> -                glTexSubImage2D(m_target, 0, rect.x(), rect.y(), 
> rect.width(), rect.height(),
> -                                GL_RGBA, GL_UNSIGNED_BYTE, 
> im.copy(rect).bits());
> +                auto scaledRect = QRect(rect.x() * scale, rect.y() * scale, 
> rect.width() * scale, rect.height() * scale);
> +                glTexSubImage2D(m_target, 0, scaledRect.x(), scaledRect.y(), 
> scaledRect.width(), scaledRect.height(),
> +                                GL_RGBA, GL_UNSIGNED_BYTE, 
> im.copy(scaledRect).bits());
>              }
>          }
>      } else {

I'm wondering whether the partial upload makes sense at all now. Maybe we 
should just upload the complete texture?

Note: I have vague ideas of using a texture upload thread.

> abstract_egl_backend.cpp:403
>      const QSize &size = image.size();
> +
>      // TODO: this should be shared with GLTexture(const QImage&, GLenum)

nitpick

REPOSITORY
  rKWIN KWin

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

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: davidedmundson, #plasma
Cc: graesslin, plasma-devel, kwin, lesliezhai, ali-mohamed, hardening, 
jensreuterberg, abetts, sebas

Reply via email to