diff options
author | 2011-12-01 17:09:21 +0000 | |
---|---|---|
committer | 2011-12-01 17:09:21 +0000 | |
commit | b44cd65a53fa016a238e2bd3d01b5434dbc05da3 (patch) | |
tree | 8ba21a28c275340de0a732ceec2a071f769cb9ab /include/core | |
parent | ceb1d9ee5b3e0887e1b67764c3302e7810ad1b33 (diff) |
Fix Paint == comparison on Android.
The == operator was incorrect because of Androids use of
fGenerationID. This change moves the ID to the end of the
paint struct and omits it from the == comparison.
Review URL: http://codereview.appspot.com/5437098
git-svn-id: http://skia.googlecode.com/svn/trunk@2780 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkPaint.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h index db11b33a33..38234816c6 100644 --- a/include/core/SkPaint.h +++ b/include/core/SkPaint.h @@ -877,9 +877,6 @@ private: unsigned fStyle : 2; unsigned fTextEncoding : 2; // 3 values unsigned fHinting : 2; -#ifdef SK_BUILD_FOR_ANDROID - uint32_t fGenerationID; -#endif SkDrawCacheProc getDrawCacheProc() const; SkMeasureCacheProc getMeasureCacheProc(TextBufferDirection dir, @@ -905,6 +902,12 @@ private: friend class SkDraw; friend class SkPDFDevice; friend class SkTextToPathIter; + +#ifdef SK_BUILD_FOR_ANDROID + // In order for the == operator to work properly this must be the last field + // in the struct so that we can do a memcmp to this field's offset. + uint32_t fGenerationID; +#endif }; /////////////////////////////////////////////////////////////////////////////// |