diff options
Diffstat (limited to 'include/core/SkPaint.h')
-rw-r--r-- | include/core/SkPaint.h | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h index abb859950c..bf0f91ceb2 100644 --- a/include/core/SkPaint.h +++ b/include/core/SkPaint.h @@ -980,6 +980,11 @@ public: SkDEVCODE(void toString(SkString*) const;) + struct FlatteningTraits { + static void Flatten(SkWriteBuffer& buffer, const SkPaint& paint); + static void Unflatten(SkReadBuffer& buffer, SkPaint* paint); + }; + private: SkTypeface* fTypeface; SkScalar fTextSize; @@ -999,15 +1004,25 @@ private: SkColor fColor; SkScalar fWidth; SkScalar fMiterLimit; - // all of these bitfields should add up to 32 - unsigned fFlags : 16; - unsigned fTextAlign : 2; - unsigned fCapType : 2; - unsigned fJoinType : 2; - unsigned fStyle : 2; - unsigned fTextEncoding : 2; // 3 values - unsigned fHinting : 2; - //unsigned fFreeBits : 4; + + union { + struct { + // all of these bitfields should add up to 32 + unsigned fFlags : 16; + unsigned fTextAlign : 2; + unsigned fCapType : 2; + unsigned fJoinType : 2; + unsigned fStyle : 2; + unsigned fTextEncoding : 2; // 3 values + unsigned fHinting : 2; + //unsigned fFreeBits : 4; + }; + uint32_t fBitfields; + }; + uint32_t getBitfields() const { return fBitfields; } + void setBitfields(uint32_t bitfields); + + uint32_t fDirtyBits; SkDrawCacheProc getDrawCacheProc() const; |