From 95662ea6ee460cc84014c41a8c13e881cd8be8ed Mon Sep 17 00:00:00 2001 From: Chet Haase Date: Mon, 25 Oct 2010 16:18:59 -0700 Subject: Added generation ID to SkPaint to easily detect changed object. This new ID is used by display list objects to detect when the SkPaint object's properties have changed and the display list needs to copy the paint into a new object to avoid reusing an obsolete copy of it. Change-Id: I1fb7034bea63eca247b72b939cb20f0fcece067a --- include/core/SkPaint.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h index dd2c2f4..ea21ceb 100644 --- a/include/core/SkPaint.h +++ b/include/core/SkPaint.h @@ -809,6 +809,8 @@ public: const SkGlyph& getUnicharMetrics(SkUnichar); const void* findImage(const SkGlyph&); + uint32_t getGenerationID() const; + private: SkTypeface* fTypeface; SkScalar fTextSize; @@ -833,6 +835,7 @@ private: unsigned fStyle : 2; unsigned fTextEncoding : 2; // 3 values unsigned fHinting : 2; + uint32_t fGenerationID; SkDrawCacheProc getDrawCacheProc() const; SkMeasureCacheProc getMeasureCacheProc(TextBufferDirection dir, -- cgit v1.1