Optimize makeGrid() and makeRegularGrid()

Review Request #112606 - Created Sept. 11, 2013 and submitted

Information
Fredrik Höglund
kde-workspace
KDE/4.11
Reviewers
kwin
The performance improvement from this change depends on the number of grid cells,
but is close to 100% when used by the wobbly-windows effect.

commit 40684e2649c014f9dab7cc9ad07e5ba888eb4147
Author: Fredrik Höglund <fredrik@kde.org>
Date:   Mon Sep 9 17:28:46 2013 +0200

    kwin: Optimize WindowQuadList::makeGrid()
    
    This is the same optimization as in the previous commit.

commit ccf18dcd9604e0a4a413a80659223b966f74e035
Author: Fredrik Höglund <fredrik@kde.org>
Date:   Mon Sep 9 17:26:23 2013 +0200

    kwin: Optimize WindowQuadList::makeRegularGrid()
    
    Instead of looping over every quad for every grid cell and checking
    for possible intersections, loop over the quads once and compute
    the top left corner of the first intersecting grid cell. Then loop over
    all the intersecting cells from that point, and create the sub quads.
    
    This algorithm also preserves the order of the quads in the original
    list.

  
Thomas Lübking
Fredrik Höglund
Review request changed

Status: Closed (submitted)

Loading...