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

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

Issue 1788263002: SkPDF: remove all globally references SkPDFObjects (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add explanatory comments Created 4 years, 9 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 | « no previous file | src/pdf/SkPDFCanon.cpp » ('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 "SkBitmap.h" 10 #include "SkBitmap.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 SkPDFObject* findPDFBitmap(const SkImage* image) const; 78 SkPDFObject* findPDFBitmap(const SkImage* image) const;
79 void addPDFBitmap(uint32_t imageUniqueID, SkPDFObject*); 79 void addPDFBitmap(uint32_t imageUniqueID, SkPDFObject*);
80 const SkImage* bitmapToImage(const SkBitmap&); 80 const SkImage* bitmapToImage(const SkBitmap&);
81 81
82 SkTHashMap<uint32_t, bool> fCanEmbedTypeface; 82 SkTHashMap<uint32_t, bool> fCanEmbedTypeface;
83 83
84 SkPixelSerializer* getPixelSerializer() const { return fPixelSerializer.get( ); } 84 SkPixelSerializer* getPixelSerializer() const { return fPixelSerializer.get( ); }
85 void setPixelSerializer(SkPixelSerializer* ps) { fPixelSerializer.reset(ps) ; } 85 void setPixelSerializer(SkPixelSerializer* ps) { fPixelSerializer.reset(ps) ; }
86 86
87 sk_sp<SkPDFStream> makeInvertFunction();
88 sk_sp<SkPDFDict> makeNoSmaskGraphicState();
89 sk_sp<SkPDFArray> makeRangeObject();
90
87 private: 91 private:
88 struct FontRec { 92 struct FontRec {
89 SkPDFFont* fFont; 93 SkPDFFont* fFont;
90 uint32_t fFontID; 94 uint32_t fFontID;
91 uint16_t fGlyphID; 95 uint16_t fGlyphID;
92 }; 96 };
93 SkTDArray<FontRec> fFontRecords; 97 SkTDArray<FontRec> fFontRecords;
94 98
95 SkTDArray<SkPDFFunctionShader*> fFunctionShaderRecords; 99 SkTDArray<SkPDFFunctionShader*> fFunctionShaderRecords;
96 100
(...skipping 15 matching lines...) Expand all
112 return w.fPtr->hash(); 116 return w.fPtr->hash();
113 } 117 }
114 }; 118 };
115 }; 119 };
116 SkTHashSet<WrapGS, WrapGS::Hash> fGraphicStateRecords; 120 SkTHashSet<WrapGS, WrapGS::Hash> fGraphicStateRecords;
117 121
118 SkTHashMap<SkBitmapKey, const SkImage*> fBitmapToImageMap; 122 SkTHashMap<SkBitmapKey, const SkImage*> fBitmapToImageMap;
119 SkTHashMap<uint32_t /*ImageUniqueID*/, SkPDFObject*> fPDFBitmapMap; 123 SkTHashMap<uint32_t /*ImageUniqueID*/, SkPDFObject*> fPDFBitmapMap;
120 124
121 sk_sp<SkPixelSerializer> fPixelSerializer; 125 sk_sp<SkPixelSerializer> fPixelSerializer;
126 sk_sp<SkPDFStream> fInvertFunction;
127 sk_sp<SkPDFDict> fNoSmaskGraphicState;
128 sk_sp<SkPDFArray> fRangeObject;
122 }; 129 };
123 #endif // SkPDFCanon_DEFINED 130 #endif // SkPDFCanon_DEFINED
OLDNEW
« no previous file with comments | « no previous file | src/pdf/SkPDFCanon.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698