summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qimage_p.h
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2011-09-16 16:00:04 +0200
committerQt by Nokia <qt-info@nokia.com>2011-09-20 12:00:23 +0200
commit070d9c00c488a5ee6811f04170cf488ead79bf80 (patch)
treeef3511a994b4ec4b8d563393ea2fb1a4783ad095 /src/gui/image/qimage_p.h
parent57368c7037c6d2a6c8cc18d9d41399bf740abe5c (diff)
Avoid double caching glyphs in raster/QPA/FreeType
Since FreeType has internal caching, it has had a special code path in the raster engine which avoided using Qt's glyph cache, as that would be redundant. However, when compiling with QPA, we want the same behavior without being able to access the QFontEngineFT class. To achieve this, I've made a new abstraction and added it to QFontEngine which allows the FT engine to provide direct pointers into the alpha maps stored by FT. This requires a locking/unlocking mechanism. Yes, the QFontEngine::alphaMap* API is slowly becoming a horrible mess, but due to time constraints, the task of refactoring these functions into a more flexible API needs to wait. I've added a TODO comment for this. Change-Id: I08237403c2967f8fb952258178676f33a87c0353 Reviewed-on: http://codereview.qt-project.org/5155 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/gui/image/qimage_p.h')
-rw-r--r--src/gui/image/qimage_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/image/qimage_p.h b/src/gui/image/qimage_p.h
index bc24778415..77b9a7d1a1 100644
--- a/src/gui/image/qimage_p.h
+++ b/src/gui/image/qimage_p.h
@@ -92,6 +92,7 @@ struct Q_GUI_EXPORT QImageData { // internal image data
uint ro_data : 1;
uint has_alpha_clut : 1;
uint is_cached : 1;
+ uint is_locked : 1;
bool checkForAlphaPixels() const;