diff options
author | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2016-03-16 11:01:28 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2016-03-16 12:36:55 +0000 |
commit | d64f0781738519add9e3c3eb7a92c7dae5f8470c (patch) | |
tree | 0a4f4982186ca3d957377ea7324e476bb71883f6 /src/gui/painting/qtextureglyphcache.cpp | |
parent | b122989e734013af00ee6a5b9918a65703ea7806 (diff) |
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 <andy.nichols@theqtcompany.com>
Diffstat (limited to 'src/gui/painting/qtextureglyphcache.cpp')
-rw-r--r-- | src/gui/painting/qtextureglyphcache.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp index d2c3eceeef..bfc8551a9b 100644 --- a/src/gui/painting/qtextureglyphcache.cpp +++ b/src/gui/painting/qtextureglyphcache.cpp @@ -247,6 +247,7 @@ void QTextureGlyphCache::fillInPendingGlyphs() resizeCache(qNextPowerOfTwo(requiredWidth - 1), qNextPowerOfTwo(requiredHeight - 1)); } + beginFillTexture(); { QHash<GlyphAndSubPixelPosition, Coord>::iterator iter = m_pendingGlyphs.begin(); while (iter != m_pendingGlyphs.end()) { @@ -256,6 +257,7 @@ void QTextureGlyphCache::fillInPendingGlyphs() ++iter; } } + endFillTexture(); m_pendingGlyphs.clear(); } |