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

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

Issue 1505763003: SkDocument::setDCTEncoder() for old versions of webkit (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-12-09 (Wednesday) 13:41:21 EST Created 5 years 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/pdf/SkPDFBitmap.cpp ('k') | src/pdf/SkPDFDevice.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"
11 #include "SkPDFGraphicState.h" 11 #include "SkPDFGraphicState.h"
12 #include "SkPDFShader.h" 12 #include "SkPDFShader.h"
13 #include "SkPixelSerializer.h"
13 #include "SkTDArray.h" 14 #include "SkTDArray.h"
14 #include "SkTHash.h" 15 #include "SkTHash.h"
15 16
16 class SkPDFFont; 17 class SkPDFFont;
17 class SkPaint; 18 class SkPaint;
18 class SkImage; 19 class SkImage;
19 20
20 class SkBitmapKey { 21 class SkBitmapKey {
21 public: 22 public:
22 SkBitmapKey() : fSubset(SkIRect::MakeEmpty()), fGenID(0) {} 23 SkBitmapKey() : fSubset(SkIRect::MakeEmpty()), fGenID(0) {}
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 74
74 const SkPDFGraphicState* findGraphicState(const SkPDFGraphicState&) const; 75 const SkPDFGraphicState* findGraphicState(const SkPDFGraphicState&) const;
75 void addGraphicState(const SkPDFGraphicState*); 76 void addGraphicState(const SkPDFGraphicState*);
76 77
77 SkPDFObject* findPDFBitmap(const SkImage* image) const; 78 SkPDFObject* findPDFBitmap(const SkImage* image) const;
78 void addPDFBitmap(uint32_t imageUniqueID, SkPDFObject*); 79 void addPDFBitmap(uint32_t imageUniqueID, SkPDFObject*);
79 const SkImage* bitmapToImage(const SkBitmap&); 80 const SkImage* bitmapToImage(const SkBitmap&);
80 81
81 SkTHashMap<uint32_t, bool> fCanEmbedTypeface; 82 SkTHashMap<uint32_t, bool> fCanEmbedTypeface;
82 83
84 SkAutoTUnref<SkPixelSerializer> fPixelSerializer;
85
83 private: 86 private:
84 struct FontRec { 87 struct FontRec {
85 SkPDFFont* fFont; 88 SkPDFFont* fFont;
86 uint32_t fFontID; 89 uint32_t fFontID;
87 uint16_t fGlyphID; 90 uint16_t fGlyphID;
88 }; 91 };
89 SkTDArray<FontRec> fFontRecords; 92 SkTDArray<FontRec> fFontRecords;
90 93
91 SkTDArray<SkPDFFunctionShader*> fFunctionShaderRecords; 94 SkTDArray<SkPDFFunctionShader*> fFunctionShaderRecords;
92 95
(...skipping 15 matching lines...) Expand all
108 return w.fPtr->hash(); 111 return w.fPtr->hash();
109 } 112 }
110 }; 113 };
111 }; 114 };
112 SkTHashSet<WrapGS, WrapGS::Hash> fGraphicStateRecords; 115 SkTHashSet<WrapGS, WrapGS::Hash> fGraphicStateRecords;
113 116
114 SkTHashMap<SkBitmapKey, const SkImage*> fBitmapToImageMap; 117 SkTHashMap<SkBitmapKey, const SkImage*> fBitmapToImageMap;
115 SkTHashMap<uint32_t /*ImageUniqueID*/, SkPDFObject*> fPDFBitmapMap; 118 SkTHashMap<uint32_t /*ImageUniqueID*/, SkPDFObject*> fPDFBitmapMap;
116 }; 119 };
117 #endif // SkPDFCanon_DEFINED 120 #endif // SkPDFCanon_DEFINED
OLDNEW
« no previous file with comments | « src/pdf/SkPDFBitmap.cpp ('k') | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698