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
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 @@
 
     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.
diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp
index 23aca78..f203d35 100644
--- a/src/core/SkPaint.cpp
+++ b/src/core/SkPaint.cpp
@@ -114,8 +114,9 @@
     fRasterizer->safeUnref();
     fLooper->safeUnref();
 
+    uint32_t oldGenerationID = fGenerationID;
     memcpy(this, &src, sizeof(src));
-    fGenerationID++;
+    fGenerationID = oldGenerationID + 1;
 
     return *this;
 }
@@ -129,8 +130,9 @@
 {
     SkPaint init;
 
+    uint32_t oldGenerationID = fGenerationID;
     *this = init;
-    fGenerationID++;
+    fGenerationID = oldGenerationID + 1;
 }
 
 uint32_t SkPaint::getGenerationID() const {