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 21 matching lines...) Expand all Loading... |
32 enum SkPDFSMaskMode { | 32 enum SkPDFSMaskMode { |
33 kAlpha_SMaskMode, | 33 kAlpha_SMaskMode, |
34 kLuminosity_SMaskMode | 34 kLuminosity_SMaskMode |
35 }; | 35 }; |
36 | 36 |
37 virtual ~SkPDFGraphicState(); | 37 virtual ~SkPDFGraphicState(); |
38 | 38 |
39 virtual void getResources(const SkTSet<SkPDFObject*>& knownResourceObjects, | 39 virtual void getResources(const SkTSet<SkPDFObject*>& knownResourceObjects, |
40 SkTSet<SkPDFObject*>* newResourceObjects); | 40 SkTSet<SkPDFObject*>* newResourceObjects); |
41 | 41 |
42 // Override emitObject and getOutputSize so that we can populate | 42 // Override emitObject so that we can populate the dictionary on |
43 // the dictionary on demand. | 43 // demand. |
44 virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog); | 44 virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog); |
45 virtual size_t getOutputSize(SkPDFCatalog* catalog, bool indirect); | |
46 | 45 |
47 /** Get the graphic state for the passed SkPaint. The reference count of | 46 /** Get the graphic state for the passed SkPaint. The reference count of |
48 * the object is incremented and it is the caller's responsibility to | 47 * the object is incremented and it is the caller's responsibility to |
49 * unreference it when done. This is needed to accommodate the weak | 48 * unreference it when done. This is needed to accommodate the weak |
50 * reference pattern used when the returned object is new and has no | 49 * reference pattern used when the returned object is new and has no |
51 * other references. | 50 * other references. |
52 * @param paint The SkPaint to emulate. | 51 * @param paint The SkPaint to emulate. |
53 */ | 52 */ |
54 static SkPDFGraphicState* GetGraphicStateForPaint(const SkPaint& paint); | 53 static SkPDFGraphicState* GetGraphicStateForPaint(const SkPaint& paint); |
55 | 54 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 100 |
102 void populateDict(); | 101 void populateDict(); |
103 | 102 |
104 static SkPDFObject* GetInvertFunction(); | 103 static SkPDFObject* GetInvertFunction(); |
105 | 104 |
106 static int Find(const SkPaint& paint); | 105 static int Find(const SkPaint& paint); |
107 typedef SkPDFDict INHERITED; | 106 typedef SkPDFDict INHERITED; |
108 }; | 107 }; |
109 | 108 |
110 #endif | 109 #endif |
OLD | NEW |