OLD | NEW |
---|---|
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
44 */ | 44 */ |
45 static SkPDFObject* GetPDFShader(SkPDFCanon* canon, | 45 static SkPDFObject* GetPDFShader(SkPDFCanon* canon, |
46 SkScalar dpi, | 46 SkScalar dpi, |
47 const SkShader& shader, | 47 const SkShader& shader, |
48 const SkMatrix& matrix, | 48 const SkMatrix& matrix, |
49 const SkIRect& surfaceBBox, | 49 const SkIRect& surfaceBBox, |
50 SkScalar rasterScale); | 50 SkScalar rasterScale); |
51 }; | 51 }; |
52 | 52 |
53 class SkPDFFunctionShader final : public SkPDFDict { | 53 class SkPDFFunctionShader final : public SkPDFDict { |
54 | |
55 | |
56 public: | 54 public: |
57 static SkPDFFunctionShader* Create(SkPDFCanon*, | 55 static SkPDFFunctionShader* Create(SkPDFCanon*, |
58 SkAutoTDelete<SkPDFShader::State>*); | 56 SkAutoTDelete<SkPDFShader::State>*); |
57 SkPDFFunctionShader(SkPDFShader::State*); | |
bungeman-skia
2016/03/08 02:20:36
eh, I don't think I'd make this public just becaus
bungeman-skia
2016/03/08 03:27:21
I find this interesting and std::shared_pointer ha
hal.canary
2016/03/08 11:58:48
Done.
| |
59 virtual ~SkPDFFunctionShader(); | 58 virtual ~SkPDFFunctionShader(); |
60 bool equals(const SkPDFShader::State&) const; | 59 bool equals(const SkPDFShader::State&) const; |
61 | 60 |
62 private: | 61 private: |
63 SkAutoTDelete<const SkPDFShader::State> fShaderState; | 62 SkAutoTDelete<const SkPDFShader::State> fShaderState; |
64 SkPDFFunctionShader(SkPDFShader::State*); | |
65 typedef SkPDFDict INHERITED; | 63 typedef SkPDFDict INHERITED; |
66 }; | 64 }; |
67 | 65 |
68 /** | 66 /** |
69 * A shader for PDF gradients. This encapsulates the function shader | 67 * A shader for PDF gradients. This encapsulates the function shader |
70 * inside a tiling pattern while providing a common pattern interface. | 68 * inside a tiling pattern while providing a common pattern interface. |
71 * The encapsulation allows the use of a SMask for transparency gradients. | 69 * The encapsulation allows the use of a SMask for transparency gradients. |
72 */ | 70 */ |
73 class SkPDFAlphaFunctionShader final : public SkPDFStream { | 71 class SkPDFAlphaFunctionShader final : public SkPDFStream { |
74 public: | 72 public: |
(...skipping 17 matching lines...) Expand all Loading... | |
92 virtual ~SkPDFImageShader(); | 90 virtual ~SkPDFImageShader(); |
93 bool equals(const SkPDFShader::State&) const; | 91 bool equals(const SkPDFShader::State&) const; |
94 | 92 |
95 private: | 93 private: |
96 SkAutoTDelete<const SkPDFShader::State> fShaderState; | 94 SkAutoTDelete<const SkPDFShader::State> fShaderState; |
97 SkPDFImageShader(SkPDFShader::State*); | 95 SkPDFImageShader(SkPDFShader::State*); |
98 typedef SkPDFStream INHERITED; | 96 typedef SkPDFStream INHERITED; |
99 }; | 97 }; |
100 | 98 |
101 #endif | 99 #endif |
OLD | NEW |