From d64f0781738519add9e3c3eb7a92c7dae5f8470c Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Wed, 16 Mar 2016 11:01:28 +0100 Subject: Add begin-end virtuals to the internal glyph cache Just having a single fillTexture() is not sufficient for efficient operation with modern, low-level graphics APIs. Having a begin-end pair of functions that are invoked before the stream of calls to fillTexture allow glyph caches to build command lists and defer command submission until it is known that all pending glyphs have been processed. Change-Id: Ifac645f83e9cfb6f246be9c8e79e5aa3bde5758d Reviewed-by: Andy Nichols --- src/gui/painting/qtextureglyphcache_p.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gui/painting/qtextureglyphcache_p.h') diff --git a/src/gui/painting/qtextureglyphcache_p.h b/src/gui/painting/qtextureglyphcache_p.h index 14271ccc65..a8efb4abb1 100644 --- a/src/gui/painting/qtextureglyphcache_p.h +++ b/src/gui/painting/qtextureglyphcache_p.h @@ -117,7 +117,9 @@ public: virtual void resizeTextureData(int width, int height) = 0; virtual int glyphPadding() const { return 0; } + virtual void beginFillTexture() { } virtual void fillTexture(const Coord &coord, glyph_t glyph, QFixed subPixelPosition) = 0; + virtual void endFillTexture() { } inline void createCache(int width, int height) { m_w = width; -- cgit v1.2.3