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

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

Issue 1401763002: SkPDF: fall back on paths for unembeddable fonts. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-10-12 (Monday) 15:54:45 EDT Created 5 years, 2 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 | « resources/fonts/Roboto2-Regular_NoEmbed.ttf ('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 "SkBitmap.h" 10 #include "SkBitmap.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 SkPDFImageShader* findImageShader(const SkPDFShader::State&) const; 71 SkPDFImageShader* findImageShader(const SkPDFShader::State&) const;
72 void addImageShader(SkPDFImageShader*); 72 void addImageShader(SkPDFImageShader*);
73 73
74 const SkPDFGraphicState* findGraphicState(const SkPDFGraphicState&) const; 74 const SkPDFGraphicState* findGraphicState(const SkPDFGraphicState&) const;
75 void addGraphicState(const SkPDFGraphicState*); 75 void addGraphicState(const SkPDFGraphicState*);
76 76
77 SkPDFObject* findPDFBitmap(const SkImage* image) const; 77 SkPDFObject* findPDFBitmap(const SkImage* image) const;
78 void addPDFBitmap(uint32_t imageUniqueID, SkPDFObject*); 78 void addPDFBitmap(uint32_t imageUniqueID, SkPDFObject*);
79 const SkImage* bitmapToImage(const SkBitmap&); 79 const SkImage* bitmapToImage(const SkBitmap&);
80 80
81 SkTHashMap<uint32_t, bool> fCanEmbedTypeface;
82
81 private: 83 private:
82 struct FontRec { 84 struct FontRec {
83 SkPDFFont* fFont; 85 SkPDFFont* fFont;
84 uint32_t fFontID; 86 uint32_t fFontID;
85 uint16_t fGlyphID; 87 uint16_t fGlyphID;
86 }; 88 };
87 SkTDArray<FontRec> fFontRecords; 89 SkTDArray<FontRec> fFontRecords;
88 90
89 SkTDArray<SkPDFFunctionShader*> fFunctionShaderRecords; 91 SkTDArray<SkPDFFunctionShader*> fFunctionShaderRecords;
90 92
(...skipping 13 matching lines...) Expand all
104 SkASSERT(w.fPtr); 106 SkASSERT(w.fPtr);
105 return w.fPtr->hash(); 107 return w.fPtr->hash();
106 } 108 }
107 }; 109 };
108 SkTHashSet<WrapGS, WrapGS::Hash> fGraphicStateRecords; 110 SkTHashSet<WrapGS, WrapGS::Hash> fGraphicStateRecords;
109 111
110 SkTHashMap<SkBitmapKey, const SkImage*> fBitmapToImageMap; 112 SkTHashMap<SkBitmapKey, const SkImage*> fBitmapToImageMap;
111 SkTHashMap<uint32_t /*ImageUniqueID*/, SkPDFObject*> fPDFBitmapMap; 113 SkTHashMap<uint32_t /*ImageUniqueID*/, SkPDFObject*> fPDFBitmapMap;
112 }; 114 };
113 #endif // SkPDFCanon_DEFINED 115 #endif // SkPDFCanon_DEFINED
OLDNEW
« no previous file with comments | « resources/fonts/Roboto2-Regular_NoEmbed.ttf ('k') | src/pdf/SkPDFDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698