Diffusion KWin 7637cfc22bbd

[scenes/opengl] Fix overlapping shadow tiles

Authored by zzag on Jun 7 2018, 8:48 AM.

Description

[scenes/opengl] Fix overlapping shadow tiles

Summary:
This problem appears if shadow corner tiles are too big and
some window has size smaller than 2 * shadowTileSize.

This change tries to address the problem above by exclusing
overlapping tile parts. If there are any two overlapping corners
then tile between them(top/right/bottom/left) is not rendered.

Also, because some corner tile parts can be excluded, corner tiles
are expected to be symmetrical(i.e. if we remove right half from
the top-left tile and left half from the top-right tile and
stick them together, they still look fine, there are no misalignments, etc).
Most shadows(e.g. shadows from Breeze) have such behaviour.

No tiles are overlapping

Overlapping tiles

And this is how it supposed to be

Test Plan:

  • apply D11069 to Breeze
  • in System Settings/Application Style/Window Decorations, choose "Very Large" shadow size
  • open Konsole
  • resize it to a minimum possible size

Reviewers: KWin, graesslin, davidedmundson

Reviewed By: KWin, davidedmundson

Subscribers: davidedmundson, ngraham, anemeth, abetts, kwin

Tags: KWin

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

Details

Committed
zzagJun 7 2018, 9:07 AM
Reviewer
KWin
Differential Revision
D10811: [scenes/opengl] Fix overlapping shadow tiles
Parents
R108:a3cff85e7aec: Remove Qt module declarations in includes
Branches
Unknown
Tags
Unknown