[kdecoration] Refine shadows

Authored by zzag on May 21 2018, 5:31 PM.

Description

[kdecoration] Refine shadows

Summary:
5.12 release introduced new decoration shadows. These new shadows are
bigger, centered, and they try to solve a problem related to depth.
Yet, there are still some problems:

  • new(5.12) shadows are hard.
  • lighting model is broken. Because 5.12 shadows have been centered and made bigger, they should be casted from north.

This change refines how decoration shadows look:

  • shadows are casted from north(shadow under window is bigger and darker, side shadows are smaller, etc);
  • shadows are made up of several separate shadows(one for overall shape, another for contrast). The separate shadows are produced by using box shadow helper(something similar to CSS box-shadow property, except there are no inset and spread properties);
  • shadow sizes(e.g. Small, Medium, and so on) haven't changed.

Because GPUs can't be used for blurring images(in our case), the box shadow
helper is using CPU to blur images. More precisely, when blur radius is < 64,
images are blurred with "separable convolutions", otherwise, images are blurred
with a two-dimensional Fourier Transform.

Desktop experience with the refined shadows

Depends on D11198

Reviewers: Breeze, VDG, hpereiradacosta

Reviewed By: hpereiradacosta

Subscribers: abetts, fabianr, hpereiradacosta, ngraham, plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D11069

Details

Committed
zzagJul 6 2018, 12:54 PM
Reviewer
hpereiradacosta
Differential Revision
D11069: [kdecoration] Refine shadows
Parents
R31:bffe8faa8706: [libbreezecommon] Add box shadow helper
Branches
Unknown
Tags
Unknown