OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 #ifndef SkPDFCanon_DEFINED | 7 #ifndef SkPDFCanon_DEFINED |
8 #define SkPDFCanon_DEFINED | 8 #define SkPDFCanon_DEFINED |
9 | 9 |
10 #include "SkPDFGraphicState.h" | 10 #include "SkPDFGraphicState.h" |
11 #include "SkPDFShader.h" | 11 #include "SkPDFShader.h" |
12 #include "SkPixelSerializer.h" | 12 #include "SkPixelSerializer.h" |
13 #include "SkTDArray.h" | 13 #include "SkTDArray.h" |
14 #include "SkTHash.h" | 14 #include "SkTHash.h" |
15 #include "SkBitmapKey.h" | 15 #include "SkBitmapKey.h" |
16 | 16 |
17 class SkPDFFont; | 17 class SkPDFFont; |
18 class SkPaint; | |
19 class SkImage; | |
20 | 18 |
21 /** | 19 /** |
22 * The SkPDFCanon canonicalizes objects across PDF pages | 20 * The SkPDFCanon canonicalizes objects across PDF pages |
23 * (SkPDFDevices) and across draw calls. | 21 * (SkPDFDevices) and across draw calls. |
24 * | 22 * |
25 * The PDF backend works correctly if: | 23 * The PDF backend works correctly if: |
26 * - There is no more than one SkPDFCanon for each thread. | 24 * - There is no more than one SkPDFCanon for each thread. |
27 * - Every SkPDFDevice is given a pointer to a SkPDFCanon on creation. | 25 * - Every SkPDFDevice is given a pointer to a SkPDFCanon on creation. |
28 * - All SkPDFDevices in a document share the same SkPDFCanon. | 26 * - All SkPDFDevices in a document share the same SkPDFCanon. |
29 * The SkPDFDocument class makes this happen by owning a single | 27 * The SkPDFDocument class makes this happen by owning a single |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 107 |
110 // TODO(halcanary): make SkTHashMap<K, sk_sp<V>> work correctly. | 108 // TODO(halcanary): make SkTHashMap<K, sk_sp<V>> work correctly. |
111 SkTHashMap<SkBitmapKey, SkPDFObject*> fPDFBitmapMap; | 109 SkTHashMap<SkBitmapKey, SkPDFObject*> fPDFBitmapMap; |
112 | 110 |
113 sk_sp<SkPixelSerializer> fPixelSerializer; | 111 sk_sp<SkPixelSerializer> fPixelSerializer; |
114 sk_sp<SkPDFStream> fInvertFunction; | 112 sk_sp<SkPDFStream> fInvertFunction; |
115 sk_sp<SkPDFDict> fNoSmaskGraphicState; | 113 sk_sp<SkPDFDict> fNoSmaskGraphicState; |
116 sk_sp<SkPDFArray> fRangeObject; | 114 sk_sp<SkPDFArray> fRangeObject; |
117 }; | 115 }; |
118 #endif // SkPDFCanon_DEFINED | 116 #endif // SkPDFCanon_DEFINED |
OLD | NEW |