Use a single texture atlas for the decoration
Review Request #112775 - Created Sept. 17, 2013 and submitted
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 <email@example.com> 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 <firstname.lastname@example.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().
I think it's better if we go for master branch first and then decide whether we want it in 4.11 branch at all. If we go now for 4.11 it would be in the branch pretty much untested and would first be exposed to all the Kubuntu LTS users who will get the April release. Given that it's an optimization I'd say it counts as feature and should be master.