1. 14 Mar, 2018 1 commit
    • Vlad Zahorodnii's avatar
      don't override m_canUseMipmaps · 4a3104bf
      Vlad Zahorodnii authored
      Summary:
      Seems like this override/assignment was introduced in edb0751c.
      
      Following that commit, 450be6a3 introduced `levels` param
      so we could tell whether mipmaps are going to be used. And it seems like this assignment
      hadn't been deleted in that commit.
      
      Reviewers: #kwin, fredrik
      
      Reviewed By: fredrik
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D11301
      4a3104bf
  2. 14 Feb, 2018 1 commit
  3. 13 Feb, 2018 1 commit
    • Alex Nemeth's avatar
      Added noise blur effect · cc0325af
      Alex Nemeth authored and Fredrik Höglund's avatar Fredrik Höglund committed
      Summary:
      Added the option to turn on noise behind the blurred area.
      The lowest strength value disables it completely, so it is optional and is disabled by default.
      
      Test Plan:
      Edit: this new screenshot shows the updated noise generation.
      Edit2: separated the screenshots so you can flick through them to clearly see the differences
      
      {F5694024}
      
      {F5694031}
      
      {F5694025}
      
      {F5694028}
      
      Reviewers: #kwin, #vdg, fredrik
      
      Reviewed By: #vdg, fredrik
      
      Subscribers: davidedmundson, matheusm, romangg, ivan, zzag, ngraham, kwin, #kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D10281
      cc0325af
  4. 25 Jan, 2016 1 commit
  5. 05 Nov, 2015 1 commit
    • Nick Shaforostoff's avatar
      optimize string operations · 3a8d7d86
      Nick Shaforostoff authored
      -use qstringliteral only when necessary (i.e. not in concat or comparison)
      -use qbytearray instead of qstring when dealing with latin1 input and output (glplatform)
      -use qstringref to extract numbers from strings (glplatform)
      -define qt_use_qstringbuilder to optimize all string concatenations
      -anidata: use ctor init lists, add windowType member initialization
      
      REVIEW: 125933
      3a8d7d86
  6. 11 May, 2015 1 commit
  7. 19 Feb, 2015 1 commit
  8. 18 Feb, 2015 1 commit
  9. 11 Feb, 2015 1 commit
    • Martin Flöser's avatar
      Fix glPixelStore in GLTexture::update · d344b6cc
      Martin Flöser authored
      Resetting glPixelStore is bound to the variable useUnpack, but setting
      was only bound to a subset of the checks going into useUnpack variable.
      This could cause an assert if one updated with a QImage not in format
      ARGB32_Premultiplied.
      
      REVIEW: 122521
      d344b6cc
  10. 07 Jan, 2015 1 commit
  11. 30 Dec, 2014 3 commits
  12. 14 Dec, 2014 4 commits
    • Fredrik Höglund's avatar
      Add support for GL_ARB_texture_storage · 74b65fcd
      Fredrik Höglund authored
      Use glTexStorage2D() to allocate storage for the texture. The structure
      of the resulting texture becomes immutable and the texture is always
      mipmap complete.  This allows the driver to skip the mipmap consistency
      checks when validating the texture at draw time.
      74b65fcd
    • Fredrik Höglund's avatar
      Add a levels parameter to the GLTexture ctor · 450be6a3
      Fredrik Höglund authored
      Prior to this commit we didn't know if mipmaps were going to be used
      when we created the GL texture, which meant that we couldn't tell the
      driver whether to allocate storage for mipmaps or not.
      
      This resulted in one of two things happening depending on the driver;
      either it would allocate storage for mipmaps that in most cases would
      never be used, or it wouldn't and would later be forced to reallocate
      the texture when mipmaps were added.
      
      By adding this parameter we can now explicitly tell the driver how
      many mipmap levels will be used.
      
      The parameter is only added to the non-image constructor for now. The
      image constructor is changed to only allocate a single level, which
      matches how textures created from images are used in kwin. This may
      need to be revisited in the future.
      450be6a3
    • Fredrik Höglund's avatar
      Make mipmap filters other than GL_LINEAR_MIPMAP_LINEAR work · ccf1bad4
      Fredrik Höglund authored
      GLTexture would set both the minification and magnification filters
      to GL_NEAREST if the texture filter was set to any mipmap filter other
      than GL_LINEAR_MIPMAP_LINEAR.
      ccf1bad4
    • Fredrik Höglund's avatar
      Don't generate mipmaps in GLTexture::bind() · aefadfaa
      Fredrik Höglund authored
      This code is broken in a number of different ways; firstly by assuming
      that the mipmaps need to be regenerated when the texture filter has
      changed. Secondly by preventing mipmaps from being specified by other
      means.
      
      This commit removes the code from bind() and adds a generateMipmaps()
      method instead.
      aefadfaa
  13. 26 Nov, 2014 4 commits
    • Fredrik Höglund's avatar
      Remove GLTexturePrivate::bind()/unbind() · 9d01ed16
      Fredrik Höglund authored
      These virtual methods are not reimplemented anywhere.
      9d01ed16
    • Fredrik Höglund's avatar
      Inline GLTexture::load(QImage) in the constructor · 4b9448db
      Fredrik Höglund authored
      This is the only place where it is called.
      
      There was also no need for this function to be virtual since it's not
      reimplemented anywhere.
      
      This also fixes the GLTexturePrivate being created only to be
      immediately deleted and replaced by a new GLTexturePrivate when the
      GLTexture(QImage) constructor was used.
      
      With this change the structure of the GLTexture effectively becomes
      immutable to the outside world; the contents of the texture images can
      change, but the texture images themselves cannot be reallocated.
      4b9448db
    • Fredrik Höglund's avatar
      Remove GLTexture::load(QPixmap) and load(QString) · 9c7720ab
      Fredrik Höglund authored
      These methods are only called from the GLTexture constructors,
      so inline them there.
      9c7720ab
    • Fredrik Höglund's avatar
      Remove GLTexturePrivate::convertToGLFormat() · 383a5ac3
      Fredrik Höglund authored
      QImage::Format_RGBA8888_Premultiplied is the equivalent of
      GL_RGBA/GL_UNSIGNED_BYTE, so use QImage::convertToFormat()
      instead.
      
      This commit also makes the texture upload code work correctly
      on big-endian systems.
      383a5ac3
  14. 25 Nov, 2014 1 commit
  15. 23 Nov, 2014 2 commits
  16. 22 Nov, 2014 3 commits
  17. 27 Sep, 2014 1 commit
  18. 14 Jul, 2014 1 commit
  19. 14 Apr, 2014 1 commit
    • Martin Flöser's avatar
      [kwinglutils] Improve cleanup handling · b8cc10ff
      Martin Flöser authored
      * add static cleanup handlers to GLTexturePrivate and GLRenderTarget
      * revert the runtime resolved features (e.g. RenderTargets are not
        supported once we run the cleanup code)
      * clear the extension lists
      * reset the version variables
      
      REVIEW: 117484
      b8cc10ff
  20. 10 Mar, 2014 1 commit
    • Martin Flöser's avatar
      [kwin] Remove the legacy OpenGL 1 compositing backend · c7d986c7
      Martin Flöser authored
      KWin already has a de facto OpenGL 2 dependency through QML. Combined
      with the fact that the OpenGL 1 backend is basically unmaintained and
      also unused, it's better to remove it for the new major release.
      
      This change includes:
       * Removal of cmake option KWIN_BUILD_OPENGL_1_COMPOSITING
       * Removal of KWIN_HAVE_OPENGL_1 compile option and all code
         ifdef'ed with it (partially removal of if-else constructs)
       * Removal of CompositingType::OpenGL1Compositing (flags are kept
         as a core flag should get introduced)
       * Driver recommendation for OpenGL1Compositing changed to XRender
         (should be evaluated whether the drivers can provide GL2)
       * Removal of configuration option "GLLegacy"
       * Removal of fooMatrix function in kwinglutils
       * Removal of ARBBlurShader
       * Removal of legacy code path in GLVertexBuffer
       * Removal of GLShaderManager::disable
       * if-blocks with ShaderManager::instance()->isValid() removed
      
      REVIEW: 116042
      c7d986c7
  21. 24 Feb, 2014 1 commit
  22. 08 Jan, 2014 1 commit
  23. 02 Dec, 2013 1 commit
  24. 23 Sep, 2013 1 commit
  25. 24 Jul, 2013 1 commit
  26. 13 Jun, 2013 1 commit
  27. 28 May, 2013 1 commit
    • Fredrik Höglund's avatar
      kwin: Add GLTexture::matrix() · 7a99b8c0
      Fredrik Höglund authored
      This method returns a matrix that transforms normalized or un-normalized
      texture coordinates, taking the texture target and y-inversion flag into
      account.
      7a99b8c0
  28. 11 Mar, 2013 2 commits
    • Martin Flöser's avatar
      Adding support for GL_EXT_texture_format_BGRA8888 in GLES · 9206f530
      Martin Flöser authored
      If extension is present texture format BGRA_EXT is used for loading
      textures from QImages.
      
      REVIEW: 109090
      9206f530
    • Martin Flöser's avatar
      OpenGLPaintRedirector updates textures directly · aa549f45
      Martin Flöser authored
      Ownership of decoration textures is moved from SceneOpenGL::Window to
      OpenGLPaintRedirector. The PaintRedirector is responsible for updating
      the textures whenever they change. For this GLTexture is extended by an
      update(QImage, QPoint) method which uses glTexSubImage2D to update only
      the changed parts.
      
      The big advantage compared to before is that if e.g. only a button is
      animated only the button part is updated instead of the complete deco
      part.
      aa549f45