Currently all OpenGL textures are uploaded as single textures. This leads to some problems in the long run as you get texture fragmentation and miss the chance to save expensive OpenGL calls. Ideally we would use texture atlases that contain several textures and we would use the uv coordinates to select the correct texture. In the beginning I think it would be good to start with fixed size texture atlases for the 16x16 textures (maybe also 24x24). Writing a texture atlas for these sizes should be a lot easier as they should fit nicely into power of 2 textures and you don't need to implement an algorithm to place the texture into the atlas. A followup task might be to write some code to find out who is using these textures and if we can save some of the unnecessary calls by combining as many calls into the atlas as possible. Some background information: http://en.wikipedia.org/wiki/Texture_atlas http://http.download.nvidia.com/developer/NVTextureSuite/Atlas_Tools/Texture_Atlas_Whitepaper.pdf The starting point for this would be our OpenGLTexture class. Most likely you want to hide whether the implementation uses a normal texture or a texture atlas. So I would start by abstracting teh interface and provide two implementations for the interface.
Tomaž Vajngerl committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=e3771338eee211dbac7cad961a4a81342f2a56c9 tdf#92019 Use texture atlas for 16, 24, 32, 48, 64 px width images It will be available in 5.1.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Tomaž Vajngerl committed a patch related to this issue. It has been pushed to "libreoffice-5-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=e98939c292297dd4569d8ebad0a8245d7e6f4bb6&h=libreoffice-5-0 tdf#92019 Use texture atlas for 16, 24, 32, 48, 64 px width images It will be available in 5.0.2. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Resolved by Tomaž's commits, I hope.
Migrating Whiteboard tags to Keywords: (EasyHack DifficultyBeginner SkillCpp) [NinjaEdit]
Remove LibreOffice Dev List from CC on EasyHacks (curtailing excessive email to list) [NinjaEdit]