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

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

Issue 1035513003: SkPDF: skpdfdocument and skpdfpage use skpdfdevice in a const way (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 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 | « src/pdf/SkPDFFormXObject.cpp ('k') | src/pdf/SkPDFPage.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 /* 2 /*
3 * Copyright 2010 The Android Open Source Project 3 * Copyright 2010 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkPDFPage_DEFINED 10 #ifndef SkPDFPage_DEFINED
(...skipping 13 matching lines...) Expand all
24 A SkPDFPage contains meta information about a page, is used in the page 24 A SkPDFPage contains meta information about a page, is used in the page
25 tree and points to the content of the page. 25 tree and points to the content of the page.
26 */ 26 */
27 class SkPDFPage : public SkPDFDict { 27 class SkPDFPage : public SkPDFDict {
28 SK_DECLARE_INST_COUNT(SkPDFPage) 28 SK_DECLARE_INST_COUNT(SkPDFPage)
29 public: 29 public:
30 /** Create a PDF page with the passed PDF device. The device need not 30 /** Create a PDF page with the passed PDF device. The device need not
31 * have content on it yet. 31 * have content on it yet.
32 * @param content The page content. 32 * @param content The page content.
33 */ 33 */
34 explicit SkPDFPage(SkPDFDevice* content); 34 explicit SkPDFPage(const SkPDFDevice* content);
35 ~SkPDFPage(); 35 ~SkPDFPage();
36 36
37 /** Before a page and its contents can be sized and emitted, it must 37 /** Before a page and its contents can be sized and emitted, it must
38 * be finalized. No changes to the PDFDevice will be honored after 38 * be finalized. No changes to the PDFDevice will be honored after
39 * finalizePage has been called. This function adds the page content 39 * finalizePage has been called. This function adds the page content
40 * to the passed catalog, so it must be called for each document 40 * to the passed catalog, so it must be called for each document
41 * that the page is part of. 41 * that the page is part of.
42 * @param catalog The catalog to add page content objects to. 42 * @param catalog The catalog to add page content objects to.
43 * @param firstPage Indicate if this is the first page of a document. 43 * @param firstPage Indicate if this is the first page of a document.
44 * @param newResourceObjects All the resource objects (recursively) used on 44 * @param newResourceObjects All the resource objects (recursively) used on
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 /** Returns a SkPDFGlyphSetMap which represents glyph usage of every font 80 /** Returns a SkPDFGlyphSetMap which represents glyph usage of every font
81 * that shows on this page. 81 * that shows on this page.
82 */ 82 */
83 const SkPDFGlyphSetMap& getFontGlyphUsage() const; 83 const SkPDFGlyphSetMap& getFontGlyphUsage() const;
84 84
85 SkPDFObject* getContentStream() const; 85 SkPDFObject* getContentStream() const;
86 86
87 private: 87 private:
88 // Multiple pages may reference the content. 88 // Multiple pages may reference the content.
89 SkAutoTUnref<SkPDFDevice> fDevice; 89 SkAutoTUnref<const SkPDFDevice> fDevice;
90 90
91 // Once the content is finalized, put it into a stream for output. 91 // Once the content is finalized, put it into a stream for output.
92 SkAutoTUnref<SkPDFStream> fContentStream; 92 SkAutoTUnref<SkPDFStream> fContentStream;
93 typedef SkPDFDict INHERITED; 93 typedef SkPDFDict INHERITED;
94 }; 94 };
95 95
96 #endif 96 #endif
OLDNEW
« no previous file with comments | « src/pdf/SkPDFFormXObject.cpp ('k') | src/pdf/SkPDFPage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698