| 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 "SkPDFShader.h" | 10 #include "SkPDFShader.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 void removeImageShader(SkPDFImageShader*); | 66 void removeImageShader(SkPDFImageShader*); |
| 67 | 67 |
| 68 SkPDFGraphicState* findGraphicState(const SkPaint&) const; | 68 SkPDFGraphicState* findGraphicState(const SkPaint&) const; |
| 69 void addGraphicState(SkPDFGraphicState*); | 69 void addGraphicState(SkPDFGraphicState*); |
| 70 void removeGraphicState(SkPDFGraphicState*); | 70 void removeGraphicState(SkPDFGraphicState*); |
| 71 | 71 |
| 72 SkPDFBitmap* findBitmap(const SkBitmap&) const; | 72 SkPDFBitmap* findBitmap(const SkBitmap&) const; |
| 73 void addBitmap(SkPDFBitmap*); | 73 void addBitmap(SkPDFBitmap*); |
| 74 void removeBitmap(SkPDFBitmap*); | 74 void removeBitmap(SkPDFBitmap*); |
| 75 | 75 |
| 76 void assertEmpty() const { |
| 77 SkASSERT(fFontRecords.isEmpty()); |
| 78 SkASSERT(fFunctionShaderRecords.isEmpty()); |
| 79 SkASSERT(fAlphaShaderRecords.isEmpty()); |
| 80 SkASSERT(fImageShaderRecords.isEmpty()); |
| 81 SkASSERT(fGraphicStateRecords.isEmpty()); |
| 82 SkASSERT(fBitmapRecords.isEmpty()); |
| 83 } |
| 84 |
| 76 private: | 85 private: |
| 77 struct FontRec { | 86 struct FontRec { |
| 78 SkPDFFont* fFont; | 87 SkPDFFont* fFont; |
| 79 uint32_t fFontID; | 88 uint32_t fFontID; |
| 80 uint16_t fGlyphID; | 89 uint16_t fGlyphID; |
| 81 }; | 90 }; |
| 82 SkTDArray<FontRec> fFontRecords; | 91 SkTDArray<FontRec> fFontRecords; |
| 83 | 92 |
| 84 SkTDArray<SkPDFFunctionShader*> fFunctionShaderRecords; | 93 SkTDArray<SkPDFFunctionShader*> fFunctionShaderRecords; |
| 85 | 94 |
| 86 SkTDArray<SkPDFAlphaFunctionShader*> fAlphaShaderRecords; | 95 SkTDArray<SkPDFAlphaFunctionShader*> fAlphaShaderRecords; |
| 87 | 96 |
| 88 SkTDArray<SkPDFImageShader*> fImageShaderRecords; | 97 SkTDArray<SkPDFImageShader*> fImageShaderRecords; |
| 89 | 98 |
| 90 SkTDArray<SkPDFGraphicState*> fGraphicStateRecords; | 99 SkTDArray<SkPDFGraphicState*> fGraphicStateRecords; |
| 91 | 100 |
| 92 SkTDArray<SkPDFBitmap*> fBitmapRecords; | 101 SkTDArray<SkPDFBitmap*> fBitmapRecords; |
| 93 }; | 102 }; |
| 94 #endif // SkPDFCanon_DEFINED | 103 #endif // SkPDFCanon_DEFINED |
| OLD | NEW |