diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-12-02 13:22:14 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-12-02 13:22:29 (GMT) |
commit | 25023911295c201758faaa2c800b2388ddf1e0b0 (patch) | |
tree | 74cbd3766b1207a00d1bd48dd3a5798307a540c9 /src/gui/painting/qvectorpath_p.h | |
parent | d16ba0a93d611689bce9a2732a1cc8c9a317f5bf (diff) | |
parent | fb01592ef98dbaa4d0591df77cffaaf0ea0e117a (diff) | |
download | Qt-25023911295c201758faaa2c800b2388ddf1e0b0.zip Qt-25023911295c201758faaa2c800b2388ddf1e0b0.tar.gz Qt-25023911295c201758faaa2c800b2388ddf1e0b0.tar.bz2 |
Merge commit 'oslo-staging-2/4.6' into upstream/4.6
Diffstat (limited to 'src/gui/painting/qvectorpath_p.h')
-rw-r--r-- | src/gui/painting/qvectorpath_p.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gui/painting/qvectorpath_p.h b/src/gui/painting/qvectorpath_p.h index ec27970..5eaddf4 100644 --- a/src/gui/painting/qvectorpath_p.h +++ b/src/gui/painting/qvectorpath_p.h @@ -68,7 +68,7 @@ QT_MODULE(Gui) class QPaintEngineEx; -typedef void (*qvectorpath_cache_cleanup)(void *data); +typedef void (*qvectorpath_cache_cleanup)(QPaintEngineEx *engine, void *data); struct QRealRect { qreal x1, y1, x2, y2; @@ -118,6 +118,8 @@ public: { } + ~QVectorPath(); + QRectF controlPointRect() const; inline Hint shape() const { return (Hint) (m_hints & ShapeMask); } @@ -128,6 +130,7 @@ public: inline bool hasImplicitClose() const { return m_hints & ImplicitClose; } inline bool hasWindingFill() const { return m_hints & WindingFill; } + inline void makeCacheable() const { m_hints |= ShouldUseCacheHint; m_cache = 0; } inline uint hints() const { return m_hints; } inline const QPainterPath::ElementType *elements() const { return m_elements; } @@ -146,9 +149,9 @@ public: CacheEntry *next; }; - CacheEntry *addCacheData(QPaintEngineEx *engine, void *data, qvectorpath_cache_cleanup cleanup); + CacheEntry *addCacheData(QPaintEngineEx *engine, void *data, qvectorpath_cache_cleanup cleanup) const; inline CacheEntry *lookupCacheData(QPaintEngineEx *engine) const { - Q_ASSERT(m_hints & IsCachedHint); + Q_ASSERT(m_hints & ShouldUseCacheHint); CacheEntry *e = m_cache; while (e) { if (e->engine == engine) @@ -162,14 +165,14 @@ public: private: Q_DISABLE_COPY(QVectorPath) - CacheEntry *m_cache; - const QPainterPath::ElementType *m_elements; const qreal *m_points; const int m_count; mutable uint m_hints; mutable QRealRect m_cp_rect; + + mutable CacheEntry *m_cache; }; Q_GUI_EXPORT const QVectorPath &qtVectorPathForPath(const QPainterPath &path); |