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

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

Issue 846023003: In SkPDFDocument::emitPDF(), stop pre-calculating file offsets. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nit: space between functions Created 5 years, 11 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/SkPDFDocument.cpp ('k') | src/pdf/SkPDFGraphicState.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 SkPDFGraphicState_DEFINED 10 #ifndef SkPDFGraphicState_DEFINED
(...skipping 21 matching lines...) Expand all
32 enum SkPDFSMaskMode { 32 enum SkPDFSMaskMode {
33 kAlpha_SMaskMode, 33 kAlpha_SMaskMode,
34 kLuminosity_SMaskMode 34 kLuminosity_SMaskMode
35 }; 35 };
36 36
37 virtual ~SkPDFGraphicState(); 37 virtual ~SkPDFGraphicState();
38 38
39 virtual void getResources(const SkTSet<SkPDFObject*>& knownResourceObjects, 39 virtual void getResources(const SkTSet<SkPDFObject*>& knownResourceObjects,
40 SkTSet<SkPDFObject*>* newResourceObjects); 40 SkTSet<SkPDFObject*>* newResourceObjects);
41 41
42 // Override emitObject and getOutputSize so that we can populate 42 // Override emitObject so that we can populate the dictionary on
43 // the dictionary on demand. 43 // demand.
44 virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog); 44 virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog);
45 virtual size_t getOutputSize(SkPDFCatalog* catalog, bool indirect);
46 45
47 /** Get the graphic state for the passed SkPaint. The reference count of 46 /** Get the graphic state for the passed SkPaint. The reference count of
48 * the object is incremented and it is the caller's responsibility to 47 * the object is incremented and it is the caller's responsibility to
49 * unreference it when done. This is needed to accommodate the weak 48 * unreference it when done. This is needed to accommodate the weak
50 * reference pattern used when the returned object is new and has no 49 * reference pattern used when the returned object is new and has no
51 * other references. 50 * other references.
52 * @param paint The SkPaint to emulate. 51 * @param paint The SkPaint to emulate.
53 */ 52 */
54 static SkPDFGraphicState* GetGraphicStateForPaint(const SkPaint& paint); 53 static SkPDFGraphicState* GetGraphicStateForPaint(const SkPaint& paint);
55 54
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 100
102 void populateDict(); 101 void populateDict();
103 102
104 static SkPDFObject* GetInvertFunction(); 103 static SkPDFObject* GetInvertFunction();
105 104
106 static int Find(const SkPaint& paint); 105 static int Find(const SkPaint& paint);
107 typedef SkPDFDict INHERITED; 106 typedef SkPDFDict INHERITED;
108 }; 107 };
109 108
110 #endif 109 #endif
OLDNEW
« no previous file with comments | « src/pdf/SkPDFDocument.cpp ('k') | src/pdf/SkPDFGraphicState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698