One of the slowest parts of our current OpenGL rendering is rendering the native widgets. They are currently rendered to a pixmap and later transferred as texture to the GPU. That is a slow process and costs valuable time in the rendering pipeline as it blocks the rendering and causes thousands of unnecessary OpenGL calls. it might also benefit our normal rendering if we can cache some of the widgets that are rendered over and over again. We should implement a cache for these native widgets that stores a texture id in the OpenGL case and maybe a pixmap in the normal case. For the cache to work correctly we need to use all relevant information as cache key and have a mechanism to kick out unused entries from the cache. In the OpenGL case we might also want to use a OpenGL texture atlas to avoid texture fragmentation which I'll add as a second easy hack. The place to look for it is in GtkSalGraphics::drawNativeControl.
Tomaž Vajngerl committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=450727fdffa4a0dc3b2d4e635a5c1bc0411b3c36 tdf#92018 cache native controls for X11 OpenGL backend (for now) 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=b4faa69e4a9a99cdd12b7999d95459b1a8639e9f&h=libreoffice-5-0 tdf#92018 cache native controls for X11 OpenGL backend (for now) It will be available in 5.0.1. 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.
commit dea885f80a80c6a5839ee5dbf8521487186a9522 Author: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> Date: Mon Aug 3 15:06:55 2015 +0900 opengl: cache native widget textures also for Windows is the windows piece; I guess Mac is the last bit (?)
(In reply to Michael Meeks from comment #3) > commit dea885f80a80c6a5839ee5dbf8521487186a9522 > Author: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> > Date: Mon Aug 3 15:06:55 2015 +0900 > > opengl: cache native widget textures also for Windows > > is the windows piece; I guess Mac is the last bit (?) There is no OpenGL mac vcl backend. There is OpenGL support on mac and in general it should be a lot easier to implement the backend as we use a OpenGL enabled widget from the system. So we would just need to make sure that we only generate these and render to them through OpenGL.
Dropping tracker for now - this is mac specific.
Migrating Whiteboard tags to Keywords: (EasyHack DifficultyInteresting SkillCpp) [NinjaEdit]
JanI is default CC for Easy Hacks (Add Jan; remove LibreOffice Dev List from CC) [NinjaEdit]
Let's call this fixed as it does not make sense to invest in OpenGL improvements anymore after Skia's success.