aboutsummaryrefslogtreecommitdiffstats
path: root/include/core/SkPaint.h
diff options
context:
space:
mode:
authorChet Haase <chet@google.com>2010-10-25 16:18:59 -0700
committerChet Haase <chet@google.com>2010-10-25 16:30:37 -0700
commit95662ea6ee460cc84014c41a8c13e881cd8be8ed (patch)
tree606231199a01f05621f1612b221ef94b86f8c970 /include/core/SkPaint.h
parent14496db08e9c54a5012933b8c25a58348627d646 (diff)
downloadexternal_skia-95662ea6ee460cc84014c41a8c13e881cd8be8ed.zip
external_skia-95662ea6ee460cc84014c41a8c13e881cd8be8ed.tar.gz
external_skia-95662ea6ee460cc84014c41a8c13e881cd8be8ed.tar.bz2
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
Diffstat (limited to 'include/core/SkPaint.h')
-rw-r--r--include/core/SkPaint.h3
1 files changed, 3 insertions, 0 deletions
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,