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

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

Issue 966863002: PDF: Canon now owns a reference to all interned objects (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-02-27 (Friday) 15:27:08 EST 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/SkPDFGraphicState.cpp ('k') | src/pdf/SkPDFShader.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 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 #ifndef SkPDFShader_DEFINED 10 #ifndef SkPDFShader_DEFINED
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 class SkPDFFunctionShader : public SkPDFDict { 54 class SkPDFFunctionShader : public SkPDFDict {
55 SK_DECLARE_INST_COUNT(SkPDFFunctionShader); 55 SK_DECLARE_INST_COUNT(SkPDFFunctionShader);
56 56
57 public: 57 public:
58 static SkPDFFunctionShader* Create(SkPDFCanon*, 58 static SkPDFFunctionShader* Create(SkPDFCanon*,
59 SkAutoTDelete<SkPDFShader::State>*); 59 SkAutoTDelete<SkPDFShader::State>*);
60 virtual ~SkPDFFunctionShader(); 60 virtual ~SkPDFFunctionShader();
61 bool equals(const SkPDFShader::State&) const; 61 bool equals(const SkPDFShader::State&) const;
62 62
63 private: 63 private:
64 SkPDFCanon* fCanon;
65 SkAutoTDelete<const SkPDFShader::State> fShaderState; 64 SkAutoTDelete<const SkPDFShader::State> fShaderState;
66 SkTDArray<SkPDFObject*> fResources; 65 SkTDArray<SkPDFObject*> fResources;
67 SkPDFFunctionShader(SkPDFCanon*, SkPDFShader::State*); 66 SkPDFFunctionShader(SkPDFShader::State*);
68 typedef SkPDFDict INHERITED; 67 typedef SkPDFDict INHERITED;
69 }; 68 };
70 69
71 /** 70 /**
72 * A shader for PDF gradients. This encapsulates the function shader 71 * A shader for PDF gradients. This encapsulates the function shader
73 * inside a tiling pattern while providing a common pattern interface. 72 * inside a tiling pattern while providing a common pattern interface.
74 * The encapsulation allows the use of a SMask for transparency gradients. 73 * The encapsulation allows the use of a SMask for transparency gradients.
75 */ 74 */
76 class SkPDFAlphaFunctionShader : public SkPDFStream { 75 class SkPDFAlphaFunctionShader : public SkPDFStream {
77 public: 76 public:
78 static SkPDFAlphaFunctionShader* Create(SkPDFCanon*, 77 static SkPDFAlphaFunctionShader* Create(SkPDFCanon*,
79 SkScalar dpi, 78 SkScalar dpi,
80 SkAutoTDelete<SkPDFShader::State>*); 79 SkAutoTDelete<SkPDFShader::State>*);
81 virtual ~SkPDFAlphaFunctionShader(); 80 virtual ~SkPDFAlphaFunctionShader();
82 bool equals(const SkPDFShader::State&) const; 81 bool equals(const SkPDFShader::State&) const;
83 82
84 private: 83 private:
85 SkPDFCanon* fCanon;
86 SkAutoTDelete<const SkPDFShader::State> fShaderState; 84 SkAutoTDelete<const SkPDFShader::State> fShaderState;
87 SkAutoTUnref<SkPDFObject> fColorShader; 85 SkAutoTUnref<SkPDFObject> fColorShader;
88 SkAutoTUnref<SkPDFResourceDict> fResourceDict; 86 SkAutoTUnref<SkPDFResourceDict> fResourceDict;
89 SkPDFAlphaFunctionShader(SkPDFCanon*, SkPDFShader::State*); 87 SkPDFAlphaFunctionShader(SkPDFShader::State*);
90 }; 88 };
91 89
92 class SkPDFImageShader : public SkPDFStream { 90 class SkPDFImageShader : public SkPDFStream {
93 public: 91 public:
94 static SkPDFImageShader* Create(SkPDFCanon*, 92 static SkPDFImageShader* Create(SkPDFCanon*,
95 SkScalar dpi, 93 SkScalar dpi,
96 SkAutoTDelete<SkPDFShader::State>*); 94 SkAutoTDelete<SkPDFShader::State>*);
97 virtual ~SkPDFImageShader(); 95 virtual ~SkPDFImageShader();
98 bool equals(const SkPDFShader::State&) const; 96 bool equals(const SkPDFShader::State&) const;
99 97
100 private: 98 private:
101 SkPDFCanon* fCanon;
102 SkAutoTDelete<const SkPDFShader::State> fShaderState; 99 SkAutoTDelete<const SkPDFShader::State> fShaderState;
103 SkTSet<SkPDFObject*> fResources; 100 SkTSet<SkPDFObject*> fResources;
104 SkPDFImageShader(SkPDFCanon*, SkPDFShader::State*); 101 SkPDFImageShader(SkPDFShader::State*);
105 }; 102 };
106 103
107 #endif 104 #endif
OLDNEW
« no previous file with comments | « src/pdf/SkPDFGraphicState.cpp ('k') | src/pdf/SkPDFShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698