Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Side by Side Diff: src/pdf/SkPDFCanon.h

Issue 941023005: PDF : New factory function for SkPDFDevice (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase on 07d5947 Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/doc/SkDocument_PDF.cpp ('k') | src/pdf/SkPDFDevice.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « src/doc/SkDocument_PDF.cpp ('k') | src/pdf/SkPDFDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698