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

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

Issue 1916093002: SkDocument/PDF: new API (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2016-04-26 (Tuesday) 15:55:33 EDT Created 4 years, 7 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/pdf/SkDocument_PDF_None.cpp ('k') | src/pdf/SkPDFDocument.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 "SkPDFGraphicState.h" 10 #include "SkPDFGraphicState.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 const SkPDFGraphicState* findGraphicState(const SkPDFGraphicState&) const; 62 const SkPDFGraphicState* findGraphicState(const SkPDFGraphicState&) const;
63 void addGraphicState(const SkPDFGraphicState*); 63 void addGraphicState(const SkPDFGraphicState*);
64 64
65 sk_sp<SkPDFObject> findPDFBitmap(SkBitmapKey key) const; 65 sk_sp<SkPDFObject> findPDFBitmap(SkBitmapKey key) const;
66 void addPDFBitmap(SkBitmapKey key, sk_sp<SkPDFObject>); 66 void addPDFBitmap(SkBitmapKey key, sk_sp<SkPDFObject>);
67 67
68 SkTHashMap<uint32_t, bool> fCanEmbedTypeface; 68 SkTHashMap<uint32_t, bool> fCanEmbedTypeface;
69 69
70 SkPixelSerializer* getPixelSerializer() const { return fPixelSerializer.get( ); } 70 SkPixelSerializer* getPixelSerializer() const { return fPixelSerializer.get( ); }
71 void setPixelSerializer(SkPixelSerializer* ps) { fPixelSerializer.reset(ps) ; } 71 void setPixelSerializer(sk_sp<SkPixelSerializer> ps) {
72 fPixelSerializer = std::move(ps);
73 }
72 74
73 sk_sp<SkPDFStream> makeInvertFunction(); 75 sk_sp<SkPDFStream> makeInvertFunction();
74 sk_sp<SkPDFDict> makeNoSmaskGraphicState(); 76 sk_sp<SkPDFDict> makeNoSmaskGraphicState();
75 sk_sp<SkPDFArray> makeRangeObject(); 77 sk_sp<SkPDFArray> makeRangeObject();
76 78
77 private: 79 private:
78 struct FontRec { 80 struct FontRec {
79 SkPDFFont* fFont; 81 SkPDFFont* fFont;
80 uint32_t fFontID; 82 uint32_t fFontID;
81 uint16_t fGlyphID; 83 uint16_t fGlyphID;
(...skipping 25 matching lines...) Expand all
107 109
108 // TODO(halcanary): make SkTHashMap<K, sk_sp<V>> work correctly. 110 // TODO(halcanary): make SkTHashMap<K, sk_sp<V>> work correctly.
109 SkTHashMap<SkBitmapKey, SkPDFObject*> fPDFBitmapMap; 111 SkTHashMap<SkBitmapKey, SkPDFObject*> fPDFBitmapMap;
110 112
111 sk_sp<SkPixelSerializer> fPixelSerializer; 113 sk_sp<SkPixelSerializer> fPixelSerializer;
112 sk_sp<SkPDFStream> fInvertFunction; 114 sk_sp<SkPDFStream> fInvertFunction;
113 sk_sp<SkPDFDict> fNoSmaskGraphicState; 115 sk_sp<SkPDFDict> fNoSmaskGraphicState;
114 sk_sp<SkPDFArray> fRangeObject; 116 sk_sp<SkPDFArray> fRangeObject;
115 }; 117 };
116 #endif // SkPDFCanon_DEFINED 118 #endif // SkPDFCanon_DEFINED
OLDNEW
« no previous file with comments | « src/pdf/SkDocument_PDF_None.cpp ('k') | src/pdf/SkPDFDocument.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698