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

Side by Side Diff: src/pdf/SkPDFDocument.cpp

Issue 1029263004: SkPDF: clean up extra references (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-03-23 (Monday) 20:01:49 EDT 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/SkPDFDevice.cpp ('k') | src/pdf/SkPDFResourceDict.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 2011 Google Inc. 3 * Copyright 2011 Google Inc.
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 "SkPDFDevice.h" 11 #include "SkPDFDevice.h"
12 #include "SkPDFDocument.h" 12 #include "SkPDFDocument.h"
13 #include "SkPDFFont.h" 13 #include "SkPDFFont.h"
14 #include "SkPDFPage.h" 14 #include "SkPDFPage.h"
15 #include "SkPDFTypes.h" 15 #include "SkPDFTypes.h"
16 #include "SkStream.h" 16 #include "SkStream.h"
17 #include "SkTSet.h"
18 17
19 static void addResourcesToCatalog(bool firstPage, 18 static void addResourcesToCatalog(bool firstPage,
20 SkTSet<SkPDFObject*>* resourceSet, 19 SkTSet<SkPDFObject*>* resourceSet,
21 SkPDFCatalog* catalog) { 20 SkPDFCatalog* catalog) {
22 for (int i = 0; i < resourceSet->count(); i++) { 21 for (int i = 0; i < resourceSet->count(); i++) {
23 catalog->addObject((*resourceSet)[i], firstPage); 22 catalog->addObject((*resourceSet)[i], firstPage);
24 } 23 }
25 } 24 }
26 25
27 static void perform_font_subsetting(SkPDFCatalog* catalog, 26 static void perform_font_subsetting(SkPDFCatalog* catalog,
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 fTrailerDict->insertInt("Size", int(objCount)); 301 fTrailerDict->insertInt("Size", int(objCount));
303 fTrailerDict->insert("Root", new SkPDFObjRef(fDocCatalog))->unref(); 302 fTrailerDict->insert("Root", new SkPDFObjRef(fDocCatalog))->unref();
304 } 303 }
305 304
306 stream->writeText("trailer\n"); 305 stream->writeText("trailer\n");
307 fTrailerDict->emitObject(stream, fCatalog.get()); 306 fTrailerDict->emitObject(stream, fCatalog.get());
308 stream->writeText("\nstartxref\n"); 307 stream->writeText("\nstartxref\n");
309 stream->writeBigDecAsText(fXRefFileOffset); 308 stream->writeBigDecAsText(fXRefFileOffset);
310 stream->writeText("\n%%EOF"); 309 stream->writeText("\n%%EOF");
311 } 310 }
OLDNEW
« no previous file with comments | « src/pdf/SkPDFDevice.cpp ('k') | src/pdf/SkPDFResourceDict.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698