opengl: deferred and optimized (text) texture drawing

Desktop / LibreOffice - Tomaz Vajngerl [collabora.com] - 8 April 2016 05:10 UTC

Switching between textures is not cheap, so minimizing the amount of switching performs better. So instead of immediate drawing we can accumulate texture draw actions and defer drawing as long as possible. After that switch all accumulated textures and draw everything needed with one GL draw call.

This is beneficial for text drawing as we cache many glyphs in per textue.

96a098c opengl: deferred and optimized (text) texture drawing
vcl/inc/opengl/AccumulatedTextures.hxx | 112 ++++++++++++++++++++++++++++++++
vcl/inc/opengl/texture.hxx | 4 ++
vcl/inc/openglgdiimpl.hxx | 5 ++
vcl/opengl/gdiimpl.cxx | 96 +++++++++++++++++++++++++++
vcl/opengl/texture.cxx | 46 +++++++++++++
vcl/win/gdi/winlayout.cxx | 16 ++---
6 files changed, 268 insertions(+), 11 deletions(-)

Upstream: cgit.freedesktop.org


  • Share