| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 SkScalar rasterScale); | 48 SkScalar rasterScale); |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 class SkPDFFunctionShader : public SkPDFDict { | 51 class SkPDFFunctionShader : public SkPDFDict { |
| 52 SK_DECLARE_INST_COUNT(SkPDFFunctionShader); | 52 SK_DECLARE_INST_COUNT(SkPDFFunctionShader); |
| 53 | 53 |
| 54 public: | 54 public: |
| 55 static SkPDFFunctionShader* Create(SkAutoTDelete<SkPDFShader::State>*); | 55 static SkPDFFunctionShader* Create(SkAutoTDelete<SkPDFShader::State>*); |
| 56 virtual ~SkPDFFunctionShader(); | 56 virtual ~SkPDFFunctionShader(); |
| 57 bool equals(const SkPDFShader::State&) const; | 57 bool equals(const SkPDFShader::State&) const; |
| 58 void getResources(const SkTSet<SkPDFObject*>&, | |
| 59 SkTSet<SkPDFObject*>*) SK_OVERRIDE; | |
| 60 | 58 |
| 61 private: | 59 private: |
| 62 SkAutoTDelete<const SkPDFShader::State> fShaderState; | 60 SkAutoTDelete<const SkPDFShader::State> fShaderState; |
| 63 SkTDArray<SkPDFObject*> fResources; | 61 SkTDArray<SkPDFObject*> fResources; |
| 64 explicit SkPDFFunctionShader(SkPDFShader::State* state); | 62 explicit SkPDFFunctionShader(SkPDFShader::State* 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 : public SkPDFStream { | 71 class SkPDFAlphaFunctionShader : public SkPDFStream { |
| 74 public: | 72 public: |
| 75 static SkPDFAlphaFunctionShader* Create(SkAutoTDelete<SkPDFShader::State>*); | 73 static SkPDFAlphaFunctionShader* Create(SkAutoTDelete<SkPDFShader::State>*); |
| 76 virtual ~SkPDFAlphaFunctionShader(); | 74 virtual ~SkPDFAlphaFunctionShader(); |
| 77 void getResources(const SkTSet<SkPDFObject*>&, | |
| 78 SkTSet<SkPDFObject*>*) SK_OVERRIDE; | |
| 79 bool equals(const SkPDFShader::State&) const; | 75 bool equals(const SkPDFShader::State&) const; |
| 80 | 76 |
| 81 private: | 77 private: |
| 82 SkAutoTDelete<const SkPDFShader::State> fShaderState; | 78 SkAutoTDelete<const SkPDFShader::State> fShaderState; |
| 83 SkAutoTUnref<SkPDFObject> fColorShader; | 79 SkAutoTUnref<SkPDFObject> fColorShader; |
| 84 SkAutoTUnref<SkPDFResourceDict> fResourceDict; | 80 SkAutoTUnref<SkPDFResourceDict> fResourceDict; |
| 85 explicit SkPDFAlphaFunctionShader(SkPDFShader::State* state); | 81 explicit SkPDFAlphaFunctionShader(SkPDFShader::State* state); |
| 86 }; | 82 }; |
| 87 | 83 |
| 88 class SkPDFImageShader : public SkPDFStream { | 84 class SkPDFImageShader : public SkPDFStream { |
| 89 public: | 85 public: |
| 90 static SkPDFImageShader* Create(SkAutoTDelete<SkPDFShader::State>*); | 86 static SkPDFImageShader* Create(SkAutoTDelete<SkPDFShader::State>*); |
| 91 virtual ~SkPDFImageShader(); | 87 virtual ~SkPDFImageShader(); |
| 92 void getResources(const SkTSet<SkPDFObject*>&, | |
| 93 SkTSet<SkPDFObject*>*) SK_OVERRIDE; | |
| 94 bool equals(const SkPDFShader::State&) const; | 88 bool equals(const SkPDFShader::State&) const; |
| 95 | 89 |
| 96 private: | 90 private: |
| 97 SkAutoTDelete<const SkPDFShader::State> fShaderState; | 91 SkAutoTDelete<const SkPDFShader::State> fShaderState; |
| 98 SkTSet<SkPDFObject*> fResources; | 92 SkTSet<SkPDFObject*> fResources; |
| 99 explicit SkPDFImageShader(SkPDFShader::State* state); | 93 explicit SkPDFImageShader(SkPDFShader::State* state); |
| 100 }; | 94 }; |
| 101 | 95 |
| 102 #endif | 96 #endif |
| OLD | NEW |