OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2010 The Android Open Source Project | 3 * Copyright 2010 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef SkPDFGraphicState_DEFINED | 10 #ifndef SkPDFGraphicState_DEFINED |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 /** Get a graphic state that only unsets the soft mask. The reference | 66 /** Get a graphic state that only unsets the soft mask. The reference |
67 * count of the object is incremented and it is the caller's responsibility | 67 * count of the object is incremented and it is the caller's responsibility |
68 * to unreference it when done. This is needed to accommodate the weak | 68 * to unreference it when done. This is needed to accommodate the weak |
69 * reference pattern used when the returned object is new and has no | 69 * reference pattern used when the returned object is new and has no |
70 * other references. | 70 * other references. |
71 */ | 71 */ |
72 static SkPDFGraphicState* GetNoSMaskGraphicState(); | 72 static SkPDFGraphicState* GetNoSMaskGraphicState(); |
73 | 73 |
74 bool equals(const SkPaint&) const; | 74 bool equals(const SkPaint&) const; |
75 | 75 |
| 76 // Only public for SK_DECLARE_STATIC_LAZY_PTR |
| 77 static SkPDFGraphicState* CreateNoSMaskGraphicState(); |
| 78 |
76 private: | 79 private: |
77 const SkPaint fPaint; | 80 const SkPaint fPaint; |
78 SkTDArray<SkPDFObject*> fResources; | 81 SkTDArray<SkPDFObject*> fResources; |
79 bool fPopulated; | 82 bool fPopulated; |
80 bool fSMask; | 83 bool fSMask; |
81 | 84 |
82 SkPDFGraphicState(); | 85 SkPDFGraphicState(); |
83 explicit SkPDFGraphicState(const SkPaint& paint); | 86 explicit SkPDFGraphicState(const SkPaint& paint); |
84 | 87 |
85 void populateDict(); | 88 void populateDict(); |
86 | 89 |
87 static SkPDFObject* GetInvertFunction(); | 90 static SkPDFObject* GetInvertFunction(); |
88 | 91 |
89 typedef SkPDFDict INHERITED; | 92 typedef SkPDFDict INHERITED; |
90 }; | 93 }; |
91 | 94 |
92 #endif | 95 #endif |
OLD | NEW |