1. 01 Sep, 2020 1 commit
    • Vlad Zahorodnii's avatar
      effects: Disable blur and contrast effect when screen is locked · ed113171
      Vlad Zahorodnii authored
      The results of the blur and the background contrast effect will never
      be seen if the screen locker is active.
      
      In order to avoid wasting computational resources, we could temporarily
      disable the blur effect until the screen is unlocked.
      
      Furthermore, given that the blur effect shrinks the clip region, it is
      guaranteed that the compositor will have to render the desktop window
      behind the lockscreen window. With this change, all windows behind the
      screen locker will be properly clipped away.
      ed113171
  2. 31 Aug, 2020 1 commit
    • Vlad Zahorodnii's avatar
      effects/blur: Remove leftovers after blur cache · afdd5b84
      Vlad Zahorodnii authored
      The original purpose of m_damageArea was to indicate which region of the
      blur cache became dirty and needs to be updated. However, we no longer
      need to keep track of damaged area since the blur cache was removed.
      afdd5b84
  3. 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
  4. 30 Apr, 2020 1 commit
  5. 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
  6. 27 Jan, 2019 1 commit
    • Martin Flöser's avatar
      Add windowsystem plugin for KWin's qpa · 02a05610
      Martin Flöser authored
      Summary:
      KWindowSystem provides a plugin interface to have platform specific
      implementations. So far KWin relied on the implementation in
      KWayland-integration repository.
      
      This is something I find unsuited, for the following reasons:
       * any test in KWin for functionality set through the plugin would fail
       * it's not clear what's going on where
       * in worst case some code could deadlock
       * KWin shouldn't use KWindowSystem and only a small subset is allowed
      to be used
      
      The last point needs some further explanation. KWin internally does not
      and cannot use KWindowSystem. KWindowSystem (especially KWindowInfo) is
      exposing information which KWin sets. It's more than weird if KWin asks
      KWindowSystem for the state of a window it set itself. On X11 it's just
      slow, on Wayland it can result in roundtrips to KWin itself which is
      dangerous.
      
      But due to using Plasma components we have a few areas where we use
      KWindowSystem. E.g. a Plasma::Dialog sets a window type, the slide in
      direction, blur and background contrast. This we want to support and
      need to support. Other API elements we do not want, like for examples
      the available windows. KWin internal windows either have direct access
      to KWin or a scripting interface exposed providing (limited) access -
      there is just no need to have this in KWindowSystem.
      
      To make it more clear what KWin supports as API of KWindowSystem for
      internal windows this change implements a stripped down version of the
      kwayland-integration plugin. The main difference is that it does not use
      KWayland at all, but a QWindow internal side channel.
      
      To support this EffectWindow provides an accessor for internalWindow and
      the three already mentioned effects are adjusted to read from the
      internal QWindow and it's dynamic properties.
      
      This change is a first step for a further refactoring. I plan to split
      the internal window out of ShellClient into a dedicated class. I think
      there are nowadays too many special cases. If it moves out there is the
      question whether we really want to use Wayland for the internal windows
      or whether this is just historic ballast (after all we used to use
      qwayland for that in the beginning).
      
      As the change could introduce regressions I'm targetting 5.16.
      
      Test Plan:
      new test case for window type, manual testing using Alt+Tab
      for the effects integration. Sliding popups, blur and contrast worked fine.
      
      Reviewers: #kwin
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D18228
      02a05610
  7. 24 Sep, 2018 1 commit
  8. 18 Jun, 2018 1 commit
    • Alex Nemeth's avatar
      Fix multimonitor blur · 2419c949
      Alex Nemeth authored
      Summary:
      On wayland blur on secondary monitor would not render correctly.
      
      BUG: 393723
      Depends on D12452
      
      Test Plan:
       - use more than one output
       - log in in a wayland session
       - open a transparent window (for example: Konsole with transparent and blur enabled profile)
       - drag the window to another screen
       - blurs the content under the window corretly
      
      Reviewers: #kwin, graesslin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: apol, zzag, davidedmundson, kwin, #kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D12678
      2419c949
  9. 29 May, 2018 1 commit
    • Alex Nemeth's avatar
      Fix multimonitor blur · 99532fb9
      Alex Nemeth authored
      Summary:
      On wayland blur on secondary monitor would not render correctly.
      
      BUG: 393723
      Depends on D12452
      
      Test Plan:
       - use more than one output
       - log in in a wayland session
       - open a transparent window (for example: Konsole with transparent and blur enabled profile)
       - drag the window to another screen
       - blurs the content under the window corretly
      
      Reviewers: #kwin, graesslin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: apol, zzag, davidedmundson, kwin, #kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D12678
      99532fb9
  10. 20 Apr, 2018 1 commit
    • Vlad Zahorodnii's avatar
      Fix unused param warnings · 75fff176
      Vlad Zahorodnii authored
      Summary:
      Compiler: GCC 7.3.1
      Distro: Arch Linux
      
      Compiler warnings:
      
      ```
      /home/vlad/KDE/src/kde/workspace/kwin/effects/blur/blur.cpp: In member function ‘void KWin::BlurEffect::upscaleRenderToScreen(KWin::GLVertexBuffer*, int, int, QMatrix4x4, QRect, QPoint)’:
      /home/vlad/KDE/src/kde/workspace/kwin/effects/blur/blur.cpp:677:129: warning: unused parameter ‘windowShape’ [-Wunused-parameter]
       void BlurEffect::upscaleRenderToScreen(GLVertexBuffer *vbo, int vboStart, int blurRectCount, QMatrix4x4 screenProjection, QRect windowShape, QPoint windowPosition)
                                                                                                                                       ^~~~~~~~~~~
      ```
      
      ```
      /home/vlad/KDE/src/kde/workspace/kwin/main_wayland.cpp: In function ‘void KWin::{anonymous}::gainRealTime(KWin::RealTimeFlags)’:
      /home/vlad/KDE/src/kde/workspace/kwin/main_wayland.cpp:95:56: warning: unused parameter ‘flags’ [-Wunused-parameter]
       void gainRealTime(RealTimeFlags flags = RealTimeFlags::DontReset)
      ```
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: davidedmundson
      
      Subscribers: anemeth, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D12208
      75fff176
  11. 13 Feb, 2018 1 commit
    • Alex Nemeth's avatar
      Added noise blur effect · cc0325af
      Alex Nemeth authored
      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
  12. 03 Feb, 2018 1 commit
    • Alex Nemeth's avatar
      Removed the "fastblur" path · f8ff4027
      Alex Nemeth authored
      Summary:
      Since the new blur is more efficient "fastblur" or "simpleblur" is not needed anymore for fullscreen blur.
      Even my old low-end laptop from 2009 (with Intel T3300) can easily do fullscreen blur now with the new method without any hitch at all.
      
      Reviewers: graesslin, #kwin, #plasma, #vdg, fredrik
      
      Reviewed By: #vdg, fredrik
      
      Subscribers: avaragic, fredrik, ngraham, plasma-devel, kwin, #kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D10181
      f8ff4027
  13. 25 Jan, 2018 2 commits
    • Alex Nemeth's avatar
      Reverted accidental file permission changes · 977a5ef0
      Alex Nemeth authored
      Summary: In D9848 the file permissions in effects/blur where accidentally changed from 644 to 755.
      
      Test Plan: {F5674656}
      
      Reviewers: #kwin, hein
      
      Reviewed By: hein
      
      Subscribers: kwin, #kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D10100
      977a5ef0
    • Alex Nemeth's avatar
      Updated the blur method to use the more efficient dual kawase blur algorithm. · 0179f741
      Alex Nemeth authored
      Summary:
      Updated the old and outdated blur method to use the much more efficient dual kawase blur method.
      Now with this we can do virtually infinite blur with very very little performance cost.
      The dual kawase blur method is basically downscaling and upscaling an image, but combined with the kawase blur shader.
      Comparison: https://i.imgur.com/mh6Cw61.png
      Left is old, right is new.
      Comparison was done with the strongest blur setting in a VM running on an Intel i7-4790 and a GTX980
      We can see here that the performance is even better with this new method.
      
      Reviewers: #plasma, #kwin, graesslin, fredrik
      
      Reviewed By: fredrik
      
      Subscribers: hein, dos, luebking, broulik, romangg, zzag, anthonyfieroni, mart, davidedmundson, fredrik, ngraham, plasma-devel, kwin, #kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D9848
      0179f741
  14. 29 Sep, 2017 1 commit
    • David Edmundson's avatar
      Don't recreate kwayland blurmanager on screen size changes · b3020d6f
      David Edmundson authored
      Summary:
      Instead of calling reconfigure() on screen size changes, which deletes
      and recreates the effect, we can just update the one texture that's mapped to
      the screen size.
      
      ---
      
      From the wayland commit.
      
      >What surprises me is that BlurManager recreates for Output changes.
      >That sounds like a bug in KWin (or an area which could be improved).
      
      I had thought the same and wrote this (though wanted to have kwayland fixed first)
      
      Test Plan:
      Logged in and out (my screen resizes on startup due to scaling)
      Tested on my X machine by turning a screen off. Nothing broke, plasma
      panels looked the same.
      
      Note: Eike tried this patch last week and claimed kwin still crashed.
      We don't have a backtrace so it could have been something unrelated,
      applied wrong or that he was deliberately lying to wind me up.
      
      Reviewers: #plasma, graesslin
      
      Reviewed By: #plasma, graesslin
      
      Subscribers: graesslin, plasma-devel, kwin, #kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D7877
      b3020d6f
  15. 01 Feb, 2016 1 commit
    • Martin Flöser's avatar
      [effects] Add a simplified fullscreen blur · 22bd8bad
      Martin Flöser authored
      If a window is fullscreen and wants fullscreen blur behind it, we
      use the blur from logout effect. This is mostly intended for the
      Application Dashboard which requires a fullscreen blur. The generic
      blur effect is not designed for such usage and is rather costly.
      
      This simplified blur just needs framebuffer blit and midmaps. This
      makes it rather cheap in usage and also doesn't need a cached texture.
      
      REVIEW: 126906
      22bd8bad
  16. 25 Jan, 2016 1 commit
  17. 01 Oct, 2015 1 commit
  18. 02 Sep, 2015 1 commit
  19. 28 Mar, 2014 1 commit
    • Martin Flöser's avatar
      [kwin] Add a virtual Effect::requestedEffectChainPosition · 3bbc9436
      Martin Flöser authored
      This method replaces the X-KDE-ORDERING property in the Effect's desktop
      files. This change is a preparation step for integrating the new Effect
      Loader which doesn't read the ordering information. Thus it needs to be
      provided by the Effect itself so that the EffectsHandler can properly
      insert it into the chain.
      
      Also for the built-in Effects on the long run it doesn't make much sense
      to install the desktop files. And binary plugin effects will migrate to
      json metadata which also doesn't have the KService::Ptr. Thus overall it
      simplifies to read this information directly from the Effect.
      3bbc9436
  20. 11 Jun, 2013 2 commits
  21. 30 Jan, 2013 1 commit
    • Martin Flöser's avatar
      Use translucent/dialogs/background elements where possible · 0c92e1f3
      Martin Flöser authored
      In effects it's obvious that compositing is enabled, so specifying the
      translucent element is no problem.
      
      In tabbox a context property "compositing" is injected which decides
      whether "translucent" or "opaque" elements should be used. Here the
      translucent elements are only used if the Blur effect is available - for
      this a new Effect::Feature Blur is introduced and in addition it is
      tested whether the theme provides the translucent element.
      
      Also the masking is adjusted to ensure that only the shadow is not
      blurred.
      
      Reason for this change is that Plasma theme seems not always to pick up
      whether compositing is used when used from inside KWin. It does not cover
      the Desktop Change OSD which uses PlasmaCore.Dialog and there we cannot
      (yet) inject that we use compositing.
      
      Overall I'm quite unhappy with this patch and I do hope we can fix it in
      the proper place in the lifetime of 4.10 and revert this patch.
      
      CCBUG: 311995
      REVIEW: 108438
      0c92e1f3
  22. 17 Aug, 2012 1 commit
    • Martin Flöser's avatar
      Effects can provide support information through properties · 23f2de00
      Martin Flöser authored
      The supportInformation is extended to also read the properties
      on all effects. In addition each effect can be queried just for
      itself through D-Bus, e.g.:
      qdbus org.kde.kwin /KWin supportInformationForEffect kwin4_effect_blur
      
      All effects are extended to provide their configured and read
      settings through properties. In some cases also important
      runtime information is exposed.
      
      REVIEW: 105977
      BUG: 305338
      FIXED-IN: 4.9.1
      23f2de00
  23. 12 Mar, 2012 1 commit
  24. 19 Feb, 2012 1 commit
  25. 12 Feb, 2012 1 commit
    • Philipp Knechtges's avatar
      kwin: move/resize events shall not force a repaint of all layers · 239d5757
      Philipp Knechtges authored
      This patch adds a new function Toplevel::addLayerRepaint, that in contrast
      to addWorkspaceRepaint does not invalidate every blur texture cache that
      overlaps with that region. As the name suggests it rather invalidates the
      to the window associated layer at that position. This is especially useful
      in the case of move/resize events in combination with oxygen-transparent,
      where the altered window is almost always the topmost window and the blur
      texture cache of the windows underneath are unchanged.
      
      For the case of fully opaque windows the behaviour of addLayerRepaint
      and addWorkspaceRepaint should be same.
      
      REVIEW: 103906
      239d5757
  26. 24 Jan, 2012 1 commit
  27. 10 Dec, 2011 1 commit
  28. 12 Oct, 2011 1 commit
  29. 02 Oct, 2011 1 commit
    • Philipp Knechtges's avatar
      kwin: Optimizing Blur Part III · b6478e1b
      Philipp Knechtges authored
      This patch introduces some kind of damage propagation. In the old version of the blur effect
      we had to repaint the whole window if sth behind the blurred area was damaged. The new texture
      cache, which was introduced by the last patch, gives us the opportunity to only update parts of
      blurred background texture. This means that the damaged area can only propagate with the speed
      of the blurring radius per window layer.
      
      REVIEW: 102665
      b6478e1b
  30. 18 Sep, 2011 1 commit
    • Philipp Knechtges's avatar
      kwin: Optimizing Blur Part II · ef9aeafe
      Philipp Knechtges authored
      This patch adds an optional texture cache to the blur effect such that damaged windows in
      front of the blurred region dont trigger a repaint of the whole blurred region which pretty
      often results in a avalanche repaint of nearly the whole screen.
      
      REVIEW: 101977
      ef9aeafe
  31. 14 Jul, 2011 1 commit
  32. 14 May, 2011 1 commit
  33. 02 May, 2011 2 commits
  34. 12 Mar, 2011 1 commit
  35. 25 Feb, 2011 1 commit
    • Martin Flöser's avatar
      EffectsHandler emits windowAdded signal · ab6f2ba1
      Martin Flöser authored
      All previously existing windowAdded methods are renamed to slotWindowAdded.
      EffectsHandlerImpl is connected to Workspace's clientAdded signal, which is
      emitted a little bit earlier than the previous direct method call. This might
      change behavior.
      Another signal is added to Workspace to signal that an unmanaged is added.
      ab6f2ba1
  36. 31 Jan, 2011 1 commit