Use a single texture atlas for the decoration

Review Request #112775 - Created Sept. 17, 2013 and submitted - Latest diff uploaded

Information
Fredrik Höglund
kde-workspace
KDE/4.11
Reviewers
kwin
There is an obvious trade off here; updating the side borders becomes a bit more
expensive, while rendering the window becomes less expensive.

Effects that transform windows or the whole screen, such as cube or present-windows
should benefit greatly from this optimization.

Note that this series is developed against the 4.11 branch. It might be more
appropriate to commit it to frameworks first, and backport it after it's seen some
testing. But I think right now it's actually likely to be tested by more people
if it's committed to the 4.11 branch first.

Also note that this will conflict with http://git.reviewboard.kde.org/r/112526


commit 91ecdb026e29d28ff8321111ee7207a0068018ef
Author: Fredrik Höglund <fredrik@kde.org>
Date:   Mon Sep 16 19:50:02 2013 +0200

    kwin: Use a single texture atlas for the decoration
    
    The left and right border images are rotated 90° before they are
    uploaded into the atlas texture. The images are separated by a row
    of transparent texels to minimize artifacts from oversampling.
    
    With this change kwin renders the whole decoration with a single
    call to glDrawArrays().

commit d5bc31273e3f84329e3d6c8bf7ab7bd5fa168a55
Author: Fredrik Höglund <fredrik@kde.org>
Date:   Mon Sep 16 19:30:35 2013 +0200

    kwin: Add a uvAxisSwapped property in WindowQuad
    
    When this property is true, it indicates that the +U axis corresponds
    to the +Y axis, and the +V axis corresponds to the +X axis.
    
    This property is taken into account in WindowQuad::makeSubQuad().

  
Loading...