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/SkPDFCatalog.cpp

Issue 936403002: PDF: why do we have flags no one uses (or can use)? (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 10 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/SkPDFCatalog.h ('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 /* 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 #include "SkPDFCatalog.h" 10 #include "SkPDFCatalog.h"
11 #include "SkPDFTypes.h" 11 #include "SkPDFTypes.h"
12 #include "SkStream.h" 12 #include "SkStream.h"
13 #include "SkTypes.h" 13 #include "SkTypes.h"
14 14
15 SkPDFCatalog::SkPDFCatalog(SkPDFDocument::Flags flags) 15 SkPDFCatalog::SkPDFCatalog()
16 : fFirstPageCount(0), 16 : fFirstPageCount(0)
17 fNextObjNum(1), 17 , fNextObjNum(1)
18 fNextFirstPageObjNum(0), 18 , fNextFirstPageObjNum(0) {}
19 fDocumentFlags(flags) {
20 }
21 19
22 SkPDFCatalog::~SkPDFCatalog() { 20 SkPDFCatalog::~SkPDFCatalog() {
23 fSubstituteResourcesRemaining.safeUnrefAll(); 21 fSubstituteResourcesRemaining.safeUnrefAll();
24 fSubstituteResourcesFirstPage.safeUnrefAll(); 22 fSubstituteResourcesFirstPage.safeUnrefAll();
25 } 23 }
26 24
27 SkPDFObject* SkPDFCatalog::addObject(SkPDFObject* obj, bool onFirstPage) { 25 SkPDFObject* SkPDFCatalog::addObject(SkPDFObject* obj, bool onFirstPage) {
28 if (findObjectIndex(obj) != -1) { // object already added 26 if (findObjectIndex(obj) != -1) { // object already added
29 return obj; 27 return obj;
30 } 28 }
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 149
152 SkPDFObject* SkPDFCatalog::getSubstituteObject(SkPDFObject* object) { 150 SkPDFObject* SkPDFCatalog::getSubstituteObject(SkPDFObject* object) {
153 for (int i = 0; i < fSubstituteMap.count(); ++i) { 151 for (int i = 0; i < fSubstituteMap.count(); ++i) {
154 if (object == fSubstituteMap[i].fOriginal) { 152 if (object == fSubstituteMap[i].fOriginal) {
155 return fSubstituteMap[i].fSubstitute; 153 return fSubstituteMap[i].fSubstitute;
156 } 154 }
157 } 155 }
158 return object; 156 return object;
159 } 157 }
160 158
OLDNEW
« no previous file with comments | « src/pdf/SkPDFCatalog.h ('k') | src/pdf/SkPDFDocument.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698