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

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

Issue 1037573005: SkPDF: add canon assert before adding code that might break it (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove TODO message 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.h ('k') | src/pdf/SkPDFDocument.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 SkPDFDocument_DEFINED 10 #ifndef SkPDFDocument_DEFINED
11 #define SkPDFDocument_DEFINED 11 #define SkPDFDocument_DEFINED
12 12
13 #include "SkAdvancedTypefaceMetrics.h" 13 #include "SkAdvancedTypefaceMetrics.h"
14 #include "SkTDArray.h" 14 #include "SkTDArray.h"
15 15
16 class SkPDFDevice; 16 class SkPDFDevice;
17 class SkWStream; 17 class SkWStream;
18 18
19 namespace SkPDFDocument { 19 namespace SkPDFDocument {
20 /** 20 /**
21 * Assemble pages together and generate a PDF document file. 21 * Assemble pages together and generate a PDF document file.
22 * 22 *
23 * Output the PDF to the passed stream. It is an error to call this (it 23 * Output the PDF to the passed stream. It is an error to call this (it
24 * will return false and not modify stream) if pageDevices is empty. 24 * will return false and not modify stream) if pageDevices is empty.
25 * No device pointer can be NULL. 25 * No device pointer can be NULL.
26 * 26 *
27 * @param pageDevices An array of pages, in order. All pages 27 * @param pageDevices An array of pages, in order. All pages
28 * should be created using the same SkPDFCanon. 28 * should be created using the same SkPDFCanon.
29 * TODO(halcanary): ASSERT this condition.
30 * @param SkWStream The writable output stream to send the PDF to. 29 * @param SkWStream The writable output stream to send the PDF to.
31 */ 30 */
32 bool EmitPDF(const SkTDArray<SkPDFDevice*>& pageDevices, SkWStream*); 31 bool EmitPDF(const SkTDArray<SkPDFDevice*>& pageDevices, SkWStream*);
33 32
34 /** Get the count of unique font types used in the given pages. 33 /** Get the count of unique font types used in the given pages.
35 */ 34 */
36 void GetCountOfFontTypes(const SkTDArray<SkPDFDevice*>& pageDevices, 35 void GetCountOfFontTypes(const SkTDArray<SkPDFDevice*>& pageDevices,
37 int counts[SkAdvancedTypefaceMetrics::kOther_Font + 1], 36 int counts[SkAdvancedTypefaceMetrics::kOther_Font + 1],
38 int* notSubsettableCount, 37 int* notSubsettableCount,
39 int* notEmbedddableCount); 38 int* notEmbedddableCount);
40 } 39 }
41 40
42 #endif 41 #endif
OLDNEW
« no previous file with comments | « src/pdf/SkPDFDevice.h ('k') | src/pdf/SkPDFDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698