From 9f523ea27ec892a176817dc3a46179c0a910beb4 Mon Sep 17 00:00:00 2001 From: Chet Haase Date: Wed, 15 Dec 2010 11:39:16 -0800 Subject: Fix issue with SkPaint references being out of date. The mechanism used for determining whether an SkPaint object is the same as a cached version was broken. The problem was that Skia would blow away the generationID in some situations (assignment and reset), making that ID completely invalid. This would cause the displayList rendering code to sometimes make the wrong decision, thinking that an out of date object was actually still valid. Change-Id: I5e11eb9ac41e5d87d528b99e3781a4d348f76490 --- include/core/SkPaint.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h index ea21ceb..f2df226 100644 --- a/include/core/SkPaint.h +++ b/include/core/SkPaint.h @@ -93,7 +93,10 @@ public: void setHinting(Hinting hintingLevel) { - fHinting = hintingLevel; + if ((unsigned) hintingLevel != fHinting) { + fGenerationID++; + fHinting = hintingLevel; + } } /** Specifies the bit values that are stored in the paint's flags. -- cgit v1.1