aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChet Haase <chet@google.com>2010-12-15 11:39:16 -0800
committerChet Haase <chet@google.com>2010-12-15 13:00:49 -0800
commit9f523ea27ec892a176817dc3a46179c0a910beb4 (patch)
tree4785f5ee1cffbc41dc372b432298f924f8d25833 /include
parent9717bd93d86e12d2b9a506179493dd50613e99b2 (diff)
downloadexternal_skia-9f523ea27ec892a176817dc3a46179c0a910beb4.zip
external_skia-9f523ea27ec892a176817dc3a46179c0a910beb4.tar.gz
external_skia-9f523ea27ec892a176817dc3a46179c0a910beb4.tar.bz2
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
Diffstat (limited to 'include')
-rw-r--r--include/core/SkPaint.h5
1 files changed, 4 insertions, 1 deletions
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.