Index: include/core/SkPaint.h |
diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h |
index abb859950c5bb6a66aecccded690ca8cd6ae02a2..59160dfd11ce9c90d2a5eb5dcf4f4f5f6cc4cd5e 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); |
reed1
2014/02/17 16:35:31
Seems like these *are* public. Do they have to be?
mtklein_C
2014/02/18 15:49:33
These need to be accessible in SkPaintDictionary.
|
+ 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; |