1. 03 Nov, 2020 1 commit
    • David Edmundson's avatar
      Drop QGraphicsView classes in PaintData · 3d43f8ad
      David Edmundson authored
      QGraphicsRotation and Scale are QObject wrappers. It's not useful in
      data structures where we're creating mulitple of these every frame. It's
      large enough to appear in hotspot as taking over 1% of a regular frame.
      
      We don't even use the QGraphicsRotation mapping inside scene for a
      reason, so it's not giving us much.
      
      It's technically an API break in libkwineffects. Pragamatically no-one
      would use these. We also lose QGraphicsScale's origin, but we never
      exposed this in PaintData's public header.
      3d43f8ad
  2. 01 Nov, 2020 2 commits
  3. 12 Oct, 2020 2 commits
  4. 22 Sep, 2020 1 commit
  5. 18 Sep, 2020 1 commit
  6. 15 Sep, 2020 1 commit
    • Aleix Pol Gonzalez's avatar
      Make WindowQuadList a QVector · 651b0df3
      Aleix Pol Gonzalez authored
      In my last profiling session I did see a lot of WindowQuadList creation
      cost. We know QList is a bit more expensive, so let's just use QVector.
      651b0df3
  7. 26 Aug, 2020 1 commit
  8. 07 Aug, 2020 2 commits
    • Vlad Zahorodnii's avatar
      Prettify license headers · 4ce853e8
      Vlad Zahorodnii authored
      4ce853e8
    • Vlad Zahorodnii's avatar
      Switch to SPDX license markers · 1fb9f6f1
      Vlad Zahorodnii authored
      The main advantage of SPDX license identifiers over the traditional
      license headers is that it's more difficult to overlook inappropriate
      licenses for kwin, for example GPL 3. We also don't have to copy a
      lot of boilerplate text.
      
      In order to create this change, I ran licensedigger -r -c from the
      toplevel source directory.
      1fb9f6f1
  9. 02 Aug, 2020 1 commit
  10. 30 Apr, 2020 1 commit
  11. 20 Apr, 2020 1 commit
    • Méven Car's avatar
      Wayland: Allow to take single screen screenshots using scale factor without loss · 66898e7f
      Méven Car authored
      Summary:
      The screenshot made on screens with scale factor were downscaled by their scale factor making them blurry.
      It prevents taking screenshots of missing Hidpi related bugs showing the issues under Wayland.
      
      This fix the case of a single screenshot, but not the rest:
      Multiscreen screenshot downscales the screen using scale factor.
      Spectacle rectangular selection screenshot is broken as soon as some scale factor different than 1 is used on any screen.
      
      Test Plan:
      Under Wayland with a scale factor on a screen, take a screenshot using spectacle.
      The output image is not downscaled and has the same size as the screen resolution.
      
      No other change to any other screenshot mode, or under X.
      
      Reviewers: davidedmundson, #kwin
      
      Reviewed By: davidedmundson, #kwin
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D29010
      66898e7f
  12. 27 Mar, 2020 1 commit
    • Vlad Zahorodnii's avatar
      [kwineffects] Drop KWIN_GL_DEBUG · bdd68827
      Vlad Zahorodnii authored
      Summary:
      It has been broken for many years and no one has filed bug
      reports about it (besides me).
      
      BUG: 419285
      
      Test Plan: Ran kwin with KWIN_GL_DEBUG and it still works.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D28332
      bdd68827
  13. 04 Mar, 2020 1 commit
  14. 22 Feb, 2020 4 commits
    • Nicolas Fella's avatar
      Revert "[kcm/effects] Clip ListView" · 7159684c
      Nicolas Fella authored
      Bad merge
      
      This reverts commit b7130442.
      7159684c
    • Nicolas Fella's avatar
      [kcm/effects] Clip ListView · b7130442
      Nicolas Fella authored
      Summary:
      Otherwise the content overflows the frame when scrolling.
      
      QQC2 scrollview docs say "ScrollView does not automatically clip its contents. If it is not used as a full-screen item, you should consider setting the clip property to true"
      
      Test Plan:
      Before:
      {F8121150}
      
      After:
      {F8121152}
      
      Reviewers: #kwin, #plasma, ngraham
      
      Reviewed By: ngraham
      
      Subscribers: ngraham, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D27558
      b7130442
    • Nicolas Fella's avatar
      Revert "[kcm/effects] Clip ListView" · cdc5ea19
      Nicolas Fella authored
      Bad merge
      
      This reverts commit 5babf52d.
      cdc5ea19
    • Nicolas Fella's avatar
      [kcm/effects] Clip ListView · 5babf52d
      Nicolas Fella authored
      Summary:
      Otherwise the content overflows the frame when scrolling.
      
      QQC2 scrollview docs say "ScrollView does not automatically clip its contents. If it is not used as a full-screen item, you should consider setting the clip property to true"
      
      Test Plan:
      Before:
      {F8121150}
      
      After:
      {F8121152}
      
      Reviewers: #kwin, #plasma, ngraham
      
      Reviewed By: ngraham
      
      Subscribers: ngraham, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D27558
      5babf52d
  15. 12 Feb, 2020 1 commit
  16. 14 Jan, 2020 1 commit
  17. 27 Nov, 2019 1 commit
  18. 01 Nov, 2019 1 commit
    • David Edmundson's avatar
      [effects] Add effect to hold the desktop window static after plasmashell quits · e4ac215f
      David Edmundson authored
      Summary:
      When a plasma session quits, the order of plasmashell and clients quitting is undetermined.
      
      This looks bad as our desktop background disappears quite early. Rather than changing the real order, we can have kwin reference the last pixmap of any desktop and hold on to it.
      
      Lasting till the compositor quits means it stays on the X frontbuffer till X quits and the experience is seamless.
      
      Test Plan: Logged out (with relevant other ksmserver patches)
      
      Reviewers: #kwin, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: zzag, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D24864
      e4ac215f
  19. 30 Oct, 2019 1 commit
    • Albert Astals Cid's avatar
      Add some const & · e144748c
      Albert Astals Cid authored
      Summary:
      Won't make things go much faster since everything that was
      being passed by value is refcounted but still const & is a bit faster
      than refcounting
      
      For shared pointers instead of adding const & we move them into the
      destination variable saving some cpu usage but at the same time making
      clear the pointer is being stored by not being const &
      
      Reviewers: zzag
      
      Reviewed By: zzag
      
      Subscribers: zzag, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D25022
      e144748c
  20. 29 Sep, 2019 1 commit
  21. 27 Sep, 2019 1 commit
    • David Edmundson's avatar
      [libkwineffects] Introduce API to easily show a QtQuick scene in an effect · 40b0296d
      David Edmundson authored
      Summary:
      EffectQuickView/Scene is a convenient class to render a QtQuick
      scenegraph into an effect.
      
      Current methods (such as present windows) involve creating an underlying
      platform window which is expensive, causes a headache to filter out
      again in the rest of the code, and only works as an overlay.
      
      The new class exposes things more natively to an effect where we don't
      mess with real windows, we can perform the painting anywhere in the view
      and we don't have issues with hiding/closing.
      
      QtQuick has both software and hardware accelerated modes, and kwin also
      has 3 render backends. Every combination is supported.
      
      * When used in OpenGL mode for both, we render into an FBO export the
      texture ID then it's up to the effect to render that into a scene.
      
      * When using software QtQuick rendering we blit into an image, upload
      that into a KWinGLTexture which serves as an abstraction layer and
      render that into the scene.
      
      * When using GL for QtQuick and XRender/QPainter in kwin everything is
      rendered into the internal FBO, blit and exported as an image.
      
      * When using software rendering for both an image gets passed directly.
      
      Mouse and keyboard events can be forwarded, only if the effect
      intercepts them.
      
      The class is meant to be generic enough that we can remove all the
      QtQuick code from Aurorae.
      
      The intention is also to replace EffectFrameImpl using this backend and
      we can kill all of the EffectFrame code throughout the scenes.
      
      The close button in present windows will also be ported to this,
      simplifiying that code base.
      
      Classes that handle the rendering and handling QML are intentionally
      split so that in the future we can have a declarative effects API create
      overlays from within the same context. Similar to how one can
      instantiate windows from a typical QML scene.
      
      Notes:
      I don't like how I pass the kwin GL context from the backends into the
      effect, but I need something that works with the library separation. It
      also currently has wayland problem if I create a QOpenGLContext before
      the QPA is set up with a scene - but I don't have anything better?
      
      I know for the EffectFrame we need an API to push things through the
      effects stack to handle blur/invert etc. Will deal with that when we
      port the EffectFrame.
      
      Test Plan: Used in an effect
      
      Reviewers: #kwin, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: zzag, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D24215
      40b0296d
  22. 26 Sep, 2019 1 commit
  23. 14 Sep, 2019 1 commit
  24. 06 Sep, 2019 1 commit
  25. 31 Aug, 2019 1 commit
    • Vlad Zahorodnii's avatar
      Switch to Q_ASSERT · 7a3722b4
      Vlad Zahorodnii authored
      Summary:
      Switch to Q_ASSERT in order to make code a bit more consistent. We have
      places where both assert and Q_ASSERT are used next to each other. Also,
      distributions like Ubuntu don't strip away assert(), let's hope that
      things are a bit different with Q_ASSERT.
      
      Test Plan: Compiles.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: romangg, davidedmundson, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D23605
      7a3722b4
  26. 11 Aug, 2019 1 commit
  27. 09 Aug, 2019 1 commit
  28. 29 Jul, 2019 1 commit
    • Vlad Zahorodnii's avatar
      Use more traditional doxygen style · 684b4b63
      Vlad Zahorodnii authored
      Summary:
      So far we were following a bit unique and rare doxygen comment style:
      
          /**
           * Contents of the comment.
           **/
      
      Doxygen comments with this style look balanced and neat, but many people
      that contribute to KWin don't follow this style. Instead, they prefer
      more traditional doxygen comment style, i.e.
      
          /**
           * Contents of the comment.
           */
      
      Reviewing such changes has been a bit frustrating for me (so selfish!)
      and for other contributors.
      
      This change switches doxygen comment style in KWin to a more traditional
      style. The main reason for doing this is to make code review process easier
      for new contributors as well us.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D22812
      684b4b63
  29. 22 Jul, 2019 1 commit
    • Vlad Zahorodnii's avatar
      Run clang-tidy with modernize-use-override check · 8af2fa73
      Vlad Zahorodnii authored
      Summary:
      Currently code base of kwin can be viewed as two pieces. One is very
      ancient, and the other one is more modern, which uses new C++ features.
      
      The main problem with the ancient code is that it was written before
      C++11 era. So, no override or final keywords, lambdas, etc.
      
      Quite recently, KDE compiler settings were changed to show a warning if
      a virtual method has missing override keyword. As you might have already
      guessed, this fired back at us because of that ancient code. We had
      about 500 new compiler warnings.
      
      A "solution" was proposed to that problem - disable -Wno-suggest-override
      and the other similar warning for clang. It's hard to call a solution
      because those warnings are disabled not only for the old code, but also
      for new. This is not what we want!
      
      The main argument for not actually fixing the problem was that git
      history will be screwed as well because of human factor. While good git
      history is a very important thing, we should not go ...
      8af2fa73
  30. 09 Jul, 2019 1 commit
  31. 23 Jun, 2019 1 commit
    • David Edmundson's avatar
      Close screen grabbing effect when screensaver starts · 3604aaf7
      David Edmundson authored
      Summary:
      The screenlock fails on X11 if it can't grab the keyboard.
      
      We can't nicely solve the generic case. We can solve the common case of
      a kwin effect being active.
      
      It's not critical, arguably not even desirable to have these effects
      persist after the screen is locked through an external trigger. We can
      just close the effect early.
      
      Key grabs have to be relased early before the close animation completes
      so that the locker doesn't have a race based on animation times.
      
      It's not ideal, but no worse than the current state for not much work.
      
      BUG: 234153
      
      Test Plan:
      locked screen on a timer
      opened various effects
      
      Reviewers: #kwin, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: ngraham, zzag, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D20890
      3604aaf7
  32. 02 May, 2019 1 commit
  33. 23 Apr, 2019 1 commit
  34. 18 Apr, 2019 1 commit